feat: introduce nim tests
This commit is contained in:
parent
7ede3389ff
commit
94d7c478eb
5
Makefile
5
Makefile
|
@ -35,6 +35,7 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system
|
|||
run-linux \
|
||||
run-macos \
|
||||
run-windows \
|
||||
tests-nim-linux \
|
||||
status-go \
|
||||
status-keycard-go \
|
||||
statusq-sanity-checker \
|
||||
|
@ -642,6 +643,10 @@ run-windows: nim_status_client $(NIM_WINDOWS_PREBUILT_DLLS)
|
|||
PATH="$(shell pwd)"/"$(shell dirname "$(DOTHERSIDE)")":"$(STATUSGO_LIBDIR)":"$(STATUSKEYCARDGO_LIBDIR)":"$(shell pwd)"/"$(shell dirname "$(NIM_WINDOWS_PREBUILT_DLLS)")":"$(PATH)" \
|
||||
./bin/nim_status_client.exe
|
||||
|
||||
tests-nim-linux: | check-qt-dir
|
||||
LD_LIBRARY_PATH="$(QT5_LIBDIR)" \
|
||||
$(ENV_SCRIPT) nim c $(NIM_PARAMS) $(NIM_EXTRA_PARAMS) -r test/nim/message_model_test.nim
|
||||
|
||||
statusq-sanity-checker:
|
||||
cmake -Bui/StatusQ/build -Sui/StatusQ && cmake --build ui/StatusQ/build --target SanityChecker
|
||||
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
parameters {
|
||||
choice(
|
||||
name: 'VERBOSE',
|
||||
description: 'Level of verbosity based on nimbus-build-system setup.',
|
||||
choices: ['0', '1', '2']
|
||||
)
|
||||
}
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 20, unit: 'MINUTES')
|
||||
/* manage how many builds we keep */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '30',
|
||||
artifactNumToKeepStr: '3',
|
||||
))
|
||||
/* Abort old PR builds. */
|
||||
disableConcurrentBuilds(
|
||||
abortPrevious: isPRBuild
|
||||
)
|
||||
}
|
||||
|
||||
environment {
|
||||
TARGET = 'tests-nim'
|
||||
/* Improve make performance */
|
||||
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
|
||||
/* Disable colors in Nim compiler logs */
|
||||
NIMFLAGS = '--colors:off'
|
||||
/* Makefile assumes the compiler folder is included */
|
||||
QTDIR = "/opt/qt/5.14.2/gcc_64"
|
||||
/* Include library in order to compile the project */
|
||||
LD_LIBRARY_PATH = "$QTDIR/lib"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Check') {
|
||||
steps { sh 'make tests-nim-linux' }
|
||||
}
|
||||
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
env.PKG_URL = "${currentBuild.absoluteUrl}/consoleText"
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success { script { github.notifyPR(true) } }
|
||||
failure { script { github.notifyPR(false) } }
|
||||
cleanup { cleanWs() }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue