blob: 4ed83389ae22f07fe1fc22230cbfa1319bf7df46 [file] [log] [blame]
Jiayu Liubcac9782022-05-07 08:35:09 +08001name: "Build"
Jiayu Liuc77d91a2022-05-03 20:55:50 +08002
Jiayu Liu6a61c4e2022-04-29 01:25:39 +08003on:
4 push:
Jiayu Liubcac9782022-05-07 08:35:09 +08005 branches: ["*"]
Jiayu Liu6a61c4e2022-04-29 01:25:39 +08006 pull_request:
Jiayu Liubcac9782022-05-07 08:35:09 +08007 branches: ["*"]
Jiayu Liuc77d91a2022-05-03 20:55:50 +08008
9env:
Jiayu Liuab83ffc2022-05-10 01:56:30 +080010 BUILD_DEPS: automake bison flex git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config
Jiayu Liu1e3d90d2023-04-14 23:57:33 +080011 CONFIG_ARGS_FOR_LIBS: >
12 --disable-debug
Jiayu Liu1e3d90d2023-04-14 23:57:33 +080013 --disable-dependency-tracking
14 --without-cpp
15 --without-c_glib
16 --without-java
17 --without-kotlin
18 --without-python
19 --without-py3
20 --without-ruby
21 --without-haxe
22 --without-netstd
23 --without-perl
24 --without-php
25 --without-php_extension
26 --without-dart
27 --without-erlang
28 --without-go
29 --without-d
30 --without-nodejs
31 --without-nodets
32 --without-lua
33 --without-rs
34 --without-swift
Jiayu Liuc77d91a2022-05-03 20:55:50 +080035
Varun Sharmabd1e5db2022-09-14 07:31:30 -070036permissions:
37 contents: read
38
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080039jobs:
40 # TODO windows and macos
Jiayu Liuc77d91a2022-05-03 20:55:50 +080041 compiler:
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080042 strategy:
Jiayu Liuc77d91a2022-05-03 20:55:50 +080043 matrix:
Jiayu Liu564b2872022-10-12 11:42:38 +080044 os: [ubuntu-20.04, ubuntu-22.04]
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -070045 fail-fast: false
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080046 runs-on: ${{ matrix.os }}
47 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -040048 - uses: actions/checkout@v4
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080049
50 - name: Install dependencies
51 run: |
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080052 sudo apt-get update -yq
Jiayu Liuab83ffc2022-05-10 01:56:30 +080053 sudo apt-get install -y --no-install-recommends g++ $BUILD_DEPS
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080054
55 - name: Run bootstrap
56 run: ./bootstrap.sh
57
58 - name: Run configure
59 run: ./configure --disable-debug --disable-tests --disable-libs
60
61 - name: Run make
62 run: make -j$(nproc)
63
64 - name: Run install
65 run: make install
66
67 - name: Run thrift version
68 run: /usr/local/bin/thrift -version
Jiayu Liuc77d91a2022-05-03 20:55:50 +080069
70 # only upload while building ubuntu-20.04
71 - name: Archive built thrift compiler
72 if: matrix.os == 'ubuntu-20.04'
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -080073 uses: actions/upload-artifact@v3
Jiayu Liuc77d91a2022-05-03 20:55:50 +080074 with:
75 name: thrift-compiler
76 path: compiler/cpp/thrift
77 retention-days: 3
78
Volodymyr Panivko8e828c02024-02-19 11:34:48 +010079 lib-php:
80 needs: compiler
81 runs-on: ubuntu-20.04
82 strategy:
83 matrix:
vladimir.panivkof6927022024-02-24 17:12:10 +010084 php-version: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
Volodymyr Panivko8e828c02024-02-19 11:34:48 +010085 fail-fast: false
86 steps:
87 - uses: actions/checkout@v4
88
89 - name: Set up PHP
90 uses: shivammathur/setup-php@v2
91 with:
92 php-version: ${{ matrix.php-version }}
93 extensions: mbstring, intl, xml
94
95 - name: Install Dependencies
96 run: composer install
97
Volodymyr Panivko8e828c02024-02-19 11:34:48 +010098 - name: Run bootstrap
99 run: ./bootstrap.sh
100
101 - name: Run configure
102 run: |
103 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-php/with-php/' | sed 's/without-php_extension/with-php_extension/' )
104
105 - uses: actions/download-artifact@v3
106 with:
107 name: thrift-compiler
108 path: compiler/cpp
109
110 - name: Run thrift-compiler
111 run: |
112 chmod a+x compiler/cpp/thrift
113 compiler/cpp/thrift -version
114
115 - name: Build Thrift Classes
116 run: |
117 mkdir -p ./lib/php/test/Resources/packages/php
118 mkdir -p ./lib/php/test/Resources/packages/phpv
119 mkdir -p ./lib/php/test/Resources/packages/phpvo
120 mkdir -p ./lib/php/test/Resources/packages/phpjs
121 compiler/cpp/thrift --gen php -r --out ./lib/php/test/Resources/packages/php lib/php/test/Resources/ThriftTest.thrift
122 compiler/cpp/thrift --gen php:validate -r --out ./lib/php/test/Resources/packages/phpv lib/php/test/Resources/ThriftTest.thrift
123 compiler/cpp/thrift --gen php:validate,oop -r --out ./lib/php/test/Resources/packages/phpvo lib/php/test/Resources/ThriftTest.thrift
124 compiler/cpp/thrift --gen php:json -r --out ./lib/php/test/Resources/packages/phpjs lib/php/test/Resources/ThriftTest.thrift
125
126 - name: Run Tests
127 run: vendor/bin/phpunit -c lib/php/phpunit.xml
128
Jiayu Liud21e95a2022-10-09 08:49:29 +0800129 lib-go:
130 needs: compiler
131 runs-on: ubuntu-20.04
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700132 strategy:
133 matrix:
134 go:
Yuxuan 'fishy' Wangdc733fa2023-06-23 09:29:25 -0700135 - '1.21'
Yuxuan 'fishy' Wang875178c2023-11-17 12:36:31 -0800136 - '1.22'
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700137 fail-fast: false
Jiayu Liud21e95a2022-10-09 08:49:29 +0800138 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400139 - uses: actions/checkout@v4
Jiayu Liud21e95a2022-10-09 08:49:29 +0800140
dependabot[bot]1ebfcf82024-01-03 16:59:31 +0000141 - uses: actions/setup-go@v5
Jiayu Liud21e95a2022-10-09 08:49:29 +0800142 with:
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700143 go-version: ${{ matrix.go }}
Jiayu Liud21e95a2022-10-09 08:49:29 +0800144
145 - name: Install dependencies
146 run: |
147 sudo apt-get update -yq
148 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
149
150 - name: Run bootstrap
151 run: ./bootstrap.sh
152
153 - name: Run configure
154 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800155 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-go/with-go/')
Jiayu Liud21e95a2022-10-09 08:49:29 +0800156
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800157 - uses: actions/download-artifact@v3
Jiayu Liud21e95a2022-10-09 08:49:29 +0800158 with:
159 name: thrift-compiler
160 path: compiler/cpp
161
162 - name: Run thrift-compiler
163 run: |
164 chmod a+x compiler/cpp/thrift
165 compiler/cpp/thrift -version
166
167 - name: Run make for go
168 run: make -C lib/go
169
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700170 - name: Run make check for lib/go
Jiayu Liud21e95a2022-10-09 08:49:29 +0800171 run: make -C lib/go check
172
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700173 - name: Run make check for test/go
174 run: make -C test/go check
175
Jiayu Liud21e95a2022-10-09 08:49:29 +0800176 - name: Run make precross for go test
177 run: make -C test/go precross
178
179 - name: Upload go precross artifacts
Yuxuan 'fishy' Wang875178c2023-11-17 12:36:31 -0800180 if: matrix.go == '1.22'
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800181 uses: actions/upload-artifact@v3
Jiayu Liud21e95a2022-10-09 08:49:29 +0800182 with:
183 name: go-precross
184 if-no-files-found: error
185 path: |
186 test/go/bin/*
187 retention-days: 3
188
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800189 lib-java-kotlin:
190 needs: compiler
191 runs-on: ubuntu-20.04
192 env:
Jiayu Liud40dd722023-10-19 08:37:49 +0800193 GRADLE_VERSION: "8.4"
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800194 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400195 - uses: actions/checkout@v4
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800196
dependabot[bot]f4b6d962023-12-01 06:30:44 +0000197 - uses: actions/setup-java@v4
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800198 with:
199 distribution: temurin
Jiayu Liu92b007f2022-10-14 13:16:18 +0800200 java-version: 17
Jiayu Liubcac9782022-05-07 08:35:09 +0800201 cache: "gradle"
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800202
203 - name: Install dependencies
204 run: |
205 sudo apt-get update -yq
206 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
207 sudo apt-get install -y wget unzip ant maven
208
209 - name: Setup gradle
210 run: |
211 wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip
Jiayu Liud40dd722023-10-19 08:37:49 +0800212 (echo "3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800213 unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
214 sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
215 sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin
216 gradle --version
217
Jiayu Liubcac9782022-05-07 08:35:09 +0800218 - name: Run spotlessCheck for Java
Jiayu Liu53ec0822022-05-06 12:56:42 +0800219 run: |
220 cd lib/java
221 gradle spotlessCheck
222
Jiayu Liubcac9782022-05-07 08:35:09 +0800223 - name: Run ktfmtCheck for Kotlin
224 run: |
225 cd lib/kotlin
226 gradle ktfmtCheck
227
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800228 - name: Run bootstrap
229 run: ./bootstrap.sh
230
231 - name: Run configure
232 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800233 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-java/with-java/' | sed 's/without-kotlin/with-kotlin/')
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800234
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800235 - uses: actions/download-artifact@v3
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800236 with:
237 name: thrift-compiler
238 path: compiler/cpp
239
240 - name: Run thrift-compiler
241 run: |
242 chmod a+x compiler/cpp/thrift
243 compiler/cpp/thrift -version
244
Jiayu Liubcac9782022-05-07 08:35:09 +0800245 - name: Run make for java
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800246 run: make -C lib/java
247
Jiayu Liu5b158382022-05-12 00:20:37 +0800248 # this will invoke publishToMavenLocal and install locally
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800249 - name: Run make install for java
250 run: make -C lib/java install
251
252 - name: Upload java libthrift artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800253 uses: actions/upload-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800254 with:
255 name: libthrift
256 if-no-files-found: error
257 path: ~/.m2/repository/org/apache/thrift
258
Jiayu Liubcac9782022-05-07 08:35:09 +0800259 - name: Run make check for java
260 run: make -C lib/java check
261
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800262 - name: Run make precross for java
263 run: make -C lib/java precross
264
265 - name: Upload java precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800266 uses: actions/upload-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800267 with:
268 name: java-precross
269 if-no-files-found: error
270 path: |
271 lib/java/build/functionalTestJar/
272 lib/java/build/runclient
273 lib/java/build/runnonblockingserver
274 lib/java/build/runserver
275 lib/java/build/runservletserver
276 retention-days: 3
277
Jiayu Liubcac9782022-05-07 08:35:09 +0800278 - name: Run make for kotlin
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800279 run: make -C lib/kotlin
Jiayu Liubcac9782022-05-07 08:35:09 +0800280
281 - name: Run make check for kotlin
282 run: make -C lib/kotlin check
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800283
284 - name: Run make precross for kotlin
285 run: make -C lib/kotlin precross
286
287 - name: Upload kotlin precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800288 uses: actions/upload-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800289 with:
290 name: kotlin-precross
291 if-no-files-found: error
292 path: |
293 lib/kotlin/cross-test-client/build/install/TestClient/
294 lib/kotlin/cross-test-server/build/install/TestServer/
295 retention-days: 3
296
Kino Roya9da9eb2022-10-07 23:13:01 -0700297 lib-swift:
298 needs: compiler
299 runs-on: ubuntu-20.04
300 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400301 - uses: actions/checkout@v4
Jiayu Liud21e95a2022-10-09 08:49:29 +0800302
Kino Roya9da9eb2022-10-07 23:13:01 -0700303 - name: Run bootstrap
304 run: ./bootstrap.sh
305
306 - name: Run configure
307 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800308 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-swift/with-swift/')
Jiayu Liud21e95a2022-10-09 08:49:29 +0800309
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800310 - uses: actions/download-artifact@v3
Kino Roya9da9eb2022-10-07 23:13:01 -0700311 with:
312 name: thrift-compiler
313 path: compiler/cpp
314
315 - name: Run thrift-compiler
316 run: |
317 chmod a+x compiler/cpp/thrift
318 compiler/cpp/thrift -version
Jiayu Liud21e95a2022-10-09 08:49:29 +0800319
Kino Roya9da9eb2022-10-07 23:13:01 -0700320 - name: Run make precross for swift
321 run: make -C test/swift precross
322
323 - name: Upload swift precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800324 uses: actions/upload-artifact@v3
Kino Roya9da9eb2022-10-07 23:13:01 -0700325 with:
326 name: swift-precross
327 if-no-files-found: error
328 path: |
329 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestServer
330 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestClient
331 retention-days: 3
332
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800333 lib-rust:
334 needs: compiler
335 runs-on: ubuntu-20.04
336 env:
Jiayu Liufbfa52c2023-11-07 13:47:24 +0800337 TOOLCHAIN_VERSION: 1.65.0
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800338 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400339 - uses: actions/checkout@v4
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800340
341 - name: Install dependencies
342 run: |
343 sudo apt-get update -yq
344 sudo apt-get install -y --no-install-recommends curl $BUILD_DEPS
345
346 - name: Setup cargo
347 run: |
348 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
349 rustup update
350 rustup install $TOOLCHAIN_VERSION
351 rustup default $TOOLCHAIN_VERSION
352 rustup --version
353 cargo --version
354 rustc --version
355
356 - name: Run bootstrap
357 run: ./bootstrap.sh
358
359 - name: Run configure
360 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800361 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-rs/with-rs/')
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800362
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800363 - uses: actions/download-artifact@v3
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800364 with:
365 name: thrift-compiler
366 path: compiler/cpp
367
368 - name: Run thrift-compiler
369 run: |
370 chmod a+x compiler/cpp/thrift
371 compiler/cpp/thrift -version
372
373 - name: Run make for rust
374 run: make -C lib/rs
375
376 - name: Run make check for rust
377 run: make -C lib/rs check
378
379 - name: Run make test for rust
380 run: make -C lib/rs/test check
381
382 - name: Run make precross for test rust
383 run: make -C test/rs precross
384
385 - name: Upload rust precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800386 uses: actions/upload-artifact@v3
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800387 with:
388 name: rs-precross
389 if-no-files-found: error
390 path: |
391 test/rs/bin/test_server
392 test/rs/bin/test_client
393 retention-days: 3
394
395 - name: Run make test_recursive for rust
396 run: make -C lib/rs/test_recursive check
397
Jiayu Liu6f339002023-04-20 07:39:35 +0800398 lib-python:
399 needs: compiler
400 runs-on: ubuntu-20.04
401 strategy:
402 matrix:
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700403 python-version:
404 - "3.x"
405 fail-fast: false
Jiayu Liu6f339002023-04-20 07:39:35 +0800406 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400407 - uses: actions/checkout@v4
Jiayu Liu6f339002023-04-20 07:39:35 +0800408
409 - name: Install dependencies
410 run: |
411 sudo apt-get update -yq
412 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
413 sudo apt-get install -y --no-install-recommends curl openssl ca-certificates
414
415 - name: Set up Python
dependabot[bot]30c28452024-01-03 16:59:14 +0000416 uses: actions/setup-python@v5
Jiayu Liu6f339002023-04-20 07:39:35 +0800417 with:
418 python-version: ${{ matrix.python-version }}
419
420 - name: Python setup
421 run: |
422 python -m pip install --upgrade pip setuptools wheel flake8 tornado twisted zope.interface
423 python --version
424 pip --version
425
Jiayu Liu6f339002023-04-20 07:39:35 +0800426 - name: Run bootstrap
427 run: ./bootstrap.sh
428
Jiayu Liu6f339002023-04-20 07:39:35 +0800429 - name: Run configure 3.x
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700430 if: matrix.python-version == '3.x'
Jiayu Liu6f339002023-04-20 07:39:35 +0800431 run: |
432 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-py3/with-py3/')
433
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800434 - uses: actions/download-artifact@v3
Jiayu Liu6f339002023-04-20 07:39:35 +0800435 with:
436 name: thrift-compiler
437 path: compiler/cpp
438
439 - name: Run thrift-compiler
440 run: |
441 chmod a+x compiler/cpp/thrift
442 compiler/cpp/thrift -version
443
444 - name: Run make for python
445 run: make -C lib/py
446
447 - name: Run make install for python
448 run: sudo make -C lib/py install
449
450 # - name: Run make install-exec-hook for python
451 # run: sudo make -C lib/py install-exec-hook
452
453 - name: Run make check for python
454 run: make -C lib/py check
455
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800456 cross-test:
457 needs:
458 - lib-java-kotlin
Kino Roya9da9eb2022-10-07 23:13:01 -0700459 - lib-swift
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800460 - lib-rust
Jiayu Liud21e95a2022-10-09 08:49:29 +0800461 - lib-go
Jiayu Liu6f339002023-04-20 07:39:35 +0800462 - lib-python
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800463 runs-on: ubuntu-20.04
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800464 strategy:
465 matrix:
466 server_lang: ['java', 'kotlin', 'go', 'rs', 'swift']
467 # we always use comma join as many client langs as possible, to reduce the number of jobs
468 client_lang: ['java,kotlin', 'go,rs', 'swift']
469 fail-fast: false
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800470 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400471 - uses: actions/checkout@v4
Jiayu Liud21e95a2022-10-09 08:49:29 +0800472
dependabot[bot]30c28452024-01-03 16:59:14 +0000473 - uses: actions/setup-python@v5
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800474 with:
475 python-version: "3.x"
Jiayu Liud21e95a2022-10-09 08:49:29 +0800476
dependabot[bot]f4b6d962023-12-01 06:30:44 +0000477 - uses: actions/setup-java@v4
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800478 with:
479 distribution: temurin
Jiayu Liube73a572023-04-14 11:02:43 +0800480 # here we intentionally use an older version so that we also verify Java 17 compiles to it
Fokko Driesprong0b14a1b2023-04-14 11:06:15 +0200481 java-version: 8
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800482 cache: "gradle"
483
Jiayu Liud21e95a2022-10-09 08:49:29 +0800484 - name: Install openssl and certificates (for SSL tests)
485 run: |
486 sudo apt-get update -yq
487 sudo apt-get install -y --no-install-recommends openssl ca-certificates
488
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800489 - name: Download java precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800490 uses: actions/download-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800491 with:
492 name: java-precross
493 path: lib/java/build
494
495 - name: Download kotlin precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800496 uses: actions/download-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800497 with:
498 name: kotlin-precross
499 path: lib/kotlin
500
Kino Roya9da9eb2022-10-07 23:13:01 -0700501 - name: Download swift precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800502 uses: actions/download-artifact@v3
Kino Roya9da9eb2022-10-07 23:13:01 -0700503 with:
504 name: swift-precross
505 path: test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug
506
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800507 - name: Download rust precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800508 uses: actions/download-artifact@v3
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800509 with:
510 name: rs-precross
511 path: test/rs/bin
512
Jiayu Liud21e95a2022-10-09 08:49:29 +0800513 - name: Download go precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800514 uses: actions/download-artifact@v3
Jiayu Liud21e95a2022-10-09 08:49:29 +0800515 with:
516 name: go-precross
517 path: test/go/bin
518
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800519 - name: Set back executable flags
520 run: |
521 chmod a+x \
522 lib/java/build/run* \
523 lib/kotlin/cross-test-client/build/install/TestClient/bin/* \
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800524 lib/kotlin/cross-test-server/build/install/TestServer/bin/* \
Kino Roya9da9eb2022-10-07 23:13:01 -0700525 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/* \
Jiayu Liud21e95a2022-10-09 08:49:29 +0800526 test/rs/bin/* \
527 test/go/bin/*
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800528
529 - name: Run cross test
530 env:
531 THRIFT_CROSSTEST_CONCURRENCY: 4
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800532 run: |
533 python test/test.py \
534 --retry-count 5 \
535 --skip-known-failures \
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800536 --server ${{ matrix.server_lang }} \
537 --client ${{ matrix.client_lang }}
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800538
539 - name: Upload log files from failed cross test runs
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800540 uses: actions/upload-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800541 if: failure()
542 with:
543 name: cross-test-log
544 path: test/log/
545 retention-days: 3
Jiayu Liu6f339002023-04-20 07:39:35 +0800546