blob: c4de6fa3b62d686ee0c9ba2b0817a2bae72903b5 [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
Jiayu Liud21e95a2022-10-09 08:49:29 +0800204 lib-go:
205 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800206 runs-on: ubuntu-24.04
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700207 strategy:
208 matrix:
209 go:
Yuxuan 'fishy' Wang3b862522025-08-13 09:02:51 -0700210 - '1.25'
Yuxuan 'fishy' Wangfd9756c2026-02-10 17:34:09 -0800211 - '1.26'
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700212 fail-fast: false
Jiayu Liud21e95a2022-10-09 08:49:29 +0800213 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000214 - uses: actions/checkout@v6
Jiayu Liud21e95a2022-10-09 08:49:29 +0800215
dependabot[bot]755f7d92025-10-01 06:01:55 +0000216 - uses: actions/setup-go@v6
Jiayu Liud21e95a2022-10-09 08:49:29 +0800217 with:
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700218 go-version: ${{ matrix.go }}
Jiayu Liud21e95a2022-10-09 08:49:29 +0800219
220 - name: Install dependencies
221 run: |
222 sudo apt-get update -yq
223 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
224
225 - name: Run bootstrap
226 run: ./bootstrap.sh
227
228 - name: Run configure
229 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800230 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-go/with-go/')
Jiayu Liud21e95a2022-10-09 08:49:29 +0800231
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000232 - uses: actions/download-artifact@v8
Jiayu Liud21e95a2022-10-09 08:49:29 +0800233 with:
234 name: thrift-compiler
235 path: compiler/cpp
236
237 - name: Run thrift-compiler
238 run: |
239 chmod a+x compiler/cpp/thrift
240 compiler/cpp/thrift -version
241
242 - name: Run make for go
243 run: make -C lib/go
244
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700245 - name: Run make check for lib/go
Jiayu Liud21e95a2022-10-09 08:49:29 +0800246 run: make -C lib/go check
247
Yuxuan 'fishy' Wang19c13b42022-10-12 14:13:15 -0700248 - name: Run make check for test/go
249 run: make -C test/go check
250
Jiayu Liud21e95a2022-10-09 08:49:29 +0800251 - name: Run make precross for go test
252 run: make -C test/go precross
253
254 - name: Upload go precross artifacts
Yuxuan 'fishy' Wangfd9756c2026-02-10 17:34:09 -0800255 if: matrix.go == '1.26'
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000256 uses: actions/upload-artifact@v7
Jiayu Liud21e95a2022-10-09 08:49:29 +0800257 with:
258 name: go-precross
259 if-no-files-found: error
260 path: |
261 test/go/bin/*
262 retention-days: 3
263
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800264 lib-java-kotlin:
265 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800266 runs-on: ubuntu-24.04
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800267 env:
Jiayu Liud40dd722023-10-19 08:37:49 +0800268 GRADLE_VERSION: "8.4"
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800269 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000270 - uses: actions/checkout@v6
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800271
dependabot[bot]eaec8982025-09-05 15:53:08 -0400272 - uses: actions/setup-java@v5
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800273 with:
274 distribution: temurin
Jiayu Liu92b007f2022-10-14 13:16:18 +0800275 java-version: 17
Jiayu Liubcac9782022-05-07 08:35:09 +0800276 cache: "gradle"
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800277
278 - name: Install dependencies
279 run: |
280 sudo apt-get update -yq
281 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
282 sudo apt-get install -y wget unzip ant maven
283
284 - name: Setup gradle
285 run: |
286 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 +0800287 (echo "3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800288 unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
289 sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
290 sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin
291 gradle --version
292
Jiayu Liubcac9782022-05-07 08:35:09 +0800293 - name: Run spotlessCheck for Java
Jiayu Liu53ec0822022-05-06 12:56:42 +0800294 run: |
295 cd lib/java
296 gradle spotlessCheck
297
Jiayu Liubcac9782022-05-07 08:35:09 +0800298 - name: Run ktfmtCheck for Kotlin
299 run: |
300 cd lib/kotlin
301 gradle ktfmtCheck
302
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800303 - 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-java/with-java/' | sed 's/without-kotlin/with-kotlin/')
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800309
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000310 - uses: actions/download-artifact@v8
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800311 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
319
Jiayu Liubcac9782022-05-07 08:35:09 +0800320 - name: Run make for java
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800321 run: make -C lib/java
322
Jiayu Liu5b158382022-05-12 00:20:37 +0800323 # this will invoke publishToMavenLocal and install locally
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800324 - name: Run make install for java
325 run: make -C lib/java install
326
327 - name: Upload java libthrift artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000328 uses: actions/upload-artifact@v7
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800329 with:
330 name: libthrift
331 if-no-files-found: error
332 path: ~/.m2/repository/org/apache/thrift
333
Jiayu Liubcac9782022-05-07 08:35:09 +0800334 - name: Run make check for java
335 run: make -C lib/java check
336
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800337 - name: Run make precross for java
338 run: make -C lib/java precross
339
340 - name: Upload java precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000341 uses: actions/upload-artifact@v7
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800342 with:
343 name: java-precross
344 if-no-files-found: error
345 path: |
346 lib/java/build/functionalTestJar/
HTHoub5919dd2026-01-05 12:17:56 +0800347 lib/java/build/runnonblockingclient
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800348 lib/java/build/runclient
349 lib/java/build/runnonblockingserver
350 lib/java/build/runserver
351 lib/java/build/runservletserver
352 retention-days: 3
353
Jiayu Liubcac9782022-05-07 08:35:09 +0800354 - name: Run make for kotlin
Jiayu Liuc77d91a2022-05-03 20:55:50 +0800355 run: make -C lib/kotlin
Jiayu Liubcac9782022-05-07 08:35:09 +0800356
357 - name: Run make check for kotlin
358 run: make -C lib/kotlin check
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800359
360 - name: Run make precross for kotlin
361 run: make -C lib/kotlin precross
362
363 - name: Upload kotlin precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000364 uses: actions/upload-artifact@v7
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800365 with:
366 name: kotlin-precross
367 if-no-files-found: error
368 path: |
369 lib/kotlin/cross-test-client/build/install/TestClient/
370 lib/kotlin/cross-test-server/build/install/TestServer/
371 retention-days: 3
372
Sven Roederercb9cead2024-07-05 12:47:41 +0200373 lib-netstd:
374 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800375 runs-on: ubuntu-24.04
Sven Roederercb9cead2024-07-05 12:47:41 +0200376 strategy:
377 fail-fast: false
Jens Geyer2f214c22025-11-13 23:24:45 +0100378 defaults:
379 run:
380 shell: bash # required by net install script
Sven Roederercb9cead2024-07-05 12:47:41 +0200381 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000382 - uses: actions/checkout@v6
Sven Roederercb9cead2024-07-05 12:47:41 +0200383
384 - name: Install dependencies
385 run: |
386 sudo apt-get update -yq
387 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
388 sudo apt-get install -y --no-install-recommends curl openssl ca-certificates
389
Jens Geyer2f214c22025-11-13 23:24:45 +0100390# This whole setup is getting worse: https://github.com/dotnet/core/discussions/9258
391 - name: Set up .NET SDK (via install script)
Jens Geyer3a37d152024-11-14 23:03:25 +0100392 run: |
Jens Geyer2f214c22025-11-13 23:24:45 +0100393 # remove any existing install
HTHoub5919dd2026-01-05 12:17:56 +0800394 sudo apt remove dotnet*
Jens Geyer2f214c22025-11-13 23:24:45 +0100395 # install key
396 sudo apt install gpg
397 wget https://dot.net/v1/dotnet-install.asc
HTHoub5919dd2026-01-05 12:17:56 +0800398 gpg --import dotnet-install.asc
Jens Geyer2f214c22025-11-13 23:24:45 +0100399 # download and verify
400 wget https://dot.net/v1/dotnet-install.sh
401 wget https://dot.net/v1/dotnet-install.sig
HTHoub5919dd2026-01-05 12:17:56 +0800402 gpg --verify dotnet-install.sig dotnet-install.sh
Jens Geyer2f214c22025-11-13 23:24:45 +0100403 # run install script
404 chmod +x dotnet-install.sh
HTHoub5919dd2026-01-05 12:17:56 +0800405 ./dotnet-install.sh --channel 10.0
Jens Geyer2f214c22025-11-13 23:24:45 +0100406 # export env vars
407 export DOTNET_ROOT=$HOME/.dotnet
HTHoub5919dd2026-01-05 12:17:56 +0800408 export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Jens Geyer2f214c22025-11-13 23:24:45 +0100409 dotnet --list-sdks
410
411# the sdk is installed by default, but keep this step for reference
412# especially newer versions are NOT always pre-installed, so manually again
413# - name: Set up .NET SDK
414# run: |
415# sudo add-apt-repository -y ppa:dotnet/backports
416# sudo apt-get install -y --no-install-recommends dotnet-sdk-10.0
Jens Geyer3a37d152024-11-14 23:03:25 +0100417# end
Sven Roederercb9cead2024-07-05 12:47:41 +0200418
419 - name: Run bootstrap
420 run: ./bootstrap.sh
421
422 - name: Run configure for netstd
423 run: |
424 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-netstd/with-netstd/')
425
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000426 - uses: actions/download-artifact@v8
Sven Roederercb9cead2024-07-05 12:47:41 +0200427 with:
428 name: thrift-compiler
429 path: compiler/cpp
430
431 - name: Run thrift-compiler
432 run: |
433 chmod a+x compiler/cpp/thrift
434 compiler/cpp/thrift -version
435
436 - name: Run make for netstd
437 run: make -C lib/netstd
438
439 - name: Run make install for netstd
440 run: sudo make -C lib/netstd install
441
442 - name: Run make check for netstd
443 run: make -C lib/netstd check
444
445 - name: Run make check for test/netstd
446 run: make -C test/netstd check
447
448 - name: Run make precross for test/netstd
449 run: make -C test/netstd precross
450
451 - name: Upload netstd precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000452 uses: actions/upload-artifact@v7
Sven Roederercb9cead2024-07-05 12:47:41 +0200453 with:
454 name: netstd-precross
455 if-no-files-found: error
456 path: |
457 test/netstd/Client/bin/Release/
458 test/netstd/Server/bin/Release/
459 retention-days: 3
460
Kino Roya9da9eb2022-10-07 23:13:01 -0700461 lib-swift:
462 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800463 runs-on: ubuntu-24.04
Jens Geyer63b7a262025-05-25 14:48:57 +0200464 if: false # swift is currently broken and no maintainers around -> see THRIFT-5864
Kino Roya9da9eb2022-10-07 23:13:01 -0700465 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000466 - uses: actions/checkout@v6
Jiayu Liud21e95a2022-10-09 08:49:29 +0800467
Kino Roya9da9eb2022-10-07 23:13:01 -0700468 - name: Run bootstrap
469 run: ./bootstrap.sh
470
471 - name: Run configure
472 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800473 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-swift/with-swift/')
Jiayu Liud21e95a2022-10-09 08:49:29 +0800474
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000475 - uses: actions/download-artifact@v8
Kino Roya9da9eb2022-10-07 23:13:01 -0700476 with:
477 name: thrift-compiler
478 path: compiler/cpp
479
480 - name: Run thrift-compiler
481 run: |
482 chmod a+x compiler/cpp/thrift
483 compiler/cpp/thrift -version
Jiayu Liud21e95a2022-10-09 08:49:29 +0800484
Kino Roya9da9eb2022-10-07 23:13:01 -0700485 - name: Run make precross for swift
486 run: make -C test/swift precross
487
488 - name: Upload swift precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000489 uses: actions/upload-artifact@v7
Kino Roya9da9eb2022-10-07 23:13:01 -0700490 with:
491 name: swift-precross
492 if-no-files-found: error
493 path: |
494 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestServer
495 test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestClient
496 retention-days: 3
497
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800498 lib-rust:
499 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800500 runs-on: ubuntu-24.04
Jens Geyere4666f22026-02-20 00:12:57 +0100501 if: false # currently broken and no maintainers around -> see THRIFT-5917
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800502 env:
Cameron Martinda54fc82025-01-12 08:55:45 +0000503 TOOLCHAIN_VERSION: 1.83.0
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800504 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000505 - uses: actions/checkout@v6
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800506
507 - name: Install dependencies
508 run: |
509 sudo apt-get update -yq
510 sudo apt-get install -y --no-install-recommends curl $BUILD_DEPS
511
512 - name: Setup cargo
513 run: |
514 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
515 rustup update
516 rustup install $TOOLCHAIN_VERSION
517 rustup default $TOOLCHAIN_VERSION
518 rustup --version
519 cargo --version
520 rustc --version
521
522 - name: Run bootstrap
523 run: ./bootstrap.sh
524
525 - name: Run configure
526 run: |
Jiayu Liu1e3d90d2023-04-14 23:57:33 +0800527 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-rs/with-rs/')
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800528
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000529 - uses: actions/download-artifact@v8
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800530 with:
531 name: thrift-compiler
532 path: compiler/cpp
533
534 - name: Run thrift-compiler
535 run: |
536 chmod a+x compiler/cpp/thrift
537 compiler/cpp/thrift -version
538
539 - name: Run make for rust
540 run: make -C lib/rs
541
542 - name: Run make check for rust
543 run: make -C lib/rs check
544
545 - name: Run make test for rust
546 run: make -C lib/rs/test check
547
548 - name: Run make precross for test rust
549 run: make -C test/rs precross
550
551 - name: Upload rust precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000552 uses: actions/upload-artifact@v7
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800553 with:
554 name: rs-precross
555 if-no-files-found: error
556 path: |
557 test/rs/bin/test_server
558 test/rs/bin/test_client
559 retention-days: 3
560
561 - name: Run make test_recursive for rust
562 run: make -C lib/rs/test_recursive check
563
Jiayu Liu6f339002023-04-20 07:39:35 +0800564 lib-python:
565 needs: compiler
Jiayu Liue7f1a262024-11-06 11:37:25 +0800566 runs-on: ubuntu-24.04
Jiayu Liu6f339002023-04-20 07:39:35 +0800567 strategy:
568 matrix:
Gregg Donovan62ec9292026-01-29 16:51:37 -0500569 python-version: &python_versions ["3.10", "3.11", "3.12", "3.13", "3.14"]
Yuxuan 'fishy' Wange4970302023-06-27 09:47:58 -0700570 fail-fast: false
Jiayu Liu6f339002023-04-20 07:39:35 +0800571 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000572 - uses: actions/checkout@v6
Jiayu Liu6f339002023-04-20 07:39:35 +0800573
574 - name: Install dependencies
575 run: |
576 sudo apt-get update -yq
577 sudo apt-get install -y --no-install-recommends $BUILD_DEPS
578 sudo apt-get install -y --no-install-recommends curl openssl ca-certificates
579
580 - name: Set up Python
dependabot[bot]1a5b7fc2025-10-01 06:01:59 +0000581 uses: actions/setup-python@v6
Jiayu Liu6f339002023-04-20 07:39:35 +0800582 with:
583 python-version: ${{ matrix.python-version }}
584
585 - name: Python setup
586 run: |
Gregg Donovan62ec9292026-01-29 16:51:37 -0500587 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 +0800588 python --version
589 pip --version
590
Jiayu Liu6f339002023-04-20 07:39:35 +0800591 - name: Run bootstrap
592 run: ./bootstrap.sh
593
Carel Combrinkf2534ad2025-11-11 12:51:21 +0000594 - name: Run configure
Jiayu Liu6f339002023-04-20 07:39:35 +0800595 run: |
596 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-py3/with-py3/')
597
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000598 - uses: actions/download-artifact@v8
Jiayu Liu6f339002023-04-20 07:39:35 +0800599 with:
600 name: thrift-compiler
601 path: compiler/cpp
602
603 - name: Run thrift-compiler
604 run: |
605 chmod a+x compiler/cpp/thrift
606 compiler/cpp/thrift -version
607
608 - name: Run make for python
609 run: make -C lib/py
610
611 - name: Run make install for python
612 run: sudo make -C lib/py install
613
Carel Combrink7770d272025-11-11 14:07:19 +0200614 - name: Run make check for python libs
Jiayu Liu6f339002023-04-20 07:39:35 +0800615 run: make -C lib/py check
616
Carel Combrink7770d272025-11-11 14:07:19 +0200617 - name: Run make check for python code
618 run: make -C test/py check
619
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500620 - name: Run make precross for python
621 if: matrix.python-version == '3.12'
622 run: make -C test/py precross
623
624 - name: Upload python precross artifacts
625 if: matrix.python-version == '3.12'
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000626 uses: actions/upload-artifact@v7
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500627 with:
628 name: py-precross
629 if-no-files-found: error
630 path: |
631 lib/py/build/lib.*
632 test/py/gen-py
633 test/py/TestClient.py
634 test/py/TestServer.py
635 test/py/util.py
636 retention-days: 3
637
Gregg Donovan62ec9292026-01-29 16:51:37 -0500638 lib-python-macos:
639 needs: compiler-macos
640 strategy:
641 matrix:
642 os: *macos_versions
643 python-version: *python_versions
644 fail-fast: false
645 runs-on: ${{ matrix.os }}
646 steps:
647 - uses: actions/checkout@v6
648
649 - name: Install dependencies
650 run: |
651 brew install automake bison flex boost libevent openssl libtool pkg-config
652 echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
653
654 - name: Set up Python
655 uses: actions/setup-python@v6
656 with:
657 python-version: ${{ matrix.python-version }}
658
659 - name: Python setup
660 run: |
661 python -m pip install --upgrade pip setuptools wheel flake8 "tornado>=6.3.0" "twisted>=24.3.0" "zope.interface>=6.1"
662 python --version
663 pip --version
664
665 - name: Run bootstrap
666 run: ./bootstrap.sh
667
668 - name: Run configure
669 run: ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-py3/with-py3/')
670
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000671 - uses: actions/download-artifact@v8
Gregg Donovan62ec9292026-01-29 16:51:37 -0500672 with:
673 name: thrift-compiler-${{ matrix.os }}
674 path: compiler/cpp
675
676 - name: Run thrift-compiler
677 run: |
678 chmod a+x compiler/cpp/thrift
679 compiler/cpp/thrift -version
680
681 - name: Run make for python
682 run: make -C lib/py
683
684 - name: Run make install for python
685 run: |
686 sudo make -C lib/py install PY_PREFIX="$(python -c 'import sys; print(sys.prefix)')"
687
688 - name: Run make for python libs
689 run: make -C lib/py
690
691 - name: Run make check for python libs
692 run: make -C lib/py check
693
694 - name: Run make check for python code
695 run: make -C test/py check
696
Cameron Martinab706522025-01-12 08:54:49 +0000697 lib-nodejs:
698 needs: compiler
699 runs-on: ubuntu-24.04
700 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000701 - uses: actions/checkout@v6
Cameron Martinab706522025-01-12 08:54:49 +0000702
703 - name: Run bootstrap
704 run: ./bootstrap.sh
705
706 - name: Run configure
707 run: |
Cameron Martina675c4f2025-01-15 16:38:07 +0000708 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed -E 's/without-node([tj])s/with-node\1s/g')
Cameron Martinab706522025-01-12 08:54:49 +0000709
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000710 - uses: actions/download-artifact@v8
Cameron Martinab706522025-01-12 08:54:49 +0000711 with:
712 name: thrift-compiler
713 path: compiler/cpp
714
715 - name: Run thrift-compiler
716 run: |
717 chmod a+x compiler/cpp/thrift
718 compiler/cpp/thrift -version
719
Cameron Martina675c4f2025-01-15 16:38:07 +0000720 - name: Run js tests
Cameron Martinab706522025-01-12 08:54:49 +0000721 run: make -C lib/nodejs check
722
Cameron Martina675c4f2025-01-15 16:38:07 +0000723 - name: Run ts tests
724 run: make -C lib/nodets check
725
CJCombrinkdfeab8d2026-03-06 07:03:56 +0100726 - name: Run js precross
727 run: make -C lib/nodejs precross
728
729 - name: Run ts precross
730 run: make -C lib/nodets precross
731
732 - name: Upload nodejs precross artifacts
733 uses: actions/upload-artifact@v7
734 with:
735 name: nodejs-precross
736 if-no-files-found: error
737 include-hidden-files: true
738 path: |
739 lib/nodejs/test/gen-nodejs
740 lib/nodets/test/gen-nodejs
741 lib/nodets/test-compiled
742 retention-days: 3
743
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200744 lib-cpp:
745 needs: compiler
746 runs-on: ubuntu-24.04
747 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000748 - uses: actions/checkout@v6
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200749
750 - name: Install dependencies
751 run: |
752 sudo apt-get update -yq
753 sudo apt-get install -y --no-install-recommends g++ $BUILD_DEPS locales
754 sudo locale-gen en_US.UTF-8
755 sudo locale-gen de_DE.UTF-8
756 sudo update-locale
757
758 - name: Run bootstrap
759 run: ./bootstrap.sh
760
761 - name: Run configure
762 run: |
763 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed -E 's/without-cpp/with-cpp/g')
764
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000765 - uses: actions/download-artifact@v8
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200766 with:
767 name: thrift-compiler
768 path: compiler/cpp
769
770 - name: Run thrift-compiler
771 run: |
772 chmod a+x compiler/cpp/thrift
773 compiler/cpp/thrift -version
774
775 - name: Run make for cpp
776 run: make -j$(nproc) -C lib/cpp
777
778 - name: Run make check for lib/cpp
779 run: make -j$(nproc) -C lib/cpp check
780
781 - name: Run make check for test/cpp
782 run: make -j$(nproc) -C test/cpp check
783
784 - name: Run make precross for cpp test
785 run: make -j$(nproc) -C test/cpp precross
786
787 - name: Upload cpp precross artifacts
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000788 uses: actions/upload-artifact@v7
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200789 with:
790 name: cpp-precross
791 if-no-files-found: error
792 include-hidden-files: true
793 path: |
794 test/cpp/TestClient
795 test/cpp/TestServer
796 test/cpp/.libs/TestClient
797 test/cpp/.libs/TestServer
798 lib/cpp/.libs/*.so
799 retention-days: 3
800
801 - name: Upload log files from failed test runs
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000802 uses: actions/upload-artifact@v7
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200803 if: failure()
804 with:
805 name: lib-cpp-test-log
806 path: lib/cpp/test/*.xml
807 retention-days: 3
808
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500809 lib-ruby:
810 needs: compiler
811 runs-on: ubuntu-24.04
Dmytro Shteflyuk75a28772025-12-17 17:07:27 -0500812 name: lib-ruby (${{ matrix.ruby-version }}) ${{ matrix.skip-build-ext && 'noext' || '' }}
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500813 strategy:
814 matrix:
815 ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0", "head"]
Dmytro Shteflyuk75a28772025-12-17 17:07:27 -0500816 skip-build-ext: [false]
817 include:
818 - ruby-version: "2.7"
819 skip-build-ext: true
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500820 fail-fast: false
Dmytro Shteflyuk75a28772025-12-17 17:07:27 -0500821 env:
822 SKIP_BUILD_EXT: ${{ matrix.skip-build-ext && '1' || '' }}
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500823 steps:
dependabot[bot]d4cbd782026-02-04 16:10:02 +0000824 - uses: actions/checkout@v6
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500825
826 - name: Set up Ruby
827 uses: ruby/setup-ruby@v1
828 with:
829 ruby-version: ${{ matrix.ruby-version }}
830 bundler-cache: true
831 working-directory: lib/rb
832
833 - name: Run bootstrap
834 run: ./bootstrap.sh
835
836 - name: Run configure
837 run: |
838 ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-ruby/with-ruby/')
839
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000840 - uses: actions/download-artifact@v8
Dmytro Shteflyuk6e5e1812025-11-19 18:20:45 -0500841 with:
842 name: thrift-compiler
843 path: compiler/cpp
844
845 - name: Run thrift-compiler
846 run: |
847 chmod a+x compiler/cpp/thrift
848 compiler/cpp/thrift -version
849
850 - name: Run make for ruby
851 run: make -C lib/rb
852
853 - name: Run make check for lib/rb
854 run: make -C lib/rb check
855
856 - name: Run make check for test/rb
857 run: make -C test/rb check
858
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500859 - name: Run make precross for ruby test
860 run: make -C test/rb precross
861
862 - name: Upload ruby precross artifacts
863 # has to match the version used in cross-test
864 if: matrix.ruby-version == '2.7' && matrix.skip-build-ext == false
dependabot[bot]99e0f6f2026-03-01 06:02:57 +0000865 uses: actions/upload-artifact@v7
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500866 with:
867 name: rb-precross
868 if-no-files-found: error
869 path: |
870 test/rb/gen-rb/*
871 lib/rb/ext/*.so
872 retention-days: 3
873
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800874 cross-test:
875 needs:
876 - lib-java-kotlin
Jens Geyere4666f22026-02-20 00:12:57 +0100877 #- lib-swift # currently broken and no maintainers around -> see THRIFT-5864
878 #- lib-rust # currently broken and no maintainers around -> see THRIFT-5917
Jiayu Liud21e95a2022-10-09 08:49:29 +0800879 - lib-go
Jiayu Liu6f339002023-04-20 07:39:35 +0800880 - lib-python
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200881 - lib-cpp
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500882 - lib-ruby
CJCombrinkdfeab8d2026-03-06 07:03:56 +0100883 - lib-nodejs
Jiayu Liue7f1a262024-11-06 11:37:25 +0800884 runs-on: ubuntu-24.04
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800885 strategy:
886 matrix:
Jens Geyer63b7a262025-05-25 14:48:57 +0200887 # swift is currently broken and no maintainers around -> see THRIFT-5864
Jens Geyere4666f22026-02-20 00:12:57 +0100888 # rust currently broken and no maintainers around -> see THRIFT-5917
Careled55a182025-11-14 10:54:52 +0200889 # kotlin cross test are failing -> see THRIFT-5879
CJCombrinkdfeab8d2026-03-06 07:03:56 +0100890 server_lang: ['java', 'go', 'cpp', 'py', 'rb', 'nodejs', 'nodets']
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800891 # we always use comma join as many client langs as possible, to reduce the number of jobs
CJCombrinkdfeab8d2026-03-06 07:03:56 +0100892 client_lang: ['java,kotlin', 'go,cpp,py,nodejs,nodets', 'rb']
Jiayu Liu790d4cb2023-04-27 11:35:17 +0800893 fail-fast: false
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800894 steps:
dependabot[bot]d90f2bb2025-12-01 06:29:38 +0000895 - uses: actions/checkout@v6
Jiayu Liud21e95a2022-10-09 08:49:29 +0800896
dependabot[bot]1a5b7fc2025-10-01 06:01:59 +0000897 - uses: actions/setup-python@v6
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800898 with:
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500899 python-version: "3.12"
900
901 - name: Install Python test dependencies
902 run: |
903 python -m pip install --upgrade pip setuptools
904 python -m pip install "tornado>=6.3.0" "twisted>=24.3.0" "zope.interface>=6.1"
Jiayu Liud21e95a2022-10-09 08:49:29 +0800905
dependabot[bot]eaec8982025-09-05 15:53:08 -0400906 - uses: actions/setup-java@v5
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800907 with:
908 distribution: temurin
Jiayu Liube73a572023-04-14 11:02:43 +0800909 # here we intentionally use an older version so that we also verify Java 17 compiles to it
Fokko Driesprong0b14a1b2023-04-14 11:06:15 +0200910 java-version: 8
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800911 cache: "gradle"
912
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500913 - uses: ruby/setup-ruby@v1
914 with:
915 ruby-version: "2.7"
916 bundler-cache: true
917 working-directory: test/rb
918
Jiayu Liud21e95a2022-10-09 08:49:29 +0800919 - name: Install openssl and certificates (for SSL tests)
920 run: |
921 sudo apt-get update -yq
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200922 sudo apt-get install -y --no-install-recommends \
923 openssl \
924 ca-certificates \
925 libboost-all-dev \
926 libevent-dev
Jiayu Liud21e95a2022-10-09 08:49:29 +0800927
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800928 - name: Download java precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000929 uses: actions/download-artifact@v8
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800930 with:
931 name: java-precross
932 path: lib/java/build
933
934 - name: Download kotlin precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000935 uses: actions/download-artifact@v8
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800936 with:
937 name: kotlin-precross
938 path: lib/kotlin
939
Jens Geyere4666f22026-02-20 00:12:57 +0100940 - name: Download swift precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000941 uses: actions/download-artifact@v8
Jens Geyere4666f22026-02-20 00:12:57 +0100942 if: false # currently broken and no maintainers around -> see THRIFT-5864
943 with:
944 name: swift-precross
945 path: test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug
Kino Roya9da9eb2022-10-07 23:13:01 -0700946
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800947 - name: Download rust precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000948 uses: actions/download-artifact@v8
Jens Geyere4666f22026-02-20 00:12:57 +0100949 if: false # currently broken and no maintainers around -> see THRIFT-5917
Jiayu Liu0aad2ae2022-10-08 13:22:24 +0800950 with:
951 name: rs-precross
952 path: test/rs/bin
953
Jiayu Liud21e95a2022-10-09 08:49:29 +0800954 - name: Download go precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000955 uses: actions/download-artifact@v8
Jiayu Liud21e95a2022-10-09 08:49:29 +0800956 with:
957 name: go-precross
958 path: test/go/bin
959
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200960 - name: Download cpp precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000961 uses: actions/download-artifact@v8
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200962 with:
963 name: cpp-precross
964 path: .
965
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500966 - name: Download python precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000967 uses: actions/download-artifact@v8
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500968 with:
969 name: py-precross
970 path: .
971
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500972 - name: Download ruby precross artifacts
dependabot[bot]2ee7d112026-03-01 06:03:04 +0000973 uses: actions/download-artifact@v8
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500974 with:
975 name: rb-precross
976 path: .
977
CJCombrinkdfeab8d2026-03-06 07:03:56 +0100978 - name: Download nodejs and nodets precross artifacts
979 uses: actions/download-artifact@v8
980 with:
981 name: nodejs-precross
982 path: lib
983
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800984 - name: Set back executable flags
985 run: |
Yuxuan 'fishy' Wang716835f2025-05-28 15:44:53 -0700986 chmod a+x lib/java/build/run*
987 chmod a+x lib/kotlin/cross-test-client/build/install/TestClient/bin/*
988 chmod a+x lib/kotlin/cross-test-server/build/install/TestServer/bin/*
989 # THRIFT-5864 chmod a+x test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/*
Jens Geyere4666f22026-02-20 00:12:57 +0100990 # THRIFT-5917 chmod a+x test/rs/bin/*
Yuxuan 'fishy' Wang716835f2025-05-28 15:44:53 -0700991 chmod a+x test/go/bin/*
Carel Combrinkfbe685a2025-06-05 08:38:07 +0200992 chmod a+x test/cpp/*
993 chmod a+x test/cpp/.libs/*
994 chmod a+x lib/cpp/.libs/*.so
Gregg Donovanc99d09a2026-02-01 08:36:17 -0500995 chmod a+x test/py/*.py
Dmytro Shteflyuk84554fa2025-11-19 19:41:05 -0500996 chmod a+x lib/rb/ext/*.so
Jiayu Liuab83ffc2022-05-10 01:56:30 +0800997
CJCombrinkdfeab8d2026-03-06 07:03:56 +0100998 - name: Installs for nodets and nodejs
999 run: |
1000 npm install .
1001 cd lib/nodejs/test/ && npm install .
1002
Kino Roy29d87732023-02-20 22:32:43 -08001003 - name: Create tmp domain socket folder
1004 run: mkdir /tmp/v0.16
1005
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001006 - name: Run cross test
1007 env:
1008 THRIFT_CROSSTEST_CONCURRENCY: 4
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001009 run: |
1010 python test/test.py \
1011 --retry-count 5 \
1012 --skip-known-failures \
Jiayu Liu790d4cb2023-04-27 11:35:17 +08001013 --server ${{ matrix.server_lang }} \
1014 --client ${{ matrix.client_lang }}
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001015
1016 - name: Upload log files from failed cross test runs
dependabot[bot]99e0f6f2026-03-01 06:02:57 +00001017 uses: actions/upload-artifact@v7
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001018 if: failure()
1019 with:
Sven Roederer18b0de62024-07-06 03:59:37 +02001020 name: cross-test-log_${{ matrix.server_lang }}-${{ matrix.client_lang }}
Jiayu Liuab83ffc2022-05-10 01:56:30 +08001021 path: test/log/
1022 retention-days: 3