test(@general): run squish test on ci
This commit is contained in:
parent
c3e345445c
commit
3fad95ea0e
2
Makefile
2
Makefile
|
@ -174,7 +174,6 @@ ifeq ($(detected_OS),Darwin)
|
|||
endif
|
||||
endif
|
||||
|
||||
|
||||
RELEASE ?= false
|
||||
ifeq ($(RELEASE),false)
|
||||
# We need `-d:debug` to get Nim's default stack traces
|
||||
|
@ -222,7 +221,6 @@ $(STATUSGO): | deps
|
|||
+ cd vendor/status-go && \
|
||||
$(MAKE) statusgo-shared-library $(HANDLE_OUTPUT)
|
||||
|
||||
|
||||
STATUSKEYCARDGO := vendor/status-keycard-go/build/libkeycard/libkeycard.$(LIBSTATUS_EXT)
|
||||
STATUSKEYCARDGO_LIBDIR := $(shell pwd)/$(shell dirname "$(STATUSKEYCARDGO)")
|
||||
export STATUSKEYCARDGO_LIBDIR
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
library 'status-jenkins-lib@v1.3.4'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
parameters {
|
||||
booleanParam(
|
||||
name: 'RELEASE',
|
||||
description: 'Decides whether binaries are built with debug symbols.',
|
||||
defaultValue: params.RELEASE ?: false
|
||||
)
|
||||
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: 60, unit: 'MINUTES')
|
||||
/* manage how many builds we keep */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '30',
|
||||
artifactNumToKeepStr: '3',
|
||||
))
|
||||
}
|
||||
|
||||
environment {
|
||||
TARGET = 'e2e'
|
||||
/* 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"
|
||||
/* Control output the filename */
|
||||
STATUS_CLIENT_APPIMAGE = "pkg/${utils.pkgFilename(ext: 'AppImage')}"
|
||||
STATUS_CLIENT_TARBALL = "pkg/${utils.pkgFilename(ext: 'tar.gz')}"
|
||||
/* Include library in order to compile the project */
|
||||
LD_LIBRARY_PATH = "$QTDIR/lib:$WORKSPACE/vendor/status-go/build/bin:$WORKSPACE/vendor/status-keycard-go/build/libkeycard/"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Deps') {
|
||||
steps {
|
||||
/* trigger fetching of git submodules */
|
||||
sh 'make check-pkg-target-linux'
|
||||
/* TODO: Re-add caching of Nim compiler. */
|
||||
sh 'make deps'
|
||||
}
|
||||
}
|
||||
|
||||
stage('status-go') {
|
||||
steps { sh 'make status-go' }
|
||||
}
|
||||
|
||||
stage('build') {
|
||||
steps { sh 'make' }
|
||||
}
|
||||
|
||||
stage('Tests') {
|
||||
steps {
|
||||
wrap([$class: 'Xvfb']) {
|
||||
script {
|
||||
def res = squish([
|
||||
extraOptions: '''--config
|
||||
addAUT
|
||||
nim_status_client
|
||||
${WORKSPACE}/bin
|
||||
''',
|
||||
squishPackageName: 'squish-6.7.2-qt514x-linux64',
|
||||
testSuite: '${WORKSPACE}/test/ui-test/testSuites/*',
|
||||
abortOnFail: true,
|
||||
])
|
||||
if ( res != "SUCCESS" ) {
|
||||
throw new Exception("squish test didn't end with success")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success { script { github.notifyPR(true) } }
|
||||
failure { script { github.notifyPR(false) } }
|
||||
always { cleanWs() }
|
||||
}
|
||||
}
|
|
@ -10,13 +10,28 @@ function check_version {
|
|||
fi
|
||||
}
|
||||
|
||||
function install_dependencies {
|
||||
echo "Install dependencies"
|
||||
function install_build_dependencies {
|
||||
echo "Install build dependencies"
|
||||
apt update
|
||||
apt install -yq git build-essential python3.8 python3-pip pkg-config mesa-common-dev \
|
||||
libglu1-mesa-dev wget libpcsclite-dev libpcre3-dev libssl-dev libpulse-mainloop-glib0 \
|
||||
libxkbcommon-x11-dev extra-cmake-modules cmake
|
||||
}
|
||||
|
||||
function install_release_dependencies {
|
||||
echo "Install release dependencies"
|
||||
mkdir -p /usr/local/bin
|
||||
curl -Lo/usr/local/bin/linuxdeployqt "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
chmod a+x /usr/local/bin/linuxdeployqt
|
||||
|
||||
apt install -yq gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
|
||||
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools \
|
||||
gstreamer1.0-alsa gstreamer1.0-pulseaudio
|
||||
}
|
||||
|
||||
function install_runtime_dependencies {
|
||||
echo "Install runtime dependencies"
|
||||
apt install -yq libxcomposite-dev
|
||||
}
|
||||
|
||||
function install_qt {
|
||||
|
@ -27,14 +42,16 @@ function install_qt {
|
|||
}
|
||||
|
||||
function install_golang {
|
||||
if ! [[ -x "$(command -v go)" ]]; then
|
||||
echo "Install GoLang"
|
||||
export GOLANG_SHA256="6e5203fbdcade4aa4331e441fd2e1db8444681a6a6c72886a37ddd11caa415d4"
|
||||
export GOLANG_TARBALL="go1.17.12.linux-amd64.tar.gz"
|
||||
export GOLANG_SHA256="006f6622718212363fa1ff004a6ab4d87bbbe772ec5631bab7cac10be346e4f1"
|
||||
export GOLANG_TARBALL="go1.18.5.linux-arm64.tar.gz"
|
||||
wget -q "https://dl.google.com/go/${GOLANG_TARBALL}"
|
||||
echo "${GOLANG_SHA256} ${GOLANG_TARBALL}" | sha256sum -c
|
||||
tar -C /usr/local -xzf "${GOLANG_TARBALL}"
|
||||
rm "${GOLANG_TARBALL}"
|
||||
ln -s /usr/local/go/bin/go /usr/local/bin
|
||||
fi
|
||||
}
|
||||
|
||||
function success_message {
|
||||
|
@ -44,14 +61,16 @@ SUCCESS!
|
|||
Before you attempt to build status-dektop you'll need a few environment variables set:
|
||||
|
||||
export QTDIR=/opt/qt/5.14.2/gcc_64
|
||||
export PATH=\$PATH:\$QTDIR:\$QTDIR/bin
|
||||
export PATH=\$QTDIR:\$QTDIR/bin:\$PATH
|
||||
"
|
||||
echo $msg
|
||||
}
|
||||
|
||||
if [ "$0" = "$BASH_SOURCE" ]; then
|
||||
check_version
|
||||
install_dependencies
|
||||
install_build_dependencies
|
||||
install_release_dependencies
|
||||
install_runtime_dependencies
|
||||
install_qt
|
||||
install_golang
|
||||
success_message
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
AUT=nim_status_client
|
||||
CWD=<CWD_of_Server>
|
||||
ENVVARS=envvars
|
||||
HOOK_SUB_PROCESSES=false
|
||||
IMPLICITAUTSTART=0
|
||||
|
|
Loading…
Reference in New Issue