-
-
Notifications
You must be signed in to change notification settings - Fork 368
Expand file tree
/
Copy pathJenkinsfile
More file actions
82 lines (82 loc) · 2.77 KB
/
Copy pathJenkinsfile
File metadata and controls
82 lines (82 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
pipeline {
agent {
docker {
image 'firoorg/firo-builder-depends:latest'
alwaysPull true
}
}
environment {
CCACHE_DIR = '/tmp/.ccache'
HOST = 'x86_64-linux-gnu'
}
stages {
stage('Build dependencies') {
steps {
sh 'git clean -d -f -f -q -x'
dir('depends') {
sh 'make -j`nproc` HOST=${HOST}'
}
}
}
stage('Build') {
steps {
sh '''
export HOST_TRIPLET=${HOST}
env PKG_CONFIG_PATH="$(pwd)/depends/$HOST_TRIPLET/lib/pkgconfig:$PKG_CONFIG_PATH" \\
cmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/depends/$HOST_TRIPLET/toolchain.cmake \\
-DBUILD_CLI=ON -DBUILD_TESTS=ON -DBUILD_GUI=ON -DCMAKE_BUILD_TYPE=Release \\
-DCLIENT_VERSION_IS_RELEASE=true -DENABLE_CRASH_HOOKS=ON \\
-S$(pwd) -B$(pwd)/build
'''
dir('build') {
sh 'make -j`nproc`'
}
}
}
stage('Test') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE'){
dir('build') {
sh 'make test'
}
}
}
}
stage('Archive unit tests logs') {
steps {
script {
sh '''
mkdir -p test-logs
find build -name "LastTest.log" -exec cp {} test-logs/ctest-last.log \\; || true
find build -name "LastTestsFailed.log" -exec cp {} test-logs/ctest-failed.log \\; || true
find build -path "*/Testing/Temporary/*" -name "*.log" -exec cp {} test-logs/ \\; || true
find build -name "*test*.log" -exec cp {} test-logs/ \\; || true
'''
}
archiveArtifacts artifacts: 'test-logs/**',
allowEmptyArchive: true
}
}
stage('RPC Tests') {
steps {
sh '''
export FIROD="$(pwd)/build/bin/firod"
export FIROCLI="$(pwd)/build/bin/firo-cli"
qa/pull-tester/rpc-tests.py -extended
'''
}
}
stage('Archive Binaries') {
steps {
script {
sh '''
mkdir -p artifacts
cp build/bin/firo* artifacts/ || true
'''
}
archiveArtifacts artifacts: 'artifacts/**',
allowEmptyArchive: true
}
}
}
}