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