blob: 10bf9f56fe77107e35c7181a5d730934efe7fc4a [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:
Yuxuan 'fishy' Wang7e45f582025-04-17 08:41:21 -070044 os:
45 - ubuntu-22.04
46 - ubuntu-24.04
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -070047 fail-fast: false
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080048 runs-on: ${{ matrix.os }}
49 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +000050 - uses: actions/checkout@v6
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080051
52 - name: Install dependencies
53 run: |
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080054 sudo apt-get update -yq
Jiayu Liuab83ffc2022-05-10 01:56:30 +080055 sudo apt-get install -y --no-install-recommends g++ $BUILD_DEPS
Jiayu Liu6a61c4e2022-04-29 01:25:39 +080056
57 - name: Run bootstrap
58 run: ./bootstrap.sh
59
60 - name: Run configure
61 run: ./configure --disable-debug --disable-tests --disable-libs
62
63 - name: Run make
64 run: make -j$(nproc)
65
66 - name: Run install
67 run: make install
68
69 - name: Run thrift version
70 run: /usr/local/bin/thrift -version
Jiayu Liuc77d91a2022-05-03 20:55:50 +080071
Jens Geyer1e5fa4b2026-03-27 00:01:45 +010072 - name: Test Delphi UUIDv8 GUID determinism
73 run: |
74 # Run the Delphi generator twice on the same input and verify identical output.
75 # Tests: cross-platform determinism, service inheritance, struct field-order.
76 THRIFT=/usr/local/bin/thrift
77 INPUT=test/delphi/UuidV8Test.thrift
78
79 mkdir -p /tmp/delphi-guid-run1 /tmp/delphi-guid-run2
80 $THRIFT --gen delphi --out /tmp/delphi-guid-run1 $INPUT
81 $THRIFT --gen delphi --out /tmp/delphi-guid-run2 $INPUT
82 diff -r /tmp/delphi-guid-run1 /tmp/delphi-guid-run2
83
84 # Also verify GUIDs are non-empty (grep for the GUID attribute pattern)
85 grep -qP "^\s+\['\{[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}\}'\]" \
86 /tmp/delphi-guid-run1/UuidV8Test.pas \
87 && echo "UUIDv8 GUIDs found in output" \
88 || { echo "ERROR: No UUIDv8 GUIDs found in Delphi output"; exit 1; }
89
90 # Verify that Point and PointReversed have DIFFERENT GUIDs (field-order sensitivity)
91 POINT_GUID=$(grep -A1 "IPoint = interface" /tmp/delphi-guid-run1/UuidV8Test.pas | grep "^\s*\['" | tr -d ' ')
92 POINTREV_GUID=$(grep -A1 "IPointReversed = interface" /tmp/delphi-guid-run1/UuidV8Test.pas | grep "^\s*\['" | tr -d ' ')
93 [ "$POINT_GUID" != "$POINTREV_GUID" ] \
94 && echo "Field-order sensitivity OK (Point vs PointReversed GUIDs differ)" \
95 || { echo "ERROR: Point and PointReversed have the same GUID — field order not hashed"; exit 1; }
96
97 # Verify that BaseService and ExtendedService have DIFFERENT GUIDs (parent hash included)
98 BASE_GUID=$(grep -A1 "Iface = interface$" /tmp/delphi-guid-run1/UuidV8Test.pas | grep "^\s*\['" | head -1 | tr -d ' ')
99 EXT_GUID=$(grep -A1 "Iface = interface(.*Base" /tmp/delphi-guid-run1/UuidV8Test.pas | grep "^\s*\['" | head -1 | tr -d ' ')
100 [ "$BASE_GUID" != "$EXT_GUID" ] \
101 && echo "Parent-hash inclusion OK (BaseService vs ExtendedService GUIDs differ)" \
102 || { echo "ERROR: BaseService and ExtendedService have the same GUID — parent not hashed"; exit 1; }
103
104 echo "All Delphi UUIDv8 GUID determinism tests passed."
105
Jiayu Liue7f1a262024-11-06 11:37:25 +0800106 # only upload while building ubuntu-24.04
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800107 - name: Archive built thrift compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800108 if: matrix.os == 'ubuntu-24.04'
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000109 uses: actions/upload-artifact@v7
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800110 with:
111 name: thrift-compiler
112 path: compiler/cpp/thrift
113 retention-days: 3
114
Gregg Donovan62ec9292026-01-29 16:51:37 -0500115 compiler-macos:
116 strategy:
117 matrix:
118 os: &macos_versions [macos-15-intel, macos-14, macos-15, macos-26]
119 fail-fast: false
120 runs-on: ${{ matrix.os }}
121 steps:
122 - uses: actions/checkout@v6
123
124 - name: Install dependencies
125 run: |
126 brew install automake bison flex boost libevent openssl libtool pkg-config
127 echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
128
129 - name: Run bootstrap
130 run: ./bootstrap.sh
131
132 - name: Run configure
133 run: ./configure --disable-debug --disable-tests --disable-libs
134
135 - name: Run make
136 run: make -j$(sysctl -n hw.ncpu)
137
138 - name: Run install
139 run: sudo make install
140
141 - name: Run thrift version
142 run: /usr/local/bin/thrift -version
143
144 - name: Archive built thrift compiler (macOS)
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000145 uses: actions/upload-artifact@v7
Gregg Donovan62ec9292026-01-29 16:51:37 -0500146 with:
147 name: thrift-compiler-${{ matrix.os }}
148 path: compiler/cpp/thrift
149 retention-days: 3
150
Volodymyr Panivko8e828c02024-02-19 11:34:48 +0100151 lib-php:
152 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800153 runs-on: ubuntu-24.04
Volodymyr Panivko8e828c02024-02-19 11:34:48 +0100154 strategy:
155 matrix:
vladimir.panivkof6927022024-02-24 17:12:10 +0100156 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 +0100157 fail-fast: false
158 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000159 - uses: actions/checkout@v6
Volodymyr Panivko8e828c02024-02-19 11:34:48 +0100160
161 - name: Set up PHP
162 uses: shivammathur/setup-php@v2
163 with:
164 php-version: ${{ matrix.php-version }}
Volodymyr Panivko99130042024-03-02 21:41:01 +0100165 extensions: mbstring, intl, xml, curl
Volodymyr Panivkoac52d8d2024-02-22 22:09:00 +0100166 ini-values: "error_reporting=E_ALL"
Volodymyr Panivko8e828c02024-02-19 11:34:48 +0100167
168 - name: Install Dependencies
169 run: composer install
170
Volodymyr Panivko8e828c02024-02-19 11:34:48 +0100171 - name: Run bootstrap
172 run: ./bootstrap.sh
173
174 - name: Run configure
175 run: |
176 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-php/with-php/' | sed 's/without-php_extension/with-php_extension/' )
177
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000178 - uses: actions/download-artifact@v8
Volodymyr Panivko8e828c02024-02-19 11:34:48 +0100179 with:
180 name: thrift-compiler
181 path: compiler/cpp
182
183 - name: Run thrift-compiler
184 run: |
185 chmod a+x compiler/cpp/thrift
186 compiler/cpp/thrift -version
187
188 - name: Build Thrift Classes
189 run: |
190 mkdir -p ./lib/php/test/Resources/packages/php
191 mkdir -p ./lib/php/test/Resources/packages/phpv
192 mkdir -p ./lib/php/test/Resources/packages/phpvo
193 mkdir -p ./lib/php/test/Resources/packages/phpjs
Volodymyr Panivko14fc2be2024-02-22 18:17:40 +0100194 mkdir -p ./lib/php/test/Resources/packages/phpcm
Volodymyr Panivko68139d12024-03-19 23:14:07 +0100195 compiler/cpp/thrift --gen php:nsglobal="Basic" -r --out ./lib/php/test/Resources/packages/php lib/php/test/Resources/ThriftTest.thrift
196 compiler/cpp/thrift --gen php:validate,nsglobal="Validate" -r --out ./lib/php/test/Resources/packages/phpv lib/php/test/Resources/ThriftTest.thrift
197 compiler/cpp/thrift --gen php:validate,oop,nsglobal="ValidateOop" -r --out ./lib/php/test/Resources/packages/phpvo lib/php/test/Resources/ThriftTest.thrift
198 compiler/cpp/thrift --gen php:json,nsglobal="Json" -r --out ./lib/php/test/Resources/packages/phpjs lib/php/test/Resources/ThriftTest.thrift
199 compiler/cpp/thrift --gen php:classmap,server,rest,nsglobal="Classmap" -r --out ./lib/php/test/Resources/packages/phpcm lib/php/test/Resources/ThriftTest.thrift
Volodymyr Panivko8e828c02024-02-19 11:34:48 +0100200
201 - name: Run Tests
202 run: vendor/bin/phpunit -c lib/php/phpunit.xml
203
Volodymyr Panivko76113eb2026-03-26 21:57:29 +0100204 - name: Build PHP cross test extension
205 if: matrix.php-version == '8.3'
206 run: make -C lib/php src/ext/thrift_protocol/modules/thrift_protocol.so
207
208 - name: Run make precross for php test
209 if: matrix.php-version == '8.3'
210 run: make -C test/php precross
211
212 - name: Upload php precross artifacts
213 if: matrix.php-version == '8.3'
214 uses: actions/upload-artifact@v7
215 with:
216 name: php-precross
217 if-no-files-found: error
218 path: |
219 lib/php/src/ext/thrift_protocol/modules/thrift_protocol.so
220 test/php/gen-php/
221 test/php/gen-php-classmap/
222 retention-days: 3
223
Jiayu Liud21e95a2022-10-09 08:49:29 +0800224 lib-go:
225 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800226 runs-on: ubuntu-24.04
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700227 strategy:
228 matrix:
229 go:
Yuxuan 'fishy' Wang3b862522025-08-13 09:02:51 -0700230 - '1.25'
Yuxuan 'fishy' Wangfd9756c2026-02-10 17:34:09 -0800231 - '1.26'
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700232 fail-fast: false
Jiayu Liud21e95a2022-10-09 08:49:29 +0800233 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000234 - uses: actions/checkout@v6
Jiayu Liud21e95a2022-10-09 08:49:29 +0800235
dependabot[bot]755f7d92025-10-01 06:01:55 +0000236 - uses: actions/setup-go@v6
Jiayu Liud21e95a2022-10-09 08:49:29 +0800237 with:
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700238 go-version: ${{ matrix.go }}
Jiayu Liud21e95a2022-10-09 08:49:29 +0800239
240 - name: Install dependencies
241 run: |
242 sudo apt-get update -yq
243 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
244
245 - name: Run bootstrap
246 run: ./bootstrap.sh
247
248 - name: Run configure
249 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800250 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-go/with-go/')
Jiayu Liud21e95a2022-10-09 08:49:29 +0800251
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000252 - uses: actions/download-artifact@v8
Jiayu Liud21e95a2022-10-09 08:49:29 +0800253 with:
254 name: thrift-compiler
255 path: compiler/cpp
256
257 - name: Run thrift-compiler
258 run: |
259 chmod a+x compiler/cpp/thrift
260 compiler/cpp/thrift -version
261
262 - name: Run make for go
263 run: make -C lib/go
264
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700265 - name: Run make check for lib/go
Jiayu Liud21e95a2022-10-09 08:49:29 +0800266 run: make -C lib/go check
267
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700268 - name: Run make check for test/go
269 run: make -C test/go check
270
Jiayu Liud21e95a2022-10-09 08:49:29 +0800271 - name: Run make precross for go test
272 run: make -C test/go precross
273
274 - name: Upload go precross artifacts
Yuxuan 'fishy' Wangfd9756c2026-02-10 17:34:09 -0800275 if: matrix.go == '1.26'
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000276 uses: actions/upload-artifact@v7
Jiayu Liud21e95a2022-10-09 08:49:29 +0800277 with:
278 name: go-precross
279 if-no-files-found: error
280 path: |
281 test/go/bin/*
282 retention-days: 3
283
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800284 lib-java-kotlin:
285 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800286 runs-on: ubuntu-24.04
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800287 env:
Jiayu Liud40dd722023-10-19 08:37:49 +0800288 GRADLE_VERSION: "8.4"
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800289 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000290 - uses: actions/checkout@v6
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800291
dependabot[bot]eaec8982025-09-05 15:53:08 -0400292 - uses: actions/setup-java@v5
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800293 with:
294 distribution: temurin
Jiayu Liu92b007f2022-10-14 13:16:18 +0800295 java-version: 17
Jiayu Liubcac9782022-05-07 08:35:09 +0800296 cache: "gradle"
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800297
298 - name: Install dependencies
299 run: |
300 sudo apt-get update -yq
301 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
302 sudo apt-get install -y wget unzip ant maven
303
304 - name: Setup gradle
305 run: |
306 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 +0800307 (echo "3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800308 unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
309 sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
310 sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin
311 gradle --version
312
Jiayu Liubcac9782022-05-07 08:35:09 +0800313 - name: Run spotlessCheck for Java
Jiayu Liu53ec0822022-05-06 12:56:42 +0800314 run: |
315 cd lib/java
316 gradle spotlessCheck
317
Jiayu Liubcac9782022-05-07 08:35:09 +0800318 - name: Run ktfmtCheck for Kotlin
319 run: |
320 cd lib/kotlin
321 gradle ktfmtCheck
322
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800323 - name: Run bootstrap
324 run: ./bootstrap.sh
325
326 - name: Run configure
327 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800328 ./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 +0800329
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000330 - uses: actions/download-artifact@v8
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800331 with:
332 name: thrift-compiler
333 path: compiler/cpp
334
335 - name: Run thrift-compiler
336 run: |
337 chmod a+x compiler/cpp/thrift
338 compiler/cpp/thrift -version
339
Jiayu Liubcac9782022-05-07 08:35:09 +0800340 - name: Run make for java
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800341 run: make -C lib/java
342
Jiayu Liu5b158382022-05-12 00:20:37 +0800343 # this will invoke publishToMavenLocal and install locally
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800344 - name: Run make install for java
345 run: make -C lib/java install
346
347 - name: Upload java libthrift artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000348 uses: actions/upload-artifact@v7
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800349 with:
350 name: libthrift
351 if-no-files-found: error
352 path: ~/.m2/repository/org/apache/thrift
353
Jiayu Liubcac9782022-05-07 08:35:09 +0800354 - name: Run make check for java
355 run: make -C lib/java check
356
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800357 - name: Run make precross for java
358 run: make -C lib/java precross
359
360 - name: Upload java precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000361 uses: actions/upload-artifact@v7
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800362 with:
363 name: java-precross
364 if-no-files-found: error
365 path: |
366 lib/java/build/functionalTestJar/
HTHoub5919dd2026-01-05 12:17:56 +0800367 lib/java/build/runnonblockingclient
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800368 lib/java/build/runclient
369 lib/java/build/runnonblockingserver
370 lib/java/build/runserver
371 lib/java/build/runservletserver
372 retention-days: 3
373
Jiayu Liubcac9782022-05-07 08:35:09 +0800374 - name: Run make for kotlin
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800375 run: make -C lib/kotlin
Jiayu Liubcac9782022-05-07 08:35:09 +0800376
377 - name: Run make check for kotlin
378 run: make -C lib/kotlin check
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800379
380 - name: Run make precross for kotlin
381 run: make -C lib/kotlin precross
382
383 - name: Upload kotlin precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000384 uses: actions/upload-artifact@v7
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800385 with:
386 name: kotlin-precross
387 if-no-files-found: error
388 path: |
389 lib/kotlin/cross-test-client/build/install/TestClient/
390 lib/kotlin/cross-test-server/build/install/TestServer/
391 retention-days: 3
392
Sven Roederercb9cead2024-07-05 12:47:41 +0200393 lib-netstd:
394 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800395 runs-on: ubuntu-24.04
Sven Roederercb9cead2024-07-05 12:47:41 +0200396 strategy:
397 fail-fast: false
Jens Geyer2f214c22025-11-13 23:24:45 +0100398 defaults:
399 run:
400 shell: bash # required by net install script
Sven Roederercb9cead2024-07-05 12:47:41 +0200401 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000402 - uses: actions/checkout@v6
Sven Roederercb9cead2024-07-05 12:47:41 +0200403
404 - name: Install dependencies
405 run: |
406 sudo apt-get update -yq
407 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
408 sudo apt-get install -y --no-install-recommends curl openssl ca-certificates
409
Jens Geyer2f214c22025-11-13 23:24:45 +0100410# This whole setup is getting worse: https://github.com/dotnet/core/discussions/9258
411 - name: Set up .NET SDK (via install script)
Jens Geyer3a37d152024-11-14 23:03:25 +0100412 run: |
Jens Geyer2f214c22025-11-13 23:24:45 +0100413 # remove any existing install
HTHoub5919dd2026-01-05 12:17:56 +0800414 sudo apt remove dotnet*
Jens Geyer2f214c22025-11-13 23:24:45 +0100415 # install key
416 sudo apt install gpg
417 wget https://dot.net/v1/dotnet-install.asc
HTHoub5919dd2026-01-05 12:17:56 +0800418 gpg --import dotnet-install.asc
Jens Geyer2f214c22025-11-13 23:24:45 +0100419 # download and verify
420 wget https://dot.net/v1/dotnet-install.sh
421 wget https://dot.net/v1/dotnet-install.sig
HTHoub5919dd2026-01-05 12:17:56 +0800422 gpg --verify dotnet-install.sig dotnet-install.sh
Jens Geyer2f214c22025-11-13 23:24:45 +0100423 # run install script
424 chmod +x dotnet-install.sh
HTHoub5919dd2026-01-05 12:17:56 +0800425 ./dotnet-install.sh --channel 10.0
Jens Geyer2f214c22025-11-13 23:24:45 +0100426 # export env vars
427 export DOTNET_ROOT=$HOME/.dotnet
HTHoub5919dd2026-01-05 12:17:56 +0800428 export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Jens Geyer2f214c22025-11-13 23:24:45 +0100429 dotnet --list-sdks
430
431# the sdk is installed by default, but keep this step for reference
432# especially newer versions are NOT always pre-installed, so manually again
433# - name: Set up .NET SDK
434# run: |
435# sudo add-apt-repository -y ppa:dotnet/backports
436# sudo apt-get install -y --no-install-recommends dotnet-sdk-10.0
Jens Geyer3a37d152024-11-14 23:03:25 +0100437# end
Sven Roederercb9cead2024-07-05 12:47:41 +0200438
439 - name: Run bootstrap
440 run: ./bootstrap.sh
441
442 - name: Run configure for netstd
443 run: |
444 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-netstd/with-netstd/')
445
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000446 - uses: actions/download-artifact@v8
Sven Roederercb9cead2024-07-05 12:47:41 +0200447 with:
448 name: thrift-compiler
449 path: compiler/cpp
450
451 - name: Run thrift-compiler
452 run: |
453 chmod a+x compiler/cpp/thrift
454 compiler/cpp/thrift -version
455
456 - name: Run make for netstd
457 run: make -C lib/netstd
458
459 - name: Run make install for netstd
460 run: sudo make -C lib/netstd install
461
462 - name: Run make check for netstd
463 run: make -C lib/netstd check
464
465 - name: Run make check for test/netstd
466 run: make -C test/netstd check
467
468 - name: Run make precross for test/netstd
469 run: make -C test/netstd precross
470
471 - name: Upload netstd precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000472 uses: actions/upload-artifact@v7
Sven Roederercb9cead2024-07-05 12:47:41 +0200473 with:
474 name: netstd-precross
475 if-no-files-found: error
476 path: |
477 test/netstd/Client/bin/Release/
478 test/netstd/Server/bin/Release/
479 retention-days: 3
480
Kino Roya9da9eb2022-10-07 23:13:01 -0700481 lib-swift:
482 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800483 runs-on: ubuntu-24.04
Jens Geyer63b7a262025-05-25 14:48:57 +0200484 if: false # swift is currently broken and no maintainers around -> see THRIFT-5864
Kino Roya9da9eb2022-10-07 23:13:01 -0700485 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000486 - uses: actions/checkout@v6
Jiayu Liud21e95a2022-10-09 08:49:29 +0800487
Kino Roya9da9eb2022-10-07 23:13:01 -0700488 - name: Run bootstrap
489 run: ./bootstrap.sh
490
491 - name: Run configure
492 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800493 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-swift/with-swift/')
Jiayu Liud21e95a2022-10-09 08:49:29 +0800494
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000495 - uses: actions/download-artifact@v8
Kino Roya9da9eb2022-10-07 23:13:01 -0700496 with:
497 name: thrift-compiler
498 path: compiler/cpp
499
500 - name: Run thrift-compiler
501 run: |
502 chmod a+x compiler/cpp/thrift
503 compiler/cpp/thrift -version
Jiayu Liud21e95a2022-10-09 08:49:29 +0800504
Kino Roya9da9eb2022-10-07 23:13:01 -0700505 - name: Run make precross for swift
506 run: make -C test/swift precross
507
508 - name: Upload swift precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000509 uses: actions/upload-artifact@v7
Kino Roya9da9eb2022-10-07 23:13:01 -0700510 with:
511 name: swift-precross
512 if-no-files-found: error
513 path: |
514 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestServer
515 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestClient
516 retention-days: 3
517
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800518 lib-rust:
519 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800520 runs-on: ubuntu-24.04
Jens Geyere4666f22026-02-20 00:12:57 +0100521 if: false # currently broken and no maintainers around -> see THRIFT-5917
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800522 env:
Cameron Martinda54fc82025-01-12 08:55:45 +0000523 TOOLCHAIN_VERSION: 1.83.0
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800524 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000525 - uses: actions/checkout@v6
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800526
527 - name: Install dependencies
528 run: |
529 sudo apt-get update -yq
530 sudo apt-get install -y --no-install-recommends curl $BUILD_DEPS
531
532 - name: Setup cargo
533 run: |
534 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
535 rustup update
536 rustup install $TOOLCHAIN_VERSION
537 rustup default $TOOLCHAIN_VERSION
538 rustup --version
539 cargo --version
540 rustc --version
541
542 - name: Run bootstrap
543 run: ./bootstrap.sh
544
545 - name: Run configure
546 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800547 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-rs/with-rs/')
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800548
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000549 - uses: actions/download-artifact@v8
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800550 with:
551 name: thrift-compiler
552 path: compiler/cpp
553
554 - name: Run thrift-compiler
555 run: |
556 chmod a+x compiler/cpp/thrift
557 compiler/cpp/thrift -version
558
559 - name: Run make for rust
560 run: make -C lib/rs
561
562 - name: Run make check for rust
563 run: make -C lib/rs check
564
565 - name: Run make test for rust
566 run: make -C lib/rs/test check
567
568 - name: Run make precross for test rust
569 run: make -C test/rs precross
570
571 - name: Upload rust precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000572 uses: actions/upload-artifact@v7
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800573 with:
574 name: rs-precross
575 if-no-files-found: error
576 path: |
577 test/rs/bin/test_server
578 test/rs/bin/test_client
579 retention-days: 3
580
581 - name: Run make test_recursive for rust
582 run: make -C lib/rs/test_recursive check
583
Jiayu Liu6f339002023-04-20 07:39:35 +0800584 lib-python:
585 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800586 runs-on: ubuntu-24.04
Jiayu Liu6f339002023-04-20 07:39:35 +0800587 strategy:
588 matrix:
Gregg Donovan62ec9292026-01-29 16:51:37 -0500589 python-version: &python_versions ["3.10", "3.11", "3.12", "3.13", "3.14"]
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700590 fail-fast: false
Jiayu Liu6f339002023-04-20 07:39:35 +0800591 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000592 - uses: actions/checkout@v6
Jiayu Liu6f339002023-04-20 07:39:35 +0800593
594 - name: Install dependencies
595 run: |
596 sudo apt-get update -yq
597 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
598 sudo apt-get install -y --no-install-recommends curl openssl ca-certificates
599
600 - name: Set up Python
dependabot[bot]1a5b7fc2025-10-01 06:01:59 +0000601 uses: actions/setup-python@v6
Jiayu Liu6f339002023-04-20 07:39:35 +0800602 with:
603 python-version: ${{ matrix.python-version }}
604
605 - name: Python setup
606 run: |
Gregg Donovan62ec9292026-01-29 16:51:37 -0500607 python -m pip install --upgrade pip setuptools wheel flake8 "tornado>=6.3.0" "twisted>=24.3.0" "zope.interface>=6.1"
Jiayu Liu6f339002023-04-20 07:39:35 +0800608 python --version
609 pip --version
610
Jiayu Liu6f339002023-04-20 07:39:35 +0800611 - name: Run bootstrap
612 run: ./bootstrap.sh
613
Carel Combrinkf2534ad2025-11-11 12:51:21 +0000614 - name: Run configure
Jiayu Liu6f339002023-04-20 07:39:35 +0800615 run: |
616 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-py3/with-py3/')
617
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000618 - uses: actions/download-artifact@v8
Jiayu Liu6f339002023-04-20 07:39:35 +0800619 with:
620 name: thrift-compiler
621 path: compiler/cpp
622
623 - name: Run thrift-compiler
624 run: |
625 chmod a+x compiler/cpp/thrift
626 compiler/cpp/thrift -version
627
628 - name: Run make for python
629 run: make -C lib/py
630
631 - name: Run make install for python
632 run: sudo make -C lib/py install
633
Carel Combrink7770d272025-11-11 14:07:19 +0200634 - name: Run make check for python libs
Jiayu Liu6f339002023-04-20 07:39:35 +0800635 run: make -C lib/py check
636
Carel Combrink7770d272025-11-11 14:07:19 +0200637 - name: Run make check for python code
638 run: make -C test/py check
639
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500640 - name: Run make precross for python
641 if: matrix.python-version == '3.12'
642 run: make -C test/py precross
643
644 - name: Upload python precross artifacts
645 if: matrix.python-version == '3.12'
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000646 uses: actions/upload-artifact@v7
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500647 with:
648 name: py-precross
649 if-no-files-found: error
650 path: |
651 lib/py/build/lib.*
652 test/py/gen-py
653 test/py/TestClient.py
654 test/py/TestServer.py
655 test/py/util.py
656 retention-days: 3
657
Gregg Donovan62ec9292026-01-29 16:51:37 -0500658 lib-python-macos:
659 needs: compiler-macos
660 strategy:
661 matrix:
662 os: *macos_versions
663 python-version: *python_versions
664 fail-fast: false
665 runs-on: ${{ matrix.os }}
666 steps:
667 - uses: actions/checkout@v6
668
669 - name: Install dependencies
670 run: |
671 brew install automake bison flex boost libevent openssl libtool pkg-config
672 echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
673
674 - name: Set up Python
675 uses: actions/setup-python@v6
676 with:
677 python-version: ${{ matrix.python-version }}
678
679 - name: Python setup
680 run: |
681 python -m pip install --upgrade pip setuptools wheel flake8 "tornado>=6.3.0" "twisted>=24.3.0" "zope.interface>=6.1"
682 python --version
683 pip --version
684
685 - name: Run bootstrap
686 run: ./bootstrap.sh
687
688 - name: Run configure
689 run: ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-py3/with-py3/')
690
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000691 - uses: actions/download-artifact@v8
Gregg Donovan62ec9292026-01-29 16:51:37 -0500692 with:
693 name: thrift-compiler-${{ matrix.os }}
694 path: compiler/cpp
695
696 - name: Run thrift-compiler
697 run: |
698 chmod a+x compiler/cpp/thrift
699 compiler/cpp/thrift -version
700
701 - name: Run make for python
702 run: make -C lib/py
703
704 - name: Run make install for python
705 run: |
706 sudo make -C lib/py install PY_PREFIX="$(python -c 'import sys; print(sys.prefix)')"
707
708 - name: Run make for python libs
709 run: make -C lib/py
710
711 - name: Run make check for python libs
712 run: make -C lib/py check
713
714 - name: Run make check for python code
715 run: make -C test/py check
716
Cameron Martinab706522025-01-12 08:54:49 +0000717 lib-nodejs:
718 needs: compiler
719 runs-on: ubuntu-24.04
720 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000721 - uses: actions/checkout@v6
Cameron Martinab706522025-01-12 08:54:49 +0000722
723 - name: Run bootstrap
724 run: ./bootstrap.sh
725
726 - name: Run configure
727 run: |
Cameron Martina675c4f2025-01-15 16:38:07 +0000728 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed -E 's/without-node([tj])s/with-node\1s/g')
Cameron Martinab706522025-01-12 08:54:49 +0000729
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000730 - uses: actions/download-artifact@v8
Cameron Martinab706522025-01-12 08:54:49 +0000731 with:
732 name: thrift-compiler
733 path: compiler/cpp
734
735 - name: Run thrift-compiler
736 run: |
737 chmod a+x compiler/cpp/thrift
738 compiler/cpp/thrift -version
739
Cameron Martina675c4f2025-01-15 16:38:07 +0000740 - name: Run js tests
Cameron Martinab706522025-01-12 08:54:49 +0000741 run: make -C lib/nodejs check
742
Cameron Martina675c4f2025-01-15 16:38:07 +0000743 - name: Run ts tests
744 run: make -C lib/nodets check
745
CJCombrinkdfeab8d2026-03-06 07:03:56 +0100746 - name: Run js precross
747 run: make -C lib/nodejs precross
748
749 - name: Run ts precross
750 run: make -C lib/nodets precross
751
752 - name: Upload nodejs precross artifacts
753 uses: actions/upload-artifact@v7
754 with:
755 name: nodejs-precross
756 if-no-files-found: error
757 include-hidden-files: true
758 path: |
759 lib/nodejs/test/gen-nodejs
760 lib/nodets/test/gen-nodejs
761 lib/nodets/test-compiled
762 retention-days: 3
763
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200764 lib-cpp:
765 needs: compiler
766 runs-on: ubuntu-24.04
767 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000768 - uses: actions/checkout@v6
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200769
770 - name: Install dependencies
771 run: |
772 sudo apt-get update -yq
773 sudo apt-get install -y --no-install-recommends g++ $BUILD_DEPS locales
774 sudo locale-gen en_US.UTF-8
775 sudo locale-gen de_DE.UTF-8
776 sudo update-locale
777
778 - name: Run bootstrap
779 run: ./bootstrap.sh
780
781 - name: Run configure
782 run: |
783 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed -E 's/without-cpp/with-cpp/g')
784
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000785 - uses: actions/download-artifact@v8
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200786 with:
787 name: thrift-compiler
788 path: compiler/cpp
789
790 - name: Run thrift-compiler
791 run: |
792 chmod a+x compiler/cpp/thrift
793 compiler/cpp/thrift -version
794
795 - name: Run make for cpp
796 run: make -j$(nproc) -C lib/cpp
797
798 - name: Run make check for lib/cpp
799 run: make -j$(nproc) -C lib/cpp check
800
801 - name: Run make check for test/cpp
802 run: make -j$(nproc) -C test/cpp check
803
804 - name: Run make precross for cpp test
805 run: make -j$(nproc) -C test/cpp precross
806
807 - name: Upload cpp precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000808 uses: actions/upload-artifact@v7
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200809 with:
810 name: cpp-precross
811 if-no-files-found: error
812 include-hidden-files: true
813 path: |
814 test/cpp/TestClient
815 test/cpp/TestServer
816 test/cpp/.libs/TestClient
817 test/cpp/.libs/TestServer
818 lib/cpp/.libs/*.so
819 retention-days: 3
820
821 - name: Upload log files from failed test runs
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000822 uses: actions/upload-artifact@v7
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200823 if: failure()
824 with:
825 name: lib-cpp-test-log
826 path: lib/cpp/test/*.xml
827 retention-days: 3
828
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500829 lib-ruby:
830 needs: compiler
831 runs-on: ubuntu-24.04
Dmytro Shteflyuk75a28772025-12-17 17:07:27 -0500832 name: lib-ruby (${{ matrix.ruby-version }}) ${{ matrix.skip-build-ext && 'noext' || '' }}
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500833 strategy:
834 matrix:
835 ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0", "head"]
Dmytro Shteflyuk75a28772025-12-17 17:07:27 -0500836 skip-build-ext: [false]
837 include:
838 - ruby-version: "2.7"
839 skip-build-ext: true
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500840 fail-fast: false
Dmytro Shteflyuk75a28772025-12-17 17:07:27 -0500841 env:
842 SKIP_BUILD_EXT: ${{ matrix.skip-build-ext && '1' || '' }}
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500843 steps:
dependabot[bot]d4cbd782026-02-04 16:10:02 +0000844 - uses: actions/checkout@v6
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500845
846 - name: Set up Ruby
847 uses: ruby/setup-ruby@v1
848 with:
849 ruby-version: ${{ matrix.ruby-version }}
850 bundler-cache: true
851 working-directory: lib/rb
852
853 - name: Run bootstrap
854 run: ./bootstrap.sh
855
856 - name: Run configure
857 run: |
858 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-ruby/with-ruby/')
859
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000860 - uses: actions/download-artifact@v8
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500861 with:
862 name: thrift-compiler
863 path: compiler/cpp
864
865 - name: Run thrift-compiler
866 run: |
867 chmod a+x compiler/cpp/thrift
868 compiler/cpp/thrift -version
869
870 - name: Run make for ruby
871 run: make -C lib/rb
872
873 - name: Run make check for lib/rb
874 run: make -C lib/rb check
875
876 - name: Run make check for test/rb
877 run: make -C test/rb check
878
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500879 - name: Run make precross for ruby test
880 run: make -C test/rb precross
881
882 - name: Upload ruby precross artifacts
883 # has to match the version used in cross-test
884 if: matrix.ruby-version == '2.7' && matrix.skip-build-ext == false
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000885 uses: actions/upload-artifact@v7
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500886 with:
887 name: rb-precross
888 if-no-files-found: error
889 path: |
890 test/rb/gen-rb/*
891 lib/rb/ext/*.so
892 retention-days: 3
893
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800894 cross-test:
895 needs:
Volodymyr Panivko76113eb2026-03-26 21:57:29 +0100896 - lib-php
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800897 - lib-java-kotlin
Jens Geyere4666f22026-02-20 00:12:57 +0100898 #- lib-swift # currently broken and no maintainers around -> see THRIFT-5864
899 #- lib-rust # currently broken and no maintainers around -> see THRIFT-5917
Jiayu Liud21e95a2022-10-09 08:49:29 +0800900 - lib-go
Jiayu Liu6f339002023-04-20 07:39:35 +0800901 - lib-python
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200902 - lib-cpp
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500903 - lib-ruby
CJCombrinkdfeab8d2026-03-06 07:03:56 +0100904 - lib-nodejs
Jiayu Liue7f1a262024-11-06 11:37:25 +0800905 runs-on: ubuntu-24.04
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800906 strategy:
907 matrix:
Jens Geyer63b7a262025-05-25 14:48:57 +0200908 # swift is currently broken and no maintainers around -> see THRIFT-5864
Jens Geyere4666f22026-02-20 00:12:57 +0100909 # rust currently broken and no maintainers around -> see THRIFT-5917
Careled55a182025-11-14 10:54:52 +0200910 # kotlin cross test are failing -> see THRIFT-5879
Volodymyr Panivko76113eb2026-03-26 21:57:29 +0100911 server_lang: ['java', 'go', 'cpp', 'py', 'rb', 'php', 'nodejs', 'nodets']
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800912 # we always use comma join as many client langs as possible, to reduce the number of jobs
Volodymyr Panivko76113eb2026-03-26 21:57:29 +0100913 client_lang: ['java,kotlin', 'go,cpp,py,php,nodejs,nodets', 'rb']
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800914 fail-fast: false
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800915 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000916 - uses: actions/checkout@v6
Jiayu Liud21e95a2022-10-09 08:49:29 +0800917
dependabot[bot]1a5b7fc2025-10-01 06:01:59 +0000918 - uses: actions/setup-python@v6
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800919 with:
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500920 python-version: "3.12"
921
922 - name: Install Python test dependencies
923 run: |
924 python -m pip install --upgrade pip setuptools
925 python -m pip install "tornado>=6.3.0" "twisted>=24.3.0" "zope.interface>=6.1"
Jiayu Liud21e95a2022-10-09 08:49:29 +0800926
Volodymyr Panivko76113eb2026-03-26 21:57:29 +0100927 - name: Set up PHP
928 uses: shivammathur/setup-php@v2
929 with:
930 php-version: "8.3"
931 extensions: mbstring, intl, xml, curl, sockets
932 ini-values: "error_reporting=E_ALL"
933
934 - name: Install PHP dependencies
935 run: composer install --no-progress --prefer-dist
936
dependabot[bot]eaec8982025-09-05 15:53:08 -0400937 - uses: actions/setup-java@v5
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800938 with:
939 distribution: temurin
Jiayu Liube73a572023-04-14 11:02:43 +0800940 # here we intentionally use an older version so that we also verify Java 17 compiles to it
Fokko Driesprong0b14a1b2023-04-14 11:06:15 +0200941 java-version: 8
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800942 cache: "gradle"
943
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500944 - uses: ruby/setup-ruby@v1
945 with:
946 ruby-version: "2.7"
947 bundler-cache: true
948 working-directory: test/rb
949
Jiayu Liud21e95a2022-10-09 08:49:29 +0800950 - name: Install openssl and certificates (for SSL tests)
951 run: |
952 sudo apt-get update -yq
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200953 sudo apt-get install -y --no-install-recommends \
954 openssl \
955 ca-certificates \
956 libboost-all-dev \
957 libevent-dev
Jiayu Liud21e95a2022-10-09 08:49:29 +0800958
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800959 - name: Download java precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000960 uses: actions/download-artifact@v8
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800961 with:
962 name: java-precross
963 path: lib/java/build
964
965 - name: Download kotlin precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000966 uses: actions/download-artifact@v8
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800967 with:
968 name: kotlin-precross
969 path: lib/kotlin
970
Jens Geyere4666f22026-02-20 00:12:57 +0100971 - name: Download swift precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000972 uses: actions/download-artifact@v8
Jens Geyere4666f22026-02-20 00:12:57 +0100973 if: false # currently broken and no maintainers around -> see THRIFT-5864
974 with:
975 name: swift-precross
976 path: test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug
Kino Roya9da9eb2022-10-07 23:13:01 -0700977
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800978 - name: Download rust precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000979 uses: actions/download-artifact@v8
Jens Geyere4666f22026-02-20 00:12:57 +0100980 if: false # currently broken and no maintainers around -> see THRIFT-5917
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800981 with:
982 name: rs-precross
983 path: test/rs/bin
984
Jiayu Liud21e95a2022-10-09 08:49:29 +0800985 - name: Download go precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000986 uses: actions/download-artifact@v8
Jiayu Liud21e95a2022-10-09 08:49:29 +0800987 with:
988 name: go-precross
989 path: test/go/bin
990
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200991 - name: Download cpp precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000992 uses: actions/download-artifact@v8
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200993 with:
994 name: cpp-precross
995 path: .
996
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500997 - name: Download python precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000998 uses: actions/download-artifact@v8
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500999 with:
1000 name: py-precross
1001 path: .
1002
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -05001003 - name: Download ruby precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +00001004 uses: actions/download-artifact@v8
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -05001005 with:
1006 name: rb-precross
1007 path: .
1008
Volodymyr Panivko76113eb2026-03-26 21:57:29 +01001009 - name: Download php precross artifacts
1010 uses: actions/download-artifact@v8
1011 with:
1012 name: php-precross
1013 path: .
1014
1015 - name: Prepare PHP cross test extensions
1016 run: |
1017 mkdir -p test/php/php_ext_dir
1018 ln -sf ../../../lib/php/src/ext/thrift_protocol/modules/thrift_protocol.so test/php/php_ext_dir/
1019 ln -sf "$(php-config --extension-dir)/sockets.so" test/php/php_ext_dir/
1020
CJCombrinkdfeab8d2026-03-06 07:03:56 +01001021 - name: Download nodejs and nodets precross artifacts
1022 uses: actions/download-artifact@v8
1023 with:
1024 name: nodejs-precross
1025 path: lib
1026
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001027 - name: Set back executable flags
1028 run: |
Yuxuan 'fishy' Wang716835f2025-05-28 15:44:53 -07001029 chmod a+x lib/java/build/run*
1030 chmod a+x lib/kotlin/cross-test-client/build/install/TestClient/bin/*
1031 chmod a+x lib/kotlin/cross-test-server/build/install/TestServer/bin/*
1032 # THRIFT-5864 chmod a+x test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/*
Jens Geyere4666f22026-02-20 00:12:57 +01001033 # THRIFT-5917 chmod a+x test/rs/bin/*
Yuxuan 'fishy' Wang716835f2025-05-28 15:44:53 -07001034 chmod a+x test/go/bin/*
Carel Combrinkfbe685a2025-06-05 08:38:07 +02001035 chmod a+x test/cpp/*
1036 chmod a+x test/cpp/.libs/*
1037 chmod a+x lib/cpp/.libs/*.so
Gregg Donovanc99d09a2026-02-01 08:36:17 -05001038 chmod a+x test/py/*.py
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -05001039 chmod a+x lib/rb/ext/*.so
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001040
CJCombrinkdfeab8d2026-03-06 07:03:56 +01001041 - name: Installs for nodets and nodejs
1042 run: |
1043 npm install .
1044 cd lib/nodejs/test/ && npm install .
1045
Kino Roy29d87732023-02-20 22:32:43 -08001046 - name: Create tmp domain socket folder
1047 run: mkdir /tmp/v0.16
1048
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001049 - name: Run cross test
1050 env:
1051 THRIFT_CROSSTEST_CONCURRENCY: 4
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001052 run: |
1053 python test/test.py \
1054 --retry-count 5 \
1055 --skip-known-failures \
Jiayu Liu790d4cb2023-04-27 11:35:17 +08001056 --server ${{ matrix.server_lang }} \
1057 --client ${{ matrix.client_lang }}
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001058
1059 - name: Upload log files from failed cross test runs
dependabot[bot]99e0f6f2026-03-01 06:02:57 +00001060 uses: actions/upload-artifact@v7
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001061 if: failure()
1062 with:
Sven Roederer18b0de62024-07-06 03:59:37 +02001063 name: cross-test-log_${{ matrix.server_lang }}-${{ matrix.client_lang }}
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001064 path: test/log/
1065 retention-days: 3