Skip to content

Commit c216d5c

Browse files
committed
WIP jenkins pipeline: include libs in nix build
1 parent 5d94047 commit c216d5c

File tree

3 files changed

+39
-23
lines changed

3 files changed

+39
-23
lines changed

assembly/cicd/jenkins/test-builds.groovy

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pipeline {
1515
chmod +x llvm.sh
1616
sudo ./llvm.sh 16 all
1717
*/
18-
timeout(time: 60, unit: 'MINUTES') {
18+
timeout(time: 90, unit: 'MINUTES') {
1919
sh '''
2020
cp assembly/native/build-ubuntu-20.04-shared.sh .
2121
chmod +x build-ubuntu-20.04-shared.sh
@@ -31,7 +31,7 @@ pipeline {
3131
label 'Ubuntu_x86-64'
3232
}
3333
steps {
34-
timeout(time: 60, unit: 'MINUTES') {
34+
timeout(time: 90, unit: 'MINUTES') {
3535
sh '''
3636
cp assembly/native/build-ubuntu-20.04-portable.sh .
3737
chmod +x build-ubuntu-20.04-portable.sh
@@ -47,13 +47,19 @@ pipeline {
4747
label 'Ubuntu_x86-64'
4848
}
4949
steps {
50-
timeout(time: 60, unit: 'MINUTES') {
50+
timeout(time: 90, unit: 'MINUTES') {
5151
sh '''
52-
cp assembly/nix/linux-x86-64-static.nix .
52+
cp assembly/nix/linux-x86-64* .
5353
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.11.tar.gz
5454
nix-build linux-x86-64-static.nix
55+
mkdir tmp
56+
cp ./result/* tmp/
57+
rm -rf result
58+
nix-build linux-x86-64-tonlib.nix
59+
cp ./result/libtonlibjson.so.0.5 tmp/
60+
cp ./result/libemulator.so tmp/
5561
'''
56-
sh 'zip -r ton-x86-64-linux-nix ./result/*'
62+
sh 'zip -r ton-x86-64-linux-nix ./tmp/*'
5763
archiveArtifacts artifacts: 'ton-x86-64-linux-nix.zip'
5864
}
5965
}
@@ -63,7 +69,7 @@ pipeline {
6369
label 'Ubuntu_arm64'
6470
}
6571
steps {
66-
timeout(time: 60, unit: 'MINUTES') {
72+
timeout(time: 90, unit: 'MINUTES') {
6773
sh '''
6874
cp assembly/native/build-ubuntu-20.04-shared.sh .
6975
chmod +x build-ubuntu-20.04-shared.sh
@@ -79,7 +85,7 @@ pipeline {
7985
label 'Ubuntu_arm64'
8086
}
8187
steps {
82-
timeout(time: 60, unit: 'MINUTES') {
88+
timeout(time: 90, unit: 'MINUTES') {
8389
sh '''
8490
cp assembly/native/build-ubuntu-20.04-portable.sh .
8591
chmod +x build-ubuntu-20.04-portable.sh
@@ -95,14 +101,20 @@ pipeline {
95101
label 'Ubuntu_arm64'
96102
}
97103
steps {
98-
timeout(time: 60, unit: 'MINUTES') {
104+
timeout(time: 90, unit: 'MINUTES') {
99105
sh '''
100-
cp assembly/nix/linux-x86-64-static.nix .
106+
cp assembly/nix/linux-x86-64* .
101107
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.11.tar.gz
102108
nix-build linux-x86-64-static.nix
109+
mkdir tmp
110+
cp ./result/* tmp/
111+
rm -rf result
112+
nix-build linux-x86-64-tonlib.nix
113+
cp ./result/libtonlibjson.so.0.5 tmp/
114+
cp ./result/libemulator.so tmp/
103115
'''
104-
sh 'zip -r ton-arm64-linux-nix ./result/*'
105-
archiveArtifacts artifacts: 'ton-arm64-linux-nix.zip'
116+
sh 'zip -r ton-arm64-linux-nix ./tmp/*'
117+
archiveArtifacts artifacts: 'ton-xarm64-linux-nix.zip'
106118
}
107119
}
108120
}
@@ -111,7 +123,7 @@ pipeline {
111123
label 'macOS_12.7_x86-64'
112124
}
113125
steps {
114-
timeout(time: 60, unit: 'MINUTES') {
126+
timeout(time: 90, unit: 'MINUTES') {
115127
sh '''
116128
cp assembly/native/build-macos-shared.sh .
117129
chmod +x build-macos-shared.sh
@@ -127,7 +139,7 @@ pipeline {
127139
label 'macOS_12.7_x86-64'
128140
}
129141
steps {
130-
timeout(time: 60, unit: 'MINUTES') {
142+
timeout(time: 90, unit: 'MINUTES') {
131143
sh '''
132144
cp assembly/native/build-macos-portable.sh .
133145
chmod +x build-macos-portable.sh
@@ -143,7 +155,7 @@ pipeline {
143155
label 'macOS_12.6.3-arm64'
144156
}
145157
steps {
146-
timeout(time: 60, unit: 'MINUTES') {
158+
timeout(time: 90, unit: 'MINUTES') {
147159
sh '''
148160
cp assembly/native/build-macos-shared.sh .
149161
chmod +x build-macos-shared.sh
@@ -159,7 +171,7 @@ pipeline {
159171
label 'macOS_12.6.3-arm64'
160172
}
161173
steps {
162-
timeout(time: 60, unit: 'MINUTES') {
174+
timeout(time: 90, unit: 'MINUTES') {
163175
sh '''
164176
cp assembly/native/build-macos-portable.sh .
165177
chmod +x build-macos-portable.sh
@@ -175,7 +187,7 @@ pipeline {
175187
label 'macOS_13.2-arm64-m2'
176188
}
177189
steps {
178-
timeout(time: 60, unit: 'MINUTES') {
190+
timeout(time: 90, unit: 'MINUTES') {
179191
sh '''
180192
cp assembly/native/build-macos-shared.sh .
181193
chmod +x build-macos-shared.sh
@@ -191,7 +203,7 @@ pipeline {
191203
label 'macOS_13.2-arm64-m2'
192204
}
193205
steps {
194-
timeout(time: 60, unit: 'MINUTES') {
206+
timeout(time: 90, unit: 'MINUTES') {
195207
sh '''
196208
cp assembly/native/build-macos-portable.sh .
197209
chmod +x build-macos-portable.sh
@@ -207,7 +219,7 @@ pipeline {
207219
label 'Windows_x86-64'
208220
}
209221
steps {
210-
timeout(time: 60, unit: 'MINUTES') {
222+
timeout(time: 90, unit: 'MINUTES') {
211223
bat '''
212224
copy assembly\\native\\build-windows-github.bat .
213225
copy assembly\\native\\build-windows.bat .
@@ -223,7 +235,7 @@ pipeline {
223235
label 'Ubuntu_x86-64'
224236
}
225237
steps {
226-
timeout(time: 60, unit: 'MINUTES') {
238+
timeout(time: 90, unit: 'MINUTES') {
227239
sh '''
228240
cp assembly/android/build-android-tonlib.sh .
229241
chmod +x build-android-tonlib.sh
@@ -239,7 +251,7 @@ pipeline {
239251
label 'Ubuntu_x86-64'
240252
}
241253
steps {
242-
timeout(time: 60, unit: 'MINUTES') {
254+
timeout(time: 90, unit: 'MINUTES') {
243255
sh '''
244256
cd assembly/wasm
245257
chmod +x fift-func-wasm-build-ubuntu.sh

assembly/nix/linux-x86-64-static.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
}:
99
pkgs.stdenv.mkDerivation { # gcc
1010
pname = "ton";
11-
version = "dev";
11+
version = "dev-bin";
1212

1313
src = ./.;
1414

assembly/nix/linux-x86-64-tonlib.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let
2525
in
2626
stdenv227.mkDerivation {
2727
pname = "ton";
28-
version = "dev";
28+
version = "dev-lib";
2929

3030
src = ./.;
3131

@@ -50,6 +50,10 @@ stdenv227.mkDerivation {
5050

5151
LDFLAGS = [
5252
"-static-libgcc" "-static-libstdc++" "-fPIC"
53-
];
53+
];
54+
55+
ninjaFlags = [
56+
"tonlibjson" "emulator"
57+
];
5458

5559
}

0 commit comments

Comments
 (0)