Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 1 | name: "Build" |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 2 | |
Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 3 | on: |
| 4 | push: |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 5 | branches: ["*"] |
Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 6 | pull_request: |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 7 | branches: ["*"] |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 8 | |
| 9 | env: |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 10 | BUILD_DEPS: automake bison flex git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 11 | |
Varun Sharma | bd1e5db | 2022-09-14 07:31:30 -0700 | [diff] [blame] | 12 | permissions: |
| 13 | contents: read |
| 14 | |
Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 15 | jobs: |
| 16 | # TODO windows and macos |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 17 | compiler: |
Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 18 | strategy: |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 19 | matrix: |
Jiayu Liu | 564b287 | 2022-10-12 11:42:38 +0800 | [diff] [blame] | 20 | os: [ubuntu-20.04, ubuntu-22.04] |
Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 21 | runs-on: ${{ matrix.os }} |
| 22 | steps: |
| 23 | - uses: actions/checkout@v3 |
| 24 | |
| 25 | - name: Install dependencies |
| 26 | run: | |
Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 27 | sudo apt-get update -yq |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 28 | sudo apt-get install -y --no-install-recommends g++ $BUILD_DEPS |
Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 29 | |
| 30 | - name: Run bootstrap |
| 31 | run: ./bootstrap.sh |
| 32 | |
| 33 | - name: Run configure |
| 34 | run: ./configure --disable-debug --disable-tests --disable-libs |
| 35 | |
| 36 | - name: Run make |
| 37 | run: make -j$(nproc) |
| 38 | |
| 39 | - name: Run install |
| 40 | run: make install |
| 41 | |
| 42 | - name: Run thrift version |
| 43 | run: /usr/local/bin/thrift -version |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 44 | |
| 45 | # only upload while building ubuntu-20.04 |
| 46 | - name: Archive built thrift compiler |
| 47 | if: matrix.os == 'ubuntu-20.04' |
| 48 | uses: actions/upload-artifact@v3 |
| 49 | with: |
| 50 | name: thrift-compiler |
| 51 | path: compiler/cpp/thrift |
| 52 | retention-days: 3 |
| 53 | |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 54 | lib-go: |
| 55 | needs: compiler |
| 56 | runs-on: ubuntu-20.04 |
Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 57 | strategy: |
| 58 | matrix: |
| 59 | go: |
Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 60 | - '1.19' |
Yuxuan 'fishy' Wang | b94eac7 | 2023-02-02 09:41:31 -0800 | [diff] [blame] | 61 | - '1.20' |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 62 | steps: |
| 63 | - uses: actions/checkout@v3 |
| 64 | |
| 65 | - uses: actions/setup-go@v3 |
| 66 | with: |
Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 67 | go-version: ${{ matrix.go }} |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 68 | |
| 69 | - name: Install dependencies |
| 70 | run: | |
| 71 | sudo apt-get update -yq |
| 72 | sudo apt-get install -y --no-install-recommends $BUILD_DEPS |
| 73 | |
| 74 | - name: Run bootstrap |
| 75 | run: ./bootstrap.sh |
| 76 | |
| 77 | - name: Run configure |
| 78 | run: | |
| 79 | ./configure \ |
| 80 | --disable-debug \ |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 81 | --disable-dependency-tracking \ |
| 82 | --without-cpp \ |
| 83 | --without-c_glib \ |
| 84 | --without-java \ |
| 85 | --without-kotlin \ |
| 86 | --without-python \ |
| 87 | --without-py3 \ |
| 88 | --without-ruby \ |
| 89 | --without-haxe \ |
| 90 | --without-netstd \ |
| 91 | --without-perl \ |
| 92 | --without-php \ |
| 93 | --without-php_extension \ |
| 94 | --without-dart \ |
| 95 | --without-erlang \ |
| 96 | --with-go \ |
| 97 | --without-d \ |
| 98 | --without-nodejs \ |
| 99 | --without-nodets \ |
| 100 | --without-lua \ |
| 101 | --without-rs \ |
| 102 | --without-swift |
| 103 | |
| 104 | - uses: actions/download-artifact@v3 |
| 105 | with: |
| 106 | name: thrift-compiler |
| 107 | path: compiler/cpp |
| 108 | |
| 109 | - name: Run thrift-compiler |
| 110 | run: | |
| 111 | chmod a+x compiler/cpp/thrift |
| 112 | compiler/cpp/thrift -version |
| 113 | |
| 114 | - name: Run make for go |
| 115 | run: make -C lib/go |
| 116 | |
Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 117 | - name: Run make check for lib/go |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 118 | run: make -C lib/go check |
| 119 | |
Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 120 | - name: Run make check for test/go |
| 121 | run: make -C test/go check |
| 122 | |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 123 | - name: Run make precross for go test |
| 124 | run: make -C test/go precross |
| 125 | |
| 126 | - name: Upload go precross artifacts |
Yuxuan 'fishy' Wang | b94eac7 | 2023-02-02 09:41:31 -0800 | [diff] [blame] | 127 | if: matrix.go == '1.20' |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 128 | uses: actions/upload-artifact@v3 |
| 129 | with: |
| 130 | name: go-precross |
| 131 | if-no-files-found: error |
| 132 | path: | |
| 133 | test/go/bin/* |
| 134 | retention-days: 3 |
| 135 | |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 136 | lib-java-kotlin: |
| 137 | needs: compiler |
| 138 | runs-on: ubuntu-20.04 |
| 139 | env: |
Jiayu Liu | be73a57 | 2023-04-14 11:02:43 +0800 | [diff] [blame^] | 140 | GRADLE_VERSION: "8.0.2" |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 141 | steps: |
| 142 | - uses: actions/checkout@v3 |
| 143 | |
| 144 | - uses: actions/setup-java@v3 |
| 145 | with: |
| 146 | distribution: temurin |
Jiayu Liu | 92b007f | 2022-10-14 13:16:18 +0800 | [diff] [blame] | 147 | java-version: 17 |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 148 | cache: "gradle" |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 149 | |
| 150 | - name: Install dependencies |
| 151 | run: | |
| 152 | sudo apt-get update -yq |
| 153 | sudo apt-get install -y --no-install-recommends $BUILD_DEPS |
| 154 | sudo apt-get install -y wget unzip ant maven |
| 155 | |
| 156 | - name: Setup gradle |
| 157 | run: | |
| 158 | wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip |
Jiayu Liu | be73a57 | 2023-04-14 11:02:43 +0800 | [diff] [blame^] | 159 | (echo "ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 160 | unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip |
| 161 | sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle |
| 162 | sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin |
| 163 | gradle --version |
| 164 | |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 165 | - name: Run spotlessCheck for Java |
Jiayu Liu | 53ec082 | 2022-05-06 12:56:42 +0800 | [diff] [blame] | 166 | run: | |
| 167 | cd lib/java |
| 168 | gradle spotlessCheck |
| 169 | |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 170 | - name: Run ktfmtCheck for Kotlin |
| 171 | run: | |
| 172 | cd lib/kotlin |
| 173 | gradle ktfmtCheck |
| 174 | |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 175 | - name: Run bootstrap |
| 176 | run: ./bootstrap.sh |
| 177 | |
| 178 | - name: Run configure |
| 179 | run: | |
| 180 | ./configure \ |
| 181 | --disable-debug \ |
| 182 | --disable-tests \ |
| 183 | --disable-dependency-tracking \ |
| 184 | --without-cpp \ |
| 185 | --without-c_glib \ |
| 186 | --with-java \ |
| 187 | --with-kotlin \ |
| 188 | --without-python \ |
| 189 | --without-py3 \ |
| 190 | --without-ruby \ |
| 191 | --without-haxe \ |
| 192 | --without-netstd \ |
| 193 | --without-perl \ |
| 194 | --without-php \ |
| 195 | --without-php_extension \ |
| 196 | --without-dart \ |
| 197 | --without-erlang \ |
| 198 | --without-go \ |
| 199 | --without-d \ |
| 200 | --without-nodejs \ |
| 201 | --without-nodets \ |
| 202 | --without-lua \ |
| 203 | --without-rs \ |
| 204 | --without-swift |
| 205 | |
| 206 | - uses: actions/download-artifact@v3 |
| 207 | with: |
| 208 | name: thrift-compiler |
| 209 | path: compiler/cpp |
| 210 | |
| 211 | - name: Run thrift-compiler |
| 212 | run: | |
| 213 | chmod a+x compiler/cpp/thrift |
| 214 | compiler/cpp/thrift -version |
| 215 | |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 216 | - name: Run make for java |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 217 | run: make -C lib/java |
| 218 | |
Jiayu Liu | 5b15838 | 2022-05-12 00:20:37 +0800 | [diff] [blame] | 219 | # this will invoke publishToMavenLocal and install locally |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 220 | - name: Run make install for java |
| 221 | run: make -C lib/java install |
| 222 | |
| 223 | - name: Upload java libthrift artifacts |
| 224 | uses: actions/upload-artifact@v3 |
| 225 | with: |
| 226 | name: libthrift |
| 227 | if-no-files-found: error |
| 228 | path: ~/.m2/repository/org/apache/thrift |
| 229 | |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 230 | - name: Run make check for java |
| 231 | run: make -C lib/java check |
| 232 | |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 233 | - name: Run make precross for java |
| 234 | run: make -C lib/java precross |
| 235 | |
| 236 | - name: Upload java precross artifacts |
| 237 | uses: actions/upload-artifact@v3 |
| 238 | with: |
| 239 | name: java-precross |
| 240 | if-no-files-found: error |
| 241 | path: | |
| 242 | lib/java/build/functionalTestJar/ |
| 243 | lib/java/build/runclient |
| 244 | lib/java/build/runnonblockingserver |
| 245 | lib/java/build/runserver |
| 246 | lib/java/build/runservletserver |
| 247 | retention-days: 3 |
| 248 | |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 249 | - name: Run make for kotlin |
Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 250 | run: make -C lib/kotlin |
Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 251 | |
| 252 | - name: Run make check for kotlin |
| 253 | run: make -C lib/kotlin check |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 254 | |
| 255 | - name: Run make precross for kotlin |
| 256 | run: make -C lib/kotlin precross |
| 257 | |
| 258 | - name: Upload kotlin precross artifacts |
| 259 | uses: actions/upload-artifact@v3 |
| 260 | with: |
| 261 | name: kotlin-precross |
| 262 | if-no-files-found: error |
| 263 | path: | |
| 264 | lib/kotlin/cross-test-client/build/install/TestClient/ |
| 265 | lib/kotlin/cross-test-server/build/install/TestServer/ |
| 266 | retention-days: 3 |
| 267 | |
Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 268 | lib-swift: |
| 269 | needs: compiler |
| 270 | runs-on: ubuntu-20.04 |
| 271 | steps: |
| 272 | - uses: actions/checkout@v3 |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 273 | |
Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 274 | - name: Run bootstrap |
| 275 | run: ./bootstrap.sh |
| 276 | |
| 277 | - name: Run configure |
| 278 | run: | |
| 279 | ./configure \ |
| 280 | --disable-debug \ |
| 281 | --disable-tests \ |
| 282 | --disable-dependency-tracking \ |
| 283 | --without-cpp \ |
| 284 | --without-c_glib \ |
| 285 | --without-java \ |
| 286 | --without-kotlin \ |
| 287 | --without-python \ |
| 288 | --without-py3 \ |
| 289 | --without-ruby \ |
| 290 | --without-haxe \ |
| 291 | --without-netstd \ |
| 292 | --without-perl \ |
| 293 | --without-php \ |
| 294 | --without-php_extension \ |
| 295 | --without-dart \ |
| 296 | --without-erlang \ |
| 297 | --without-go \ |
| 298 | --without-d \ |
| 299 | --without-nodejs \ |
| 300 | --without-nodets \ |
| 301 | --without-lua \ |
| 302 | --without-rs \ |
| 303 | --with-swift |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 304 | |
Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 305 | - uses: actions/download-artifact@v3 |
| 306 | with: |
| 307 | name: thrift-compiler |
| 308 | path: compiler/cpp |
| 309 | |
| 310 | - name: Run thrift-compiler |
| 311 | run: | |
| 312 | chmod a+x compiler/cpp/thrift |
| 313 | compiler/cpp/thrift -version |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 314 | |
Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 315 | - name: Run make precross for swift |
| 316 | run: make -C test/swift precross |
| 317 | |
| 318 | - name: Upload swift precross artifacts |
| 319 | uses: actions/upload-artifact@v3 |
| 320 | with: |
| 321 | name: swift-precross |
| 322 | if-no-files-found: error |
| 323 | path: | |
| 324 | test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestServer |
| 325 | test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestClient |
| 326 | retention-days: 3 |
| 327 | |
Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 328 | lib-rust: |
| 329 | needs: compiler |
| 330 | runs-on: ubuntu-20.04 |
| 331 | env: |
| 332 | TOOLCHAIN_VERSION: 1.61.0 |
| 333 | steps: |
| 334 | - uses: actions/checkout@v3 |
| 335 | |
| 336 | - name: Install dependencies |
| 337 | run: | |
| 338 | sudo apt-get update -yq |
| 339 | sudo apt-get install -y --no-install-recommends curl $BUILD_DEPS |
| 340 | |
| 341 | - name: Setup cargo |
| 342 | run: | |
| 343 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| 344 | rustup update |
| 345 | rustup install $TOOLCHAIN_VERSION |
| 346 | rustup default $TOOLCHAIN_VERSION |
| 347 | rustup --version |
| 348 | cargo --version |
| 349 | rustc --version |
| 350 | |
| 351 | - name: Run bootstrap |
| 352 | run: ./bootstrap.sh |
| 353 | |
| 354 | - name: Run configure |
| 355 | run: | |
| 356 | ./configure \ |
| 357 | --disable-debug \ |
| 358 | --disable-tests \ |
| 359 | --disable-dependency-tracking \ |
| 360 | --without-cpp \ |
| 361 | --without-c_glib \ |
| 362 | --without-java \ |
| 363 | --without-kotlin \ |
| 364 | --without-python \ |
| 365 | --without-py3 \ |
| 366 | --without-ruby \ |
| 367 | --without-haxe \ |
| 368 | --without-netstd \ |
| 369 | --without-perl \ |
| 370 | --without-php \ |
| 371 | --without-php_extension \ |
| 372 | --without-dart \ |
| 373 | --without-erlang \ |
| 374 | --without-go \ |
| 375 | --without-d \ |
| 376 | --without-nodejs \ |
| 377 | --without-nodets \ |
| 378 | --without-lua \ |
| 379 | --with-rs \ |
| 380 | --without-swift |
| 381 | |
| 382 | - uses: actions/download-artifact@v3 |
| 383 | with: |
| 384 | name: thrift-compiler |
| 385 | path: compiler/cpp |
| 386 | |
| 387 | - name: Run thrift-compiler |
| 388 | run: | |
| 389 | chmod a+x compiler/cpp/thrift |
| 390 | compiler/cpp/thrift -version |
| 391 | |
| 392 | - name: Run make for rust |
| 393 | run: make -C lib/rs |
| 394 | |
| 395 | - name: Run make check for rust |
| 396 | run: make -C lib/rs check |
| 397 | |
| 398 | - name: Run make test for rust |
| 399 | run: make -C lib/rs/test check |
| 400 | |
| 401 | - name: Run make precross for test rust |
| 402 | run: make -C test/rs precross |
| 403 | |
| 404 | - name: Upload rust precross artifacts |
| 405 | uses: actions/upload-artifact@v3 |
| 406 | with: |
| 407 | name: rs-precross |
| 408 | if-no-files-found: error |
| 409 | path: | |
| 410 | test/rs/bin/test_server |
| 411 | test/rs/bin/test_client |
| 412 | retention-days: 3 |
| 413 | |
| 414 | - name: Run make test_recursive for rust |
| 415 | run: make -C lib/rs/test_recursive check |
| 416 | |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 417 | cross-test: |
| 418 | needs: |
| 419 | - lib-java-kotlin |
Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 420 | - lib-swift |
Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 421 | - lib-rust |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 422 | - lib-go |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 423 | runs-on: ubuntu-20.04 |
| 424 | steps: |
| 425 | - uses: actions/checkout@v3 |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 426 | |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 427 | - uses: actions/setup-python@v3 |
| 428 | with: |
| 429 | python-version: "3.x" |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 430 | |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 431 | - uses: actions/setup-java@v3 |
| 432 | with: |
| 433 | distribution: temurin |
Jiayu Liu | be73a57 | 2023-04-14 11:02:43 +0800 | [diff] [blame^] | 434 | # here we intentionally use an older version so that we also verify Java 17 compiles to it |
Jiayu Liu | 92b007f | 2022-10-14 13:16:18 +0800 | [diff] [blame] | 435 | java-version: 11 |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 436 | cache: "gradle" |
| 437 | |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 438 | - name: Install openssl and certificates (for SSL tests) |
| 439 | run: | |
| 440 | sudo apt-get update -yq |
| 441 | sudo apt-get install -y --no-install-recommends openssl ca-certificates |
| 442 | |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 443 | - name: Download java precross artifacts |
| 444 | uses: actions/download-artifact@v3 |
| 445 | with: |
| 446 | name: java-precross |
| 447 | path: lib/java/build |
| 448 | |
| 449 | - name: Download kotlin precross artifacts |
| 450 | uses: actions/download-artifact@v3 |
| 451 | with: |
| 452 | name: kotlin-precross |
| 453 | path: lib/kotlin |
| 454 | |
Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 455 | - name: Download swift precross artifacts |
| 456 | uses: actions/download-artifact@v3 |
| 457 | with: |
| 458 | name: swift-precross |
| 459 | path: test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug |
| 460 | |
Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 461 | - name: Download rust precross artifacts |
| 462 | uses: actions/download-artifact@v3 |
| 463 | with: |
| 464 | name: rs-precross |
| 465 | path: test/rs/bin |
| 466 | |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 467 | - name: Download go precross artifacts |
| 468 | uses: actions/download-artifact@v3 |
| 469 | with: |
| 470 | name: go-precross |
| 471 | path: test/go/bin |
| 472 | |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 473 | - name: Set back executable flags |
| 474 | run: | |
| 475 | chmod a+x \ |
| 476 | lib/java/build/run* \ |
| 477 | lib/kotlin/cross-test-client/build/install/TestClient/bin/* \ |
Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 478 | lib/kotlin/cross-test-server/build/install/TestServer/bin/* \ |
Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 479 | test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/* \ |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 480 | test/rs/bin/* \ |
| 481 | test/go/bin/* |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 482 | |
| 483 | - name: Run cross test |
| 484 | env: |
| 485 | THRIFT_CROSSTEST_CONCURRENCY: 4 |
Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 486 | PRECROSS_LANGS: java,kotlin,go,rs,swift |
Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 487 | run: | |
| 488 | python test/test.py \ |
| 489 | --retry-count 5 \ |
| 490 | --skip-known-failures \ |
| 491 | --server $PRECROSS_LANGS \ |
| 492 | --client $PRECROSS_LANGS |
| 493 | |
| 494 | - name: Upload log files from failed cross test runs |
| 495 | uses: actions/upload-artifact@v3 |
| 496 | if: failure() |
| 497 | with: |
| 498 | name: cross-test-log |
| 499 | path: test/log/ |
| 500 | retention-days: 3 |