@@ -7,49 +7,75 @@ pipeline {
7
7
}
8
8
environment {
9
9
CCACHE_DIR = ' /tmp/.ccache'
10
+ HOST = ' x86_64-linux-gnu'
10
11
}
11
12
stages {
12
13
stage(' Build dependencies' ) {
13
14
steps {
14
15
sh ' git clean -d -f -f -q -x'
15
16
dir(' depends' ) {
16
- sh ' make -j`nproc` HOST=x86_64-linux-gnu '
17
+ sh ' make -j`nproc` HOST=${HOST} '
17
18
}
18
19
}
19
20
}
20
21
stage(' Build' ) {
21
22
steps {
22
- sh ' ./autogen.sh'
23
- sh ' ./configure --prefix=`pwd`/depends/x86_64-linux-gnu'
24
- sh ' make dist'
25
- sh ' mkdir -p dist'
26
- sh ' tar -C dist --strip-components=1 -xzf firo-*.tar.gz'
27
- dir(' dist' ) {
28
- sh ' ./configure --prefix=`pwd`/../depends/x86_64-linux-gnu --enable-tests --enable-crash-hooks'
23
+ sh '''
24
+ export HOST_TRIPLET=${HOST}
25
+ env PKG_CONFIG_PATH="$(pwd)/depends/$HOST_TRIPLET/lib/pkgconfig:$PKG_CONFIG_PATH" \\
26
+ cmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/depends/$HOST_TRIPLET/toolchain.cmake \\
27
+ -DBUILD_CLI=ON -DBUILD_TESTS=ON -DBUILD_GUI=ON -DCMAKE_BUILD_TYPE=Release \\
28
+ -DCLIENT_VERSION_IS_RELEASE=true -DENABLE_CRASH_HOOKS=ON \\
29
+ -S$(pwd) -B$(pwd)/build
30
+ '''
31
+ dir(' build' ) {
29
32
sh ' make -j`nproc`'
30
33
}
31
34
}
32
35
}
33
36
stage(' Test' ) {
34
37
steps {
35
38
catchError(buildResult : ' FAILURE' , stageResult : ' FAILURE' ){
36
- dir(' dist ' ) {
37
- sh ' make check '
39
+ dir(' build ' ) {
40
+ sh ' make test '
38
41
}
39
42
}
40
43
}
41
44
}
42
45
stage(' Archive unit tests logs' ) {
43
46
steps {
44
- archiveArtifacts artifacts : ' dist/src/test-suite.log' ,
45
- allowEmptyArchive : true
47
+ script {
48
+ sh '''
49
+ mkdir -p test-logs
50
+ find build -name "LastTest.log" -exec cp {} test-logs/ctest-last.log \\ ; || true
51
+ find build -name "LastTestsFailed.log" -exec cp {} test-logs/ctest-failed.log \\ ; || true
52
+ find build -path "*/Testing/Temporary/*" -name "*.log" -exec cp {} test-logs/ \\ ; || true
53
+ find build -name "*test*.log" -exec cp {} test-logs/ \\ ; || true
54
+ '''
46
55
}
56
+ archiveArtifacts artifacts : ' test-logs/**' ,
57
+ allowEmptyArchive : true
58
+ }
47
59
}
48
60
stage(' RPC Tests' ) {
49
61
steps {
50
- dir(' dist' ) {
51
- sh ' qa/pull-tester/rpc-tests.py -extended'
62
+ sh '''
63
+ export FIROD="$(pwd)/build/bin/firod"
64
+ export FIROCLI="$(pwd)/build/bin/firo-cli"
65
+ qa/pull-tester/rpc-tests.py -extended
66
+ '''
67
+ }
68
+ }
69
+ stage(' Archive Binaries' ) {
70
+ steps {
71
+ script {
72
+ sh '''
73
+ mkdir -p artifacts
74
+ cp build/bin/firo* artifacts/ || true
75
+ '''
52
76
}
77
+ archiveArtifacts artifacts : ' artifacts/**' ,
78
+ allowEmptyArchive : true
53
79
}
54
80
}
55
81
}
0 commit comments