blob: b9afd502da198fbfbbb74194491d292cc992344a [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
Volodymyr Panivkoac52d8d2024-02-22 22:09:00 +010094 ini-values: "error_reporting=E_ALL"
Volodymyr Panivko8e828c02024-02-19 11:34:48 +010095
96 - name: Install Dependencies
97 run: composer install
98
Volodymyr Panivko8e828c02024-02-19 11:34:48 +010099 - name: Run bootstrap
100 run: ./bootstrap.sh
101
102 - name: Run configure
103 run: |
104 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-php/with-php/' | sed 's/without-php_extension/with-php_extension/' )
105
106 - uses: actions/download-artifact@v3
107 with:
108 name: thrift-compiler
109 path: compiler/cpp
110
111 - name: Run thrift-compiler
112 run: |
113 chmod a+x compiler/cpp/thrift
114 compiler/cpp/thrift -version
115
116 - name: Build Thrift Classes
117 run: |
118 mkdir -p ./lib/php/test/Resources/packages/php
119 mkdir -p ./lib/php/test/Resources/packages/phpv
120 mkdir -p ./lib/php/test/Resources/packages/phpvo
121 mkdir -p ./lib/php/test/Resources/packages/phpjs
122 compiler/cpp/thrift --gen php -r --out ./lib/php/test/Resources/packages/php lib/php/test/Resources/ThriftTest.thrift
123 compiler/cpp/thrift --gen php:validate -r --out ./lib/php/test/Resources/packages/phpv lib/php/test/Resources/ThriftTest.thrift
124 compiler/cpp/thrift --gen php:validate,oop -r --out ./lib/php/test/Resources/packages/phpvo lib/php/test/Resources/ThriftTest.thrift
125 compiler/cpp/thrift --gen php:json -r --out ./lib/php/test/Resources/packages/phpjs lib/php/test/Resources/ThriftTest.thrift
126
127 - name: Run Tests
128 run: vendor/bin/phpunit -c lib/php/phpunit.xml
129
Jiayu Liud21e95a2022-10-09 08:49:29 +0800130 lib-go:
131 needs: compiler
132 runs-on: ubuntu-20.04
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700133 strategy:
134 matrix:
135 go:
Yuxuan 'fishy' Wangdc733fa2023-06-23 09:29:25 -0700136 - '1.21'
Yuxuan 'fishy' Wang875178c2023-11-17 12:36:31 -0800137 - '1.22'
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700138 fail-fast: false
Jiayu Liud21e95a2022-10-09 08:49:29 +0800139 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400140 - uses: actions/checkout@v4
Jiayu Liud21e95a2022-10-09 08:49:29 +0800141
dependabot[bot]1ebfcf82024-01-03 16:59:31 +0000142 - uses: actions/setup-go@v5
Jiayu Liud21e95a2022-10-09 08:49:29 +0800143 with:
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700144 go-version: ${{ matrix.go }}
Jiayu Liud21e95a2022-10-09 08:49:29 +0800145
146 - name: Install dependencies
147 run: |
148 sudo apt-get update -yq
149 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
150
151 - name: Run bootstrap
152 run: ./bootstrap.sh
153
154 - name: Run configure
155 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800156 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-go/with-go/')
Jiayu Liud21e95a2022-10-09 08:49:29 +0800157
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800158 - uses: actions/download-artifact@v3
Jiayu Liud21e95a2022-10-09 08:49:29 +0800159 with:
160 name: thrift-compiler
161 path: compiler/cpp
162
163 - name: Run thrift-compiler
164 run: |
165 chmod a+x compiler/cpp/thrift
166 compiler/cpp/thrift -version
167
168 - name: Run make for go
169 run: make -C lib/go
170
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700171 - name: Run make check for lib/go
Jiayu Liud21e95a2022-10-09 08:49:29 +0800172 run: make -C lib/go check
173
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700174 - name: Run make check for test/go
175 run: make -C test/go check
176
Jiayu Liud21e95a2022-10-09 08:49:29 +0800177 - name: Run make precross for go test
178 run: make -C test/go precross
179
180 - name: Upload go precross artifacts
Yuxuan 'fishy' Wang875178c2023-11-17 12:36:31 -0800181 if: matrix.go == '1.22'
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800182 uses: actions/upload-artifact@v3
Jiayu Liud21e95a2022-10-09 08:49:29 +0800183 with:
184 name: go-precross
185 if-no-files-found: error
186 path: |
187 test/go/bin/*
188 retention-days: 3
189
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800190 lib-java-kotlin:
191 needs: compiler
192 runs-on: ubuntu-20.04
193 env:
Jiayu Liud40dd722023-10-19 08:37:49 +0800194 GRADLE_VERSION: "8.4"
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800195 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400196 - uses: actions/checkout@v4
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800197
dependabot[bot]f4b6d962023-12-01 06:30:44 +0000198 - uses: actions/setup-java@v4
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800199 with:
200 distribution: temurin
Jiayu Liu92b007f2022-10-14 13:16:18 +0800201 java-version: 17
Jiayu Liubcac9782022-05-07 08:35:09 +0800202 cache: "gradle"
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800203
204 - name: Install dependencies
205 run: |
206 sudo apt-get update -yq
207 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
208 sudo apt-get install -y wget unzip ant maven
209
210 - name: Setup gradle
211 run: |
212 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 +0800213 (echo "3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800214 unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
215 sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
216 sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin
217 gradle --version
218
Jiayu Liubcac9782022-05-07 08:35:09 +0800219 - name: Run spotlessCheck for Java
Jiayu Liu53ec0822022-05-06 12:56:42 +0800220 run: |
221 cd lib/java
222 gradle spotlessCheck
223
Jiayu Liubcac9782022-05-07 08:35:09 +0800224 - name: Run ktfmtCheck for Kotlin
225 run: |
226 cd lib/kotlin
227 gradle ktfmtCheck
228
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800229 - name: Run bootstrap
230 run: ./bootstrap.sh
231
232 - name: Run configure
233 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800234 ./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 +0800235
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800236 - uses: actions/download-artifact@v3
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800237 with:
238 name: thrift-compiler
239 path: compiler/cpp
240
241 - name: Run thrift-compiler
242 run: |
243 chmod a+x compiler/cpp/thrift
244 compiler/cpp/thrift -version
245
Jiayu Liubcac9782022-05-07 08:35:09 +0800246 - name: Run make for java
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800247 run: make -C lib/java
248
Jiayu Liu5b158382022-05-12 00:20:37 +0800249 # this will invoke publishToMavenLocal and install locally
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800250 - name: Run make install for java
251 run: make -C lib/java install
252
253 - name: Upload java libthrift artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800254 uses: actions/upload-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800255 with:
256 name: libthrift
257 if-no-files-found: error
258 path: ~/.m2/repository/org/apache/thrift
259
Jiayu Liubcac9782022-05-07 08:35:09 +0800260 - name: Run make check for java
261 run: make -C lib/java check
262
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800263 - name: Run make precross for java
264 run: make -C lib/java precross
265
266 - name: Upload java precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800267 uses: actions/upload-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800268 with:
269 name: java-precross
270 if-no-files-found: error
271 path: |
272 lib/java/build/functionalTestJar/
273 lib/java/build/runclient
274 lib/java/build/runnonblockingserver
275 lib/java/build/runserver
276 lib/java/build/runservletserver
277 retention-days: 3
278
Jiayu Liubcac9782022-05-07 08:35:09 +0800279 - name: Run make for kotlin
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800280 run: make -C lib/kotlin
Jiayu Liubcac9782022-05-07 08:35:09 +0800281
282 - name: Run make check for kotlin
283 run: make -C lib/kotlin check
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800284
285 - name: Run make precross for kotlin
286 run: make -C lib/kotlin precross
287
288 - name: Upload kotlin precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800289 uses: actions/upload-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800290 with:
291 name: kotlin-precross
292 if-no-files-found: error
293 path: |
294 lib/kotlin/cross-test-client/build/install/TestClient/
295 lib/kotlin/cross-test-server/build/install/TestServer/
296 retention-days: 3
297
Kino Roya9da9eb2022-10-07 23:13:01 -0700298 lib-swift:
299 needs: compiler
300 runs-on: ubuntu-20.04
301 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400302 - uses: actions/checkout@v4
Jiayu Liud21e95a2022-10-09 08:49:29 +0800303
Kino Roya9da9eb2022-10-07 23:13:01 -0700304 - name: Run bootstrap
305 run: ./bootstrap.sh
306
307 - name: Run configure
308 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800309 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-swift/with-swift/')
Jiayu Liud21e95a2022-10-09 08:49:29 +0800310
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800311 - uses: actions/download-artifact@v3
Kino Roya9da9eb2022-10-07 23:13:01 -0700312 with:
313 name: thrift-compiler
314 path: compiler/cpp
315
316 - name: Run thrift-compiler
317 run: |
318 chmod a+x compiler/cpp/thrift
319 compiler/cpp/thrift -version
Jiayu Liud21e95a2022-10-09 08:49:29 +0800320
Kino Roya9da9eb2022-10-07 23:13:01 -0700321 - name: Run make precross for swift
322 run: make -C test/swift precross
323
324 - name: Upload swift precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800325 uses: actions/upload-artifact@v3
Kino Roya9da9eb2022-10-07 23:13:01 -0700326 with:
327 name: swift-precross
328 if-no-files-found: error
329 path: |
330 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestServer
331 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestClient
332 retention-days: 3
333
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800334 lib-rust:
335 needs: compiler
336 runs-on: ubuntu-20.04
337 env:
Jiayu Liufbfa52c2023-11-07 13:47:24 +0800338 TOOLCHAIN_VERSION: 1.65.0
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800339 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400340 - uses: actions/checkout@v4
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800341
342 - name: Install dependencies
343 run: |
344 sudo apt-get update -yq
345 sudo apt-get install -y --no-install-recommends curl $BUILD_DEPS
346
347 - name: Setup cargo
348 run: |
349 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
350 rustup update
351 rustup install $TOOLCHAIN_VERSION
352 rustup default $TOOLCHAIN_VERSION
353 rustup --version
354 cargo --version
355 rustc --version
356
357 - name: Run bootstrap
358 run: ./bootstrap.sh
359
360 - name: Run configure
361 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800362 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-rs/with-rs/')
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800363
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800364 - uses: actions/download-artifact@v3
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800365 with:
366 name: thrift-compiler
367 path: compiler/cpp
368
369 - name: Run thrift-compiler
370 run: |
371 chmod a+x compiler/cpp/thrift
372 compiler/cpp/thrift -version
373
374 - name: Run make for rust
375 run: make -C lib/rs
376
377 - name: Run make check for rust
378 run: make -C lib/rs check
379
380 - name: Run make test for rust
381 run: make -C lib/rs/test check
382
383 - name: Run make precross for test rust
384 run: make -C test/rs precross
385
386 - name: Upload rust precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800387 uses: actions/upload-artifact@v3
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800388 with:
389 name: rs-precross
390 if-no-files-found: error
391 path: |
392 test/rs/bin/test_server
393 test/rs/bin/test_client
394 retention-days: 3
395
396 - name: Run make test_recursive for rust
397 run: make -C lib/rs/test_recursive check
398
Jiayu Liu6f339002023-04-20 07:39:35 +0800399 lib-python:
400 needs: compiler
401 runs-on: ubuntu-20.04
402 strategy:
403 matrix:
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700404 python-version:
405 - "3.x"
406 fail-fast: false
Jiayu Liu6f339002023-04-20 07:39:35 +0800407 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400408 - uses: actions/checkout@v4
Jiayu Liu6f339002023-04-20 07:39:35 +0800409
410 - name: Install dependencies
411 run: |
412 sudo apt-get update -yq
413 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
414 sudo apt-get install -y --no-install-recommends curl openssl ca-certificates
415
416 - name: Set up Python
dependabot[bot]30c28452024-01-03 16:59:14 +0000417 uses: actions/setup-python@v5
Jiayu Liu6f339002023-04-20 07:39:35 +0800418 with:
419 python-version: ${{ matrix.python-version }}
420
421 - name: Python setup
422 run: |
423 python -m pip install --upgrade pip setuptools wheel flake8 tornado twisted zope.interface
424 python --version
425 pip --version
426
Jiayu Liu6f339002023-04-20 07:39:35 +0800427 - name: Run bootstrap
428 run: ./bootstrap.sh
429
Jiayu Liu6f339002023-04-20 07:39:35 +0800430 - name: Run configure 3.x
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700431 if: matrix.python-version == '3.x'
Jiayu Liu6f339002023-04-20 07:39:35 +0800432 run: |
433 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-py3/with-py3/')
434
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800435 - uses: actions/download-artifact@v3
Jiayu Liu6f339002023-04-20 07:39:35 +0800436 with:
437 name: thrift-compiler
438 path: compiler/cpp
439
440 - name: Run thrift-compiler
441 run: |
442 chmod a+x compiler/cpp/thrift
443 compiler/cpp/thrift -version
444
445 - name: Run make for python
446 run: make -C lib/py
447
448 - name: Run make install for python
449 run: sudo make -C lib/py install
450
451 # - name: Run make install-exec-hook for python
452 # run: sudo make -C lib/py install-exec-hook
453
454 - name: Run make check for python
455 run: make -C lib/py check
456
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800457 cross-test:
458 needs:
459 - lib-java-kotlin
Kino Roya9da9eb2022-10-07 23:13:01 -0700460 - lib-swift
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800461 - lib-rust
Jiayu Liud21e95a2022-10-09 08:49:29 +0800462 - lib-go
Jiayu Liu6f339002023-04-20 07:39:35 +0800463 - lib-python
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800464 runs-on: ubuntu-20.04
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800465 strategy:
466 matrix:
467 server_lang: ['java', 'kotlin', 'go', 'rs', 'swift']
468 # we always use comma join as many client langs as possible, to reduce the number of jobs
469 client_lang: ['java,kotlin', 'go,rs', 'swift']
470 fail-fast: false
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800471 steps:
dependabot[bot]a14231c2023-10-04 18:33:29 -0400472 - uses: actions/checkout@v4
Jiayu Liud21e95a2022-10-09 08:49:29 +0800473
dependabot[bot]30c28452024-01-03 16:59:14 +0000474 - uses: actions/setup-python@v5
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800475 with:
476 python-version: "3.x"
Jiayu Liud21e95a2022-10-09 08:49:29 +0800477
dependabot[bot]f4b6d962023-12-01 06:30:44 +0000478 - uses: actions/setup-java@v4
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800479 with:
480 distribution: temurin
Jiayu Liube73a572023-04-14 11:02:43 +0800481 # here we intentionally use an older version so that we also verify Java 17 compiles to it
Fokko Driesprong0b14a1b2023-04-14 11:06:15 +0200482 java-version: 8
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800483 cache: "gradle"
484
Jiayu Liud21e95a2022-10-09 08:49:29 +0800485 - name: Install openssl and certificates (for SSL tests)
486 run: |
487 sudo apt-get update -yq
488 sudo apt-get install -y --no-install-recommends openssl ca-certificates
489
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800490 - name: Download java precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800491 uses: actions/download-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800492 with:
493 name: java-precross
494 path: lib/java/build
495
496 - name: Download kotlin precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800497 uses: actions/download-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800498 with:
499 name: kotlin-precross
500 path: lib/kotlin
501
Kino Roya9da9eb2022-10-07 23:13:01 -0700502 - name: Download swift precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800503 uses: actions/download-artifact@v3
Kino Roya9da9eb2022-10-07 23:13:01 -0700504 with:
505 name: swift-precross
506 path: test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug
507
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800508 - name: Download rust precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800509 uses: actions/download-artifact@v3
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800510 with:
511 name: rs-precross
512 path: test/rs/bin
513
Jiayu Liud21e95a2022-10-09 08:49:29 +0800514 - name: Download go precross artifacts
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800515 uses: actions/download-artifact@v3
Jiayu Liud21e95a2022-10-09 08:49:29 +0800516 with:
517 name: go-precross
518 path: test/go/bin
519
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800520 - name: Set back executable flags
521 run: |
522 chmod a+x \
523 lib/java/build/run* \
524 lib/kotlin/cross-test-client/build/install/TestClient/bin/* \
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800525 lib/kotlin/cross-test-server/build/install/TestServer/bin/* \
Kino Roya9da9eb2022-10-07 23:13:01 -0700526 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/* \
Jiayu Liud21e95a2022-10-09 08:49:29 +0800527 test/rs/bin/* \
528 test/go/bin/*
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800529
530 - name: Run cross test
531 env:
532 THRIFT_CROSSTEST_CONCURRENCY: 4
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800533 run: |
534 python test/test.py \
535 --retry-count 5 \
536 --skip-known-failures \
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800537 --server ${{ matrix.server_lang }} \
538 --client ${{ matrix.client_lang }}
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800539
540 - name: Upload log files from failed cross test runs
Yuxuan 'fishy' Wang3dcc0cd2024-01-08 14:11:25 -0800541 uses: actions/upload-artifact@v3
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800542 if: failure()
543 with:
544 name: cross-test-log
545 path: test/log/
546 retention-days: 3
Jiayu Liu6f339002023-04-20 07:39:35 +0800547