| 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 | 1e3d90d | 2023-04-14 23:57:33 +0800 | [diff] [blame] | 11 | CONFIG_ARGS_FOR_LIBS: > |
| 12 | --disable-debug |
| Jiayu Liu | 1e3d90d | 2023-04-14 23:57:33 +0800 | [diff] [blame] | 13 | --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 Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 35 | |
| Varun Sharma | bd1e5db | 2022-09-14 07:31:30 -0700 | [diff] [blame] | 36 | permissions: |
| 37 | contents: read |
| 38 | |
| Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 39 | jobs: |
| 40 | # TODO windows and macos |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 41 | compiler: |
| Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 42 | strategy: |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 43 | matrix: |
| Yuxuan 'fishy' Wang | 7e45f58 | 2025-04-17 08:41:21 -0700 | [diff] [blame] | 44 | os: |
| 45 | - ubuntu-22.04 |
| 46 | - ubuntu-24.04 |
| Yuxuan 'fishy' Wang | e497030 | 2023-06-27 09:47:58 -0700 | [diff] [blame] | 47 | fail-fast: false |
| Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 48 | runs-on: ${{ matrix.os }} |
| 49 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 50 | - uses: actions/checkout@v6 |
| Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 51 | |
| 52 | - name: Install dependencies |
| 53 | run: | |
| Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 54 | sudo apt-get update -yq |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 55 | sudo apt-get install -y --no-install-recommends g++ $BUILD_DEPS |
| Jiayu Liu | 6a61c4e | 2022-04-29 01:25:39 +0800 | [diff] [blame] | 56 | |
| 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 Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 71 | |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 72 | # only upload while building ubuntu-24.04 |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 73 | - name: Archive built thrift compiler |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 74 | if: matrix.os == 'ubuntu-24.04' |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 75 | uses: actions/upload-artifact@v6 |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 76 | with: |
| 77 | name: thrift-compiler |
| 78 | path: compiler/cpp/thrift |
| 79 | retention-days: 3 |
| 80 | |
| Gregg Donovan | 62ec929 | 2026-01-29 16:51:37 -0500 | [diff] [blame^] | 81 | compiler-macos: |
| 82 | strategy: |
| 83 | matrix: |
| 84 | os: &macos_versions [macos-15-intel, macos-14, macos-15, macos-26] |
| 85 | fail-fast: false |
| 86 | runs-on: ${{ matrix.os }} |
| 87 | steps: |
| 88 | - uses: actions/checkout@v6 |
| 89 | |
| 90 | - name: Install dependencies |
| 91 | run: | |
| 92 | brew install automake bison flex boost libevent openssl libtool pkg-config |
| 93 | echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH |
| 94 | |
| 95 | - name: Run bootstrap |
| 96 | run: ./bootstrap.sh |
| 97 | |
| 98 | - name: Run configure |
| 99 | run: ./configure --disable-debug --disable-tests --disable-libs |
| 100 | |
| 101 | - name: Run make |
| 102 | run: make -j$(sysctl -n hw.ncpu) |
| 103 | |
| 104 | - name: Run install |
| 105 | run: sudo make install |
| 106 | |
| 107 | - name: Run thrift version |
| 108 | run: /usr/local/bin/thrift -version |
| 109 | |
| 110 | - name: Archive built thrift compiler (macOS) |
| 111 | uses: actions/upload-artifact@v5 |
| 112 | with: |
| 113 | name: thrift-compiler-${{ matrix.os }} |
| 114 | path: compiler/cpp/thrift |
| 115 | retention-days: 3 |
| 116 | |
| Volodymyr Panivko | 8e828c0 | 2024-02-19 11:34:48 +0100 | [diff] [blame] | 117 | lib-php: |
| 118 | needs: compiler |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 119 | runs-on: ubuntu-24.04 |
| Volodymyr Panivko | 8e828c0 | 2024-02-19 11:34:48 +0100 | [diff] [blame] | 120 | strategy: |
| 121 | matrix: |
| vladimir.panivko | f692702 | 2024-02-24 17:12:10 +0100 | [diff] [blame] | 122 | php-version: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3] |
| Volodymyr Panivko | 8e828c0 | 2024-02-19 11:34:48 +0100 | [diff] [blame] | 123 | fail-fast: false |
| 124 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 125 | - uses: actions/checkout@v6 |
| Volodymyr Panivko | 8e828c0 | 2024-02-19 11:34:48 +0100 | [diff] [blame] | 126 | |
| 127 | - name: Set up PHP |
| 128 | uses: shivammathur/setup-php@v2 |
| 129 | with: |
| 130 | php-version: ${{ matrix.php-version }} |
| Volodymyr Panivko | 9913004 | 2024-03-02 21:41:01 +0100 | [diff] [blame] | 131 | extensions: mbstring, intl, xml, curl |
| Volodymyr Panivko | ac52d8d | 2024-02-22 22:09:00 +0100 | [diff] [blame] | 132 | ini-values: "error_reporting=E_ALL" |
| Volodymyr Panivko | 8e828c0 | 2024-02-19 11:34:48 +0100 | [diff] [blame] | 133 | |
| 134 | - name: Install Dependencies |
| 135 | run: composer install |
| 136 | |
| Volodymyr Panivko | 8e828c0 | 2024-02-19 11:34:48 +0100 | [diff] [blame] | 137 | - name: Run bootstrap |
| 138 | run: ./bootstrap.sh |
| 139 | |
| 140 | - name: Run configure |
| 141 | run: | |
| 142 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-php/with-php/' | sed 's/without-php_extension/with-php_extension/' ) |
| 143 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 144 | - uses: actions/download-artifact@v7 |
| Volodymyr Panivko | 8e828c0 | 2024-02-19 11:34:48 +0100 | [diff] [blame] | 145 | with: |
| 146 | name: thrift-compiler |
| 147 | path: compiler/cpp |
| 148 | |
| 149 | - name: Run thrift-compiler |
| 150 | run: | |
| 151 | chmod a+x compiler/cpp/thrift |
| 152 | compiler/cpp/thrift -version |
| 153 | |
| 154 | - name: Build Thrift Classes |
| 155 | run: | |
| 156 | mkdir -p ./lib/php/test/Resources/packages/php |
| 157 | mkdir -p ./lib/php/test/Resources/packages/phpv |
| 158 | mkdir -p ./lib/php/test/Resources/packages/phpvo |
| 159 | mkdir -p ./lib/php/test/Resources/packages/phpjs |
| Volodymyr Panivko | 14fc2be | 2024-02-22 18:17:40 +0100 | [diff] [blame] | 160 | mkdir -p ./lib/php/test/Resources/packages/phpcm |
| Volodymyr Panivko | 68139d1 | 2024-03-19 23:14:07 +0100 | [diff] [blame] | 161 | compiler/cpp/thrift --gen php:nsglobal="Basic" -r --out ./lib/php/test/Resources/packages/php lib/php/test/Resources/ThriftTest.thrift |
| 162 | compiler/cpp/thrift --gen php:validate,nsglobal="Validate" -r --out ./lib/php/test/Resources/packages/phpv lib/php/test/Resources/ThriftTest.thrift |
| 163 | compiler/cpp/thrift --gen php:validate,oop,nsglobal="ValidateOop" -r --out ./lib/php/test/Resources/packages/phpvo lib/php/test/Resources/ThriftTest.thrift |
| 164 | compiler/cpp/thrift --gen php:json,nsglobal="Json" -r --out ./lib/php/test/Resources/packages/phpjs lib/php/test/Resources/ThriftTest.thrift |
| 165 | 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 Panivko | 8e828c0 | 2024-02-19 11:34:48 +0100 | [diff] [blame] | 166 | |
| 167 | - name: Run Tests |
| 168 | run: vendor/bin/phpunit -c lib/php/phpunit.xml |
| 169 | |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 170 | lib-go: |
| 171 | needs: compiler |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 172 | runs-on: ubuntu-24.04 |
| Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 173 | strategy: |
| 174 | matrix: |
| 175 | go: |
| Yuxuan 'fishy' Wang | 624118f | 2025-02-11 12:52:42 -0800 | [diff] [blame] | 176 | - '1.24' |
| Yuxuan 'fishy' Wang | 3b86252 | 2025-08-13 09:02:51 -0700 | [diff] [blame] | 177 | - '1.25' |
| Yuxuan 'fishy' Wang | e497030 | 2023-06-27 09:47:58 -0700 | [diff] [blame] | 178 | fail-fast: false |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 179 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 180 | - uses: actions/checkout@v6 |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 181 | |
| dependabot[bot] | 755f7d9 | 2025-10-01 06:01:55 +0000 | [diff] [blame] | 182 | - uses: actions/setup-go@v6 |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 183 | with: |
| Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 184 | go-version: ${{ matrix.go }} |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 185 | |
| 186 | - name: Install dependencies |
| 187 | run: | |
| 188 | sudo apt-get update -yq |
| 189 | sudo apt-get install -y --no-install-recommends $BUILD_DEPS |
| 190 | |
| 191 | - name: Run bootstrap |
| 192 | run: ./bootstrap.sh |
| 193 | |
| 194 | - name: Run configure |
| 195 | run: | |
| Jiayu Liu | 1e3d90d | 2023-04-14 23:57:33 +0800 | [diff] [blame] | 196 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-go/with-go/') |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 197 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 198 | - uses: actions/download-artifact@v7 |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 199 | with: |
| 200 | name: thrift-compiler |
| 201 | path: compiler/cpp |
| 202 | |
| 203 | - name: Run thrift-compiler |
| 204 | run: | |
| 205 | chmod a+x compiler/cpp/thrift |
| 206 | compiler/cpp/thrift -version |
| 207 | |
| 208 | - name: Run make for go |
| 209 | run: make -C lib/go |
| 210 | |
| Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 211 | - name: Run make check for lib/go |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 212 | run: make -C lib/go check |
| 213 | |
| Yuxuan 'fishy' Wang | 19c13b4 | 2022-10-12 14:13:15 -0700 | [diff] [blame] | 214 | - name: Run make check for test/go |
| 215 | run: make -C test/go check |
| 216 | |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 217 | - name: Run make precross for go test |
| 218 | run: make -C test/go precross |
| 219 | |
| 220 | - name: Upload go precross artifacts |
| Yuxuan 'fishy' Wang | 3b86252 | 2025-08-13 09:02:51 -0700 | [diff] [blame] | 221 | if: matrix.go == '1.25' |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 222 | uses: actions/upload-artifact@v6 |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 223 | with: |
| 224 | name: go-precross |
| 225 | if-no-files-found: error |
| 226 | path: | |
| 227 | test/go/bin/* |
| 228 | retention-days: 3 |
| 229 | |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 230 | lib-java-kotlin: |
| 231 | needs: compiler |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 232 | runs-on: ubuntu-24.04 |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 233 | env: |
| Jiayu Liu | d40dd72 | 2023-10-19 08:37:49 +0800 | [diff] [blame] | 234 | GRADLE_VERSION: "8.4" |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 235 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 236 | - uses: actions/checkout@v6 |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 237 | |
| dependabot[bot] | eaec898 | 2025-09-05 15:53:08 -0400 | [diff] [blame] | 238 | - uses: actions/setup-java@v5 |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 239 | with: |
| 240 | distribution: temurin |
| Jiayu Liu | 92b007f | 2022-10-14 13:16:18 +0800 | [diff] [blame] | 241 | java-version: 17 |
| Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 242 | cache: "gradle" |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 243 | |
| 244 | - name: Install dependencies |
| 245 | run: | |
| 246 | sudo apt-get update -yq |
| 247 | sudo apt-get install -y --no-install-recommends $BUILD_DEPS |
| 248 | sudo apt-get install -y wget unzip ant maven |
| 249 | |
| 250 | - name: Setup gradle |
| 251 | run: | |
| 252 | wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip |
| Jiayu Liu | d40dd72 | 2023-10-19 08:37:49 +0800 | [diff] [blame] | 253 | (echo "3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 254 | unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip |
| 255 | sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle |
| 256 | sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin |
| 257 | gradle --version |
| 258 | |
| Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 259 | - name: Run spotlessCheck for Java |
| Jiayu Liu | 53ec082 | 2022-05-06 12:56:42 +0800 | [diff] [blame] | 260 | run: | |
| 261 | cd lib/java |
| 262 | gradle spotlessCheck |
| 263 | |
| Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 264 | - name: Run ktfmtCheck for Kotlin |
| 265 | run: | |
| 266 | cd lib/kotlin |
| 267 | gradle ktfmtCheck |
| 268 | |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 269 | - name: Run bootstrap |
| 270 | run: ./bootstrap.sh |
| 271 | |
| 272 | - name: Run configure |
| 273 | run: | |
| Jiayu Liu | 1e3d90d | 2023-04-14 23:57:33 +0800 | [diff] [blame] | 274 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-java/with-java/' | sed 's/without-kotlin/with-kotlin/') |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 275 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 276 | - uses: actions/download-artifact@v7 |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 277 | with: |
| 278 | name: thrift-compiler |
| 279 | path: compiler/cpp |
| 280 | |
| 281 | - name: Run thrift-compiler |
| 282 | run: | |
| 283 | chmod a+x compiler/cpp/thrift |
| 284 | compiler/cpp/thrift -version |
| 285 | |
| Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 286 | - name: Run make for java |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 287 | run: make -C lib/java |
| 288 | |
| Jiayu Liu | 5b15838 | 2022-05-12 00:20:37 +0800 | [diff] [blame] | 289 | # this will invoke publishToMavenLocal and install locally |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 290 | - name: Run make install for java |
| 291 | run: make -C lib/java install |
| 292 | |
| 293 | - name: Upload java libthrift artifacts |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 294 | uses: actions/upload-artifact@v6 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 295 | with: |
| 296 | name: libthrift |
| 297 | if-no-files-found: error |
| 298 | path: ~/.m2/repository/org/apache/thrift |
| 299 | |
| Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 300 | - name: Run make check for java |
| 301 | run: make -C lib/java check |
| 302 | |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 303 | - name: Run make precross for java |
| 304 | run: make -C lib/java precross |
| 305 | |
| 306 | - name: Upload java precross artifacts |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 307 | uses: actions/upload-artifact@v6 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 308 | with: |
| 309 | name: java-precross |
| 310 | if-no-files-found: error |
| 311 | path: | |
| 312 | lib/java/build/functionalTestJar/ |
| HTHou | b5919dd | 2026-01-05 12:17:56 +0800 | [diff] [blame] | 313 | lib/java/build/runnonblockingclient |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 314 | lib/java/build/runclient |
| 315 | lib/java/build/runnonblockingserver |
| 316 | lib/java/build/runserver |
| 317 | lib/java/build/runservletserver |
| 318 | retention-days: 3 |
| 319 | |
| Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 320 | - name: Run make for kotlin |
| Jiayu Liu | c77d91a | 2022-05-03 20:55:50 +0800 | [diff] [blame] | 321 | run: make -C lib/kotlin |
| Jiayu Liu | bcac978 | 2022-05-07 08:35:09 +0800 | [diff] [blame] | 322 | |
| 323 | - name: Run make check for kotlin |
| 324 | run: make -C lib/kotlin check |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 325 | |
| 326 | - name: Run make precross for kotlin |
| 327 | run: make -C lib/kotlin precross |
| 328 | |
| 329 | - name: Upload kotlin precross artifacts |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 330 | uses: actions/upload-artifact@v6 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 331 | with: |
| 332 | name: kotlin-precross |
| 333 | if-no-files-found: error |
| 334 | path: | |
| 335 | lib/kotlin/cross-test-client/build/install/TestClient/ |
| 336 | lib/kotlin/cross-test-server/build/install/TestServer/ |
| 337 | retention-days: 3 |
| 338 | |
| Sven Roederer | cb9cead | 2024-07-05 12:47:41 +0200 | [diff] [blame] | 339 | lib-netstd: |
| 340 | needs: compiler |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 341 | runs-on: ubuntu-24.04 |
| Sven Roederer | cb9cead | 2024-07-05 12:47:41 +0200 | [diff] [blame] | 342 | strategy: |
| 343 | fail-fast: false |
| Jens Geyer | 2f214c2 | 2025-11-13 23:24:45 +0100 | [diff] [blame] | 344 | defaults: |
| 345 | run: |
| 346 | shell: bash # required by net install script |
| Sven Roederer | cb9cead | 2024-07-05 12:47:41 +0200 | [diff] [blame] | 347 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 348 | - uses: actions/checkout@v6 |
| Sven Roederer | cb9cead | 2024-07-05 12:47:41 +0200 | [diff] [blame] | 349 | |
| 350 | - name: Install dependencies |
| 351 | run: | |
| 352 | sudo apt-get update -yq |
| 353 | sudo apt-get install -y --no-install-recommends $BUILD_DEPS |
| 354 | sudo apt-get install -y --no-install-recommends curl openssl ca-certificates |
| 355 | |
| Jens Geyer | 2f214c2 | 2025-11-13 23:24:45 +0100 | [diff] [blame] | 356 | # This whole setup is getting worse: https://github.com/dotnet/core/discussions/9258 |
| 357 | - name: Set up .NET SDK (via install script) |
| Jens Geyer | 3a37d15 | 2024-11-14 23:03:25 +0100 | [diff] [blame] | 358 | run: | |
| Jens Geyer | 2f214c2 | 2025-11-13 23:24:45 +0100 | [diff] [blame] | 359 | # remove any existing install |
| HTHou | b5919dd | 2026-01-05 12:17:56 +0800 | [diff] [blame] | 360 | sudo apt remove dotnet* |
| Jens Geyer | 2f214c2 | 2025-11-13 23:24:45 +0100 | [diff] [blame] | 361 | # install key |
| 362 | sudo apt install gpg |
| 363 | wget https://dot.net/v1/dotnet-install.asc |
| HTHou | b5919dd | 2026-01-05 12:17:56 +0800 | [diff] [blame] | 364 | gpg --import dotnet-install.asc |
| Jens Geyer | 2f214c2 | 2025-11-13 23:24:45 +0100 | [diff] [blame] | 365 | # download and verify |
| 366 | wget https://dot.net/v1/dotnet-install.sh |
| 367 | wget https://dot.net/v1/dotnet-install.sig |
| HTHou | b5919dd | 2026-01-05 12:17:56 +0800 | [diff] [blame] | 368 | gpg --verify dotnet-install.sig dotnet-install.sh |
| Jens Geyer | 2f214c2 | 2025-11-13 23:24:45 +0100 | [diff] [blame] | 369 | # run install script |
| 370 | chmod +x dotnet-install.sh |
| HTHou | b5919dd | 2026-01-05 12:17:56 +0800 | [diff] [blame] | 371 | ./dotnet-install.sh --channel 10.0 |
| Jens Geyer | 2f214c2 | 2025-11-13 23:24:45 +0100 | [diff] [blame] | 372 | # export env vars |
| 373 | export DOTNET_ROOT=$HOME/.dotnet |
| HTHou | b5919dd | 2026-01-05 12:17:56 +0800 | [diff] [blame] | 374 | export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools |
| Jens Geyer | 2f214c2 | 2025-11-13 23:24:45 +0100 | [diff] [blame] | 375 | dotnet --list-sdks |
| 376 | |
| 377 | # the sdk is installed by default, but keep this step for reference |
| 378 | # especially newer versions are NOT always pre-installed, so manually again |
| 379 | # - name: Set up .NET SDK |
| 380 | # run: | |
| 381 | # sudo add-apt-repository -y ppa:dotnet/backports |
| 382 | # sudo apt-get install -y --no-install-recommends dotnet-sdk-10.0 |
| Jens Geyer | 3a37d15 | 2024-11-14 23:03:25 +0100 | [diff] [blame] | 383 | # end |
| Sven Roederer | cb9cead | 2024-07-05 12:47:41 +0200 | [diff] [blame] | 384 | |
| 385 | - name: Run bootstrap |
| 386 | run: ./bootstrap.sh |
| 387 | |
| 388 | - name: Run configure for netstd |
| 389 | run: | |
| 390 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-netstd/with-netstd/') |
| 391 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 392 | - uses: actions/download-artifact@v7 |
| Sven Roederer | cb9cead | 2024-07-05 12:47:41 +0200 | [diff] [blame] | 393 | with: |
| 394 | name: thrift-compiler |
| 395 | path: compiler/cpp |
| 396 | |
| 397 | - name: Run thrift-compiler |
| 398 | run: | |
| 399 | chmod a+x compiler/cpp/thrift |
| 400 | compiler/cpp/thrift -version |
| 401 | |
| 402 | - name: Run make for netstd |
| 403 | run: make -C lib/netstd |
| 404 | |
| 405 | - name: Run make install for netstd |
| 406 | run: sudo make -C lib/netstd install |
| 407 | |
| 408 | - name: Run make check for netstd |
| 409 | run: make -C lib/netstd check |
| 410 | |
| 411 | - name: Run make check for test/netstd |
| 412 | run: make -C test/netstd check |
| 413 | |
| 414 | - name: Run make precross for test/netstd |
| 415 | run: make -C test/netstd precross |
| 416 | |
| 417 | - name: Upload netstd precross artifacts |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 418 | uses: actions/upload-artifact@v6 |
| Sven Roederer | cb9cead | 2024-07-05 12:47:41 +0200 | [diff] [blame] | 419 | with: |
| 420 | name: netstd-precross |
| 421 | if-no-files-found: error |
| 422 | path: | |
| 423 | test/netstd/Client/bin/Release/ |
| 424 | test/netstd/Server/bin/Release/ |
| 425 | retention-days: 3 |
| 426 | |
| Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 427 | lib-swift: |
| 428 | needs: compiler |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 429 | runs-on: ubuntu-24.04 |
| Jens Geyer | 63b7a26 | 2025-05-25 14:48:57 +0200 | [diff] [blame] | 430 | if: false # swift is currently broken and no maintainers around -> see THRIFT-5864 |
| Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 431 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 432 | - uses: actions/checkout@v6 |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 433 | |
| Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 434 | - name: Run bootstrap |
| 435 | run: ./bootstrap.sh |
| 436 | |
| 437 | - name: Run configure |
| 438 | run: | |
| Jiayu Liu | 1e3d90d | 2023-04-14 23:57:33 +0800 | [diff] [blame] | 439 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-swift/with-swift/') |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 440 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 441 | - uses: actions/download-artifact@v7 |
| Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 442 | with: |
| 443 | name: thrift-compiler |
| 444 | path: compiler/cpp |
| 445 | |
| 446 | - name: Run thrift-compiler |
| 447 | run: | |
| 448 | chmod a+x compiler/cpp/thrift |
| 449 | compiler/cpp/thrift -version |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 450 | |
| Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 451 | - name: Run make precross for swift |
| 452 | run: make -C test/swift precross |
| 453 | |
| 454 | - name: Upload swift precross artifacts |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 455 | uses: actions/upload-artifact@v6 |
| Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 456 | with: |
| 457 | name: swift-precross |
| 458 | if-no-files-found: error |
| 459 | path: | |
| 460 | test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestServer |
| 461 | test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestClient |
| 462 | retention-days: 3 |
| 463 | |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 464 | lib-rust: |
| 465 | needs: compiler |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 466 | runs-on: ubuntu-24.04 |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 467 | env: |
| Cameron Martin | da54fc8 | 2025-01-12 08:55:45 +0000 | [diff] [blame] | 468 | TOOLCHAIN_VERSION: 1.83.0 |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 469 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 470 | - uses: actions/checkout@v6 |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 471 | |
| 472 | - name: Install dependencies |
| 473 | run: | |
| 474 | sudo apt-get update -yq |
| 475 | sudo apt-get install -y --no-install-recommends curl $BUILD_DEPS |
| 476 | |
| 477 | - name: Setup cargo |
| 478 | run: | |
| 479 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| 480 | rustup update |
| 481 | rustup install $TOOLCHAIN_VERSION |
| 482 | rustup default $TOOLCHAIN_VERSION |
| 483 | rustup --version |
| 484 | cargo --version |
| 485 | rustc --version |
| 486 | |
| 487 | - name: Run bootstrap |
| 488 | run: ./bootstrap.sh |
| 489 | |
| 490 | - name: Run configure |
| 491 | run: | |
| Jiayu Liu | 1e3d90d | 2023-04-14 23:57:33 +0800 | [diff] [blame] | 492 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-rs/with-rs/') |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 493 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 494 | - uses: actions/download-artifact@v7 |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 495 | with: |
| 496 | name: thrift-compiler |
| 497 | path: compiler/cpp |
| 498 | |
| 499 | - name: Run thrift-compiler |
| 500 | run: | |
| 501 | chmod a+x compiler/cpp/thrift |
| 502 | compiler/cpp/thrift -version |
| 503 | |
| 504 | - name: Run make for rust |
| 505 | run: make -C lib/rs |
| 506 | |
| 507 | - name: Run make check for rust |
| 508 | run: make -C lib/rs check |
| 509 | |
| 510 | - name: Run make test for rust |
| 511 | run: make -C lib/rs/test check |
| 512 | |
| 513 | - name: Run make precross for test rust |
| 514 | run: make -C test/rs precross |
| 515 | |
| 516 | - name: Upload rust precross artifacts |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 517 | uses: actions/upload-artifact@v6 |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 518 | with: |
| 519 | name: rs-precross |
| 520 | if-no-files-found: error |
| 521 | path: | |
| 522 | test/rs/bin/test_server |
| 523 | test/rs/bin/test_client |
| 524 | retention-days: 3 |
| 525 | |
| 526 | - name: Run make test_recursive for rust |
| 527 | run: make -C lib/rs/test_recursive check |
| 528 | |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 529 | lib-python: |
| 530 | needs: compiler |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 531 | runs-on: ubuntu-24.04 |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 532 | strategy: |
| 533 | matrix: |
| Gregg Donovan | 62ec929 | 2026-01-29 16:51:37 -0500 | [diff] [blame^] | 534 | python-version: &python_versions ["3.10", "3.11", "3.12", "3.13", "3.14"] |
| Yuxuan 'fishy' Wang | e497030 | 2023-06-27 09:47:58 -0700 | [diff] [blame] | 535 | fail-fast: false |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 536 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 537 | - uses: actions/checkout@v6 |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 538 | |
| 539 | - name: Install dependencies |
| 540 | run: | |
| 541 | sudo apt-get update -yq |
| 542 | sudo apt-get install -y --no-install-recommends $BUILD_DEPS |
| 543 | sudo apt-get install -y --no-install-recommends curl openssl ca-certificates |
| 544 | |
| 545 | - name: Set up Python |
| dependabot[bot] | 1a5b7fc | 2025-10-01 06:01:59 +0000 | [diff] [blame] | 546 | uses: actions/setup-python@v6 |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 547 | with: |
| 548 | python-version: ${{ matrix.python-version }} |
| 549 | |
| 550 | - name: Python setup |
| 551 | run: | |
| Gregg Donovan | 62ec929 | 2026-01-29 16:51:37 -0500 | [diff] [blame^] | 552 | python -m pip install --upgrade pip setuptools wheel flake8 "tornado>=6.3.0" "twisted>=24.3.0" "zope.interface>=6.1" |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 553 | python --version |
| 554 | pip --version |
| 555 | |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 556 | - name: Run bootstrap |
| 557 | run: ./bootstrap.sh |
| 558 | |
| Carel Combrink | f2534ad | 2025-11-11 12:51:21 +0000 | [diff] [blame] | 559 | - name: Run configure |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 560 | run: | |
| 561 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-py3/with-py3/') |
| 562 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 563 | - uses: actions/download-artifact@v7 |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 564 | with: |
| 565 | name: thrift-compiler |
| 566 | path: compiler/cpp |
| 567 | |
| 568 | - name: Run thrift-compiler |
| 569 | run: | |
| 570 | chmod a+x compiler/cpp/thrift |
| 571 | compiler/cpp/thrift -version |
| 572 | |
| 573 | - name: Run make for python |
| 574 | run: make -C lib/py |
| 575 | |
| 576 | - name: Run make install for python |
| 577 | run: sudo make -C lib/py install |
| 578 | |
| 579 | # - name: Run make install-exec-hook for python |
| 580 | # run: sudo make -C lib/py install-exec-hook |
| 581 | |
| Carel Combrink | 7770d27 | 2025-11-11 14:07:19 +0200 | [diff] [blame] | 582 | - name: Run make for python libs |
| 583 | run: make -C lib/py |
| 584 | |
| 585 | - name: Run make check for python libs |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 586 | run: make -C lib/py check |
| 587 | |
| Carel Combrink | 7770d27 | 2025-11-11 14:07:19 +0200 | [diff] [blame] | 588 | - name: Run make check for python code |
| 589 | run: make -C test/py check |
| 590 | |
| Gregg Donovan | 62ec929 | 2026-01-29 16:51:37 -0500 | [diff] [blame^] | 591 | lib-python-macos: |
| 592 | needs: compiler-macos |
| 593 | strategy: |
| 594 | matrix: |
| 595 | os: *macos_versions |
| 596 | python-version: *python_versions |
| 597 | fail-fast: false |
| 598 | runs-on: ${{ matrix.os }} |
| 599 | steps: |
| 600 | - uses: actions/checkout@v6 |
| 601 | |
| 602 | - name: Install dependencies |
| 603 | run: | |
| 604 | brew install automake bison flex boost libevent openssl libtool pkg-config |
| 605 | echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH |
| 606 | |
| 607 | - name: Set up Python |
| 608 | uses: actions/setup-python@v6 |
| 609 | with: |
| 610 | python-version: ${{ matrix.python-version }} |
| 611 | |
| 612 | - name: Python setup |
| 613 | run: | |
| 614 | python -m pip install --upgrade pip setuptools wheel flake8 "tornado>=6.3.0" "twisted>=24.3.0" "zope.interface>=6.1" |
| 615 | python --version |
| 616 | pip --version |
| 617 | |
| 618 | - name: Run bootstrap |
| 619 | run: ./bootstrap.sh |
| 620 | |
| 621 | - name: Run configure |
| 622 | run: ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-py3/with-py3/') |
| 623 | |
| 624 | - uses: actions/download-artifact@v6 |
| 625 | with: |
| 626 | name: thrift-compiler-${{ matrix.os }} |
| 627 | path: compiler/cpp |
| 628 | |
| 629 | - name: Run thrift-compiler |
| 630 | run: | |
| 631 | chmod a+x compiler/cpp/thrift |
| 632 | compiler/cpp/thrift -version |
| 633 | |
| 634 | - name: Run make for python |
| 635 | run: make -C lib/py |
| 636 | |
| 637 | - name: Run make install for python |
| 638 | run: | |
| 639 | sudo make -C lib/py install PY_PREFIX="$(python -c 'import sys; print(sys.prefix)')" |
| 640 | |
| 641 | - name: Run make for python libs |
| 642 | run: make -C lib/py |
| 643 | |
| 644 | - name: Run make check for python libs |
| 645 | run: make -C lib/py check |
| 646 | |
| 647 | - name: Run make check for python code |
| 648 | run: make -C test/py check |
| 649 | |
| Cameron Martin | ab70652 | 2025-01-12 08:54:49 +0000 | [diff] [blame] | 650 | lib-nodejs: |
| 651 | needs: compiler |
| 652 | runs-on: ubuntu-24.04 |
| 653 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 654 | - uses: actions/checkout@v6 |
| Cameron Martin | ab70652 | 2025-01-12 08:54:49 +0000 | [diff] [blame] | 655 | |
| 656 | - name: Run bootstrap |
| 657 | run: ./bootstrap.sh |
| 658 | |
| 659 | - name: Run configure |
| 660 | run: | |
| Cameron Martin | a675c4f | 2025-01-15 16:38:07 +0000 | [diff] [blame] | 661 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed -E 's/without-node([tj])s/with-node\1s/g') |
| Cameron Martin | ab70652 | 2025-01-12 08:54:49 +0000 | [diff] [blame] | 662 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 663 | - uses: actions/download-artifact@v7 |
| Cameron Martin | ab70652 | 2025-01-12 08:54:49 +0000 | [diff] [blame] | 664 | with: |
| 665 | name: thrift-compiler |
| 666 | path: compiler/cpp |
| 667 | |
| 668 | - name: Run thrift-compiler |
| 669 | run: | |
| 670 | chmod a+x compiler/cpp/thrift |
| 671 | compiler/cpp/thrift -version |
| 672 | |
| Cameron Martin | a675c4f | 2025-01-15 16:38:07 +0000 | [diff] [blame] | 673 | - name: Run js tests |
| Cameron Martin | ab70652 | 2025-01-12 08:54:49 +0000 | [diff] [blame] | 674 | run: make -C lib/nodejs check |
| 675 | |
| Cameron Martin | a675c4f | 2025-01-15 16:38:07 +0000 | [diff] [blame] | 676 | - name: Run ts tests |
| 677 | run: make -C lib/nodets check |
| 678 | |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 679 | lib-cpp: |
| 680 | needs: compiler |
| 681 | runs-on: ubuntu-24.04 |
| 682 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 683 | - uses: actions/checkout@v6 |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 684 | |
| 685 | - name: Install dependencies |
| 686 | run: | |
| 687 | sudo apt-get update -yq |
| 688 | sudo apt-get install -y --no-install-recommends g++ $BUILD_DEPS locales |
| 689 | sudo locale-gen en_US.UTF-8 |
| 690 | sudo locale-gen de_DE.UTF-8 |
| 691 | sudo update-locale |
| 692 | |
| 693 | - name: Run bootstrap |
| 694 | run: ./bootstrap.sh |
| 695 | |
| 696 | - name: Run configure |
| 697 | run: | |
| 698 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed -E 's/without-cpp/with-cpp/g') |
| 699 | |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 700 | - uses: actions/download-artifact@v7 |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 701 | with: |
| 702 | name: thrift-compiler |
| 703 | path: compiler/cpp |
| 704 | |
| 705 | - name: Run thrift-compiler |
| 706 | run: | |
| 707 | chmod a+x compiler/cpp/thrift |
| 708 | compiler/cpp/thrift -version |
| 709 | |
| 710 | - name: Run make for cpp |
| 711 | run: make -j$(nproc) -C lib/cpp |
| 712 | |
| 713 | - name: Run make check for lib/cpp |
| 714 | run: make -j$(nproc) -C lib/cpp check |
| 715 | |
| 716 | - name: Run make check for test/cpp |
| 717 | run: make -j$(nproc) -C test/cpp check |
| 718 | |
| 719 | - name: Run make precross for cpp test |
| 720 | run: make -j$(nproc) -C test/cpp precross |
| 721 | |
| 722 | - name: Upload cpp precross artifacts |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 723 | uses: actions/upload-artifact@v6 |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 724 | with: |
| 725 | name: cpp-precross |
| 726 | if-no-files-found: error |
| 727 | include-hidden-files: true |
| 728 | path: | |
| 729 | test/cpp/TestClient |
| 730 | test/cpp/TestServer |
| 731 | test/cpp/.libs/TestClient |
| 732 | test/cpp/.libs/TestServer |
| 733 | lib/cpp/.libs/*.so |
| 734 | retention-days: 3 |
| 735 | |
| 736 | - name: Upload log files from failed test runs |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 737 | uses: actions/upload-artifact@v6 |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 738 | if: failure() |
| 739 | with: |
| 740 | name: lib-cpp-test-log |
| 741 | path: lib/cpp/test/*.xml |
| 742 | retention-days: 3 |
| 743 | |
| Dmytro Shteflyuk | 6e5e181 | 2025-11-19 18:20:45 -0500 | [diff] [blame] | 744 | lib-ruby: |
| 745 | needs: compiler |
| 746 | runs-on: ubuntu-24.04 |
| Dmytro Shteflyuk | 75a2877 | 2025-12-17 17:07:27 -0500 | [diff] [blame] | 747 | name: lib-ruby (${{ matrix.ruby-version }}) ${{ matrix.skip-build-ext && 'noext' || '' }} |
| Dmytro Shteflyuk | 6e5e181 | 2025-11-19 18:20:45 -0500 | [diff] [blame] | 748 | strategy: |
| 749 | matrix: |
| 750 | ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0", "head"] |
| Dmytro Shteflyuk | 75a2877 | 2025-12-17 17:07:27 -0500 | [diff] [blame] | 751 | skip-build-ext: [false] |
| 752 | include: |
| 753 | - ruby-version: "2.7" |
| 754 | skip-build-ext: true |
| Dmytro Shteflyuk | 6e5e181 | 2025-11-19 18:20:45 -0500 | [diff] [blame] | 755 | fail-fast: false |
| Dmytro Shteflyuk | 75a2877 | 2025-12-17 17:07:27 -0500 | [diff] [blame] | 756 | env: |
| 757 | SKIP_BUILD_EXT: ${{ matrix.skip-build-ext && '1' || '' }} |
| Dmytro Shteflyuk | 6e5e181 | 2025-11-19 18:20:45 -0500 | [diff] [blame] | 758 | steps: |
| 759 | - uses: actions/checkout@v5 |
| 760 | |
| 761 | - name: Set up Ruby |
| 762 | uses: ruby/setup-ruby@v1 |
| 763 | with: |
| 764 | ruby-version: ${{ matrix.ruby-version }} |
| 765 | bundler-cache: true |
| 766 | working-directory: lib/rb |
| 767 | |
| 768 | - name: Run bootstrap |
| 769 | run: ./bootstrap.sh |
| 770 | |
| 771 | - name: Run configure |
| 772 | run: | |
| 773 | ./configure $(echo $CONFIG_ARGS_FOR_LIBS | sed 's/without-ruby/with-ruby/') |
| 774 | |
| 775 | - uses: actions/download-artifact@v6 |
| 776 | with: |
| 777 | name: thrift-compiler |
| 778 | path: compiler/cpp |
| 779 | |
| 780 | - name: Run thrift-compiler |
| 781 | run: | |
| 782 | chmod a+x compiler/cpp/thrift |
| 783 | compiler/cpp/thrift -version |
| 784 | |
| 785 | - name: Run make for ruby |
| 786 | run: make -C lib/rb |
| 787 | |
| 788 | - name: Run make check for lib/rb |
| 789 | run: make -C lib/rb check |
| 790 | |
| 791 | - name: Run make check for test/rb |
| 792 | run: make -C test/rb check |
| 793 | |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 794 | cross-test: |
| 795 | needs: |
| 796 | - lib-java-kotlin |
| Jens Geyer | 63b7a26 | 2025-05-25 14:48:57 +0200 | [diff] [blame] | 797 | #- lib-swift # swift is currently broken and no maintainers around -> see THRIFT-5864 |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 798 | - lib-rust |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 799 | - lib-go |
| Jiayu Liu | 6f33900 | 2023-04-20 07:39:35 +0800 | [diff] [blame] | 800 | - lib-python |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 801 | - lib-cpp |
| Jiayu Liu | e7f1a26 | 2024-11-06 11:37:25 +0800 | [diff] [blame] | 802 | runs-on: ubuntu-24.04 |
| Jiayu Liu | 790d4cb | 2023-04-27 11:35:17 +0800 | [diff] [blame] | 803 | strategy: |
| 804 | matrix: |
| Jens Geyer | 63b7a26 | 2025-05-25 14:48:57 +0200 | [diff] [blame] | 805 | # swift is currently broken and no maintainers around -> see THRIFT-5864 |
| Carel | ed55a18 | 2025-11-14 10:54:52 +0200 | [diff] [blame] | 806 | # kotlin cross test are failing -> see THRIFT-5879 |
| 807 | server_lang: ['java', 'go', 'rs', 'cpp'] |
| Jiayu Liu | 790d4cb | 2023-04-27 11:35:17 +0800 | [diff] [blame] | 808 | # we always use comma join as many client langs as possible, to reduce the number of jobs |
| HTHou | d9b4d95 | 2026-01-05 14:37:48 +0800 | [diff] [blame] | 809 | client_lang: ['java,kotlin', 'go,rs,cpp'] |
| Jiayu Liu | 790d4cb | 2023-04-27 11:35:17 +0800 | [diff] [blame] | 810 | fail-fast: false |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 811 | steps: |
| dependabot[bot] | d90f2bb | 2025-12-01 06:29:38 +0000 | [diff] [blame] | 812 | - uses: actions/checkout@v6 |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 813 | |
| dependabot[bot] | 1a5b7fc | 2025-10-01 06:01:59 +0000 | [diff] [blame] | 814 | - uses: actions/setup-python@v6 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 815 | with: |
| Carel Combrink | 5abe53f | 2025-11-13 06:16:41 +0100 | [diff] [blame] | 816 | python-version: "3.x" |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 817 | |
| dependabot[bot] | eaec898 | 2025-09-05 15:53:08 -0400 | [diff] [blame] | 818 | - uses: actions/setup-java@v5 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 819 | with: |
| 820 | distribution: temurin |
| Jiayu Liu | be73a57 | 2023-04-14 11:02:43 +0800 | [diff] [blame] | 821 | # here we intentionally use an older version so that we also verify Java 17 compiles to it |
| Fokko Driesprong | 0b14a1b | 2023-04-14 11:06:15 +0200 | [diff] [blame] | 822 | java-version: 8 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 823 | cache: "gradle" |
| 824 | |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 825 | - name: Install openssl and certificates (for SSL tests) |
| 826 | run: | |
| 827 | sudo apt-get update -yq |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 828 | sudo apt-get install -y --no-install-recommends \ |
| 829 | openssl \ |
| 830 | ca-certificates \ |
| 831 | libboost-all-dev \ |
| 832 | libevent-dev |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 833 | |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 834 | - name: Download java precross artifacts |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 835 | uses: actions/download-artifact@v7 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 836 | with: |
| 837 | name: java-precross |
| 838 | path: lib/java/build |
| 839 | |
| 840 | - name: Download kotlin precross artifacts |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 841 | uses: actions/download-artifact@v7 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 842 | with: |
| 843 | name: kotlin-precross |
| 844 | path: lib/kotlin |
| 845 | |
| Jens Geyer | 63b7a26 | 2025-05-25 14:48:57 +0200 | [diff] [blame] | 846 | # swift is currently broken and no maintainers around -> see THRIFT-5864 |
| 847 | #- name: Download swift precross artifacts |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 848 | # uses: actions/download-artifact@v7 |
| Jens Geyer | 63b7a26 | 2025-05-25 14:48:57 +0200 | [diff] [blame] | 849 | # with: |
| 850 | # name: swift-precross |
| 851 | # path: test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug |
| Kino Roy | a9da9eb | 2022-10-07 23:13:01 -0700 | [diff] [blame] | 852 | |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 853 | - name: Download rust precross artifacts |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 854 | uses: actions/download-artifact@v7 |
| Jiayu Liu | 0aad2ae | 2022-10-08 13:22:24 +0800 | [diff] [blame] | 855 | with: |
| 856 | name: rs-precross |
| 857 | path: test/rs/bin |
| 858 | |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 859 | - name: Download go precross artifacts |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 860 | uses: actions/download-artifact@v7 |
| Jiayu Liu | d21e95a | 2022-10-09 08:49:29 +0800 | [diff] [blame] | 861 | with: |
| 862 | name: go-precross |
| 863 | path: test/go/bin |
| 864 | |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 865 | - name: Download cpp precross artifacts |
| dependabot[bot] | 22ffdc7 | 2026-01-01 06:01:58 +0000 | [diff] [blame] | 866 | uses: actions/download-artifact@v7 |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 867 | with: |
| 868 | name: cpp-precross |
| 869 | path: . |
| 870 | |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 871 | - name: Set back executable flags |
| 872 | run: | |
| Yuxuan 'fishy' Wang | 716835f | 2025-05-28 15:44:53 -0700 | [diff] [blame] | 873 | chmod a+x lib/java/build/run* |
| 874 | chmod a+x lib/kotlin/cross-test-client/build/install/TestClient/bin/* |
| 875 | chmod a+x lib/kotlin/cross-test-server/build/install/TestServer/bin/* |
| 876 | # THRIFT-5864 chmod a+x test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/* |
| 877 | chmod a+x test/rs/bin/* |
| 878 | chmod a+x test/go/bin/* |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 879 | chmod a+x test/cpp/* |
| 880 | chmod a+x test/cpp/.libs/* |
| 881 | chmod a+x lib/cpp/.libs/*.so |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 882 | |
| Kino Roy | 29d8773 | 2023-02-20 22:32:43 -0800 | [diff] [blame] | 883 | - name: Create tmp domain socket folder |
| 884 | run: mkdir /tmp/v0.16 |
| 885 | |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 886 | - name: Run cross test |
| 887 | env: |
| 888 | THRIFT_CROSSTEST_CONCURRENCY: 4 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 889 | run: | |
| 890 | python test/test.py \ |
| 891 | --retry-count 5 \ |
| 892 | --skip-known-failures \ |
| Jiayu Liu | 790d4cb | 2023-04-27 11:35:17 +0800 | [diff] [blame] | 893 | --server ${{ matrix.server_lang }} \ |
| 894 | --client ${{ matrix.client_lang }} |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 895 | |
| 896 | - name: Upload log files from failed cross test runs |
| dependabot[bot] | b8f2407 | 2026-01-01 06:01:45 +0000 | [diff] [blame] | 897 | uses: actions/upload-artifact@v6 |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 898 | if: failure() |
| 899 | with: |
| Sven Roederer | 18b0de6 | 2024-07-06 03:59:37 +0200 | [diff] [blame] | 900 | name: cross-test-log_${{ matrix.server_lang }}-${{ matrix.client_lang }} |
| Jiayu Liu | ab83ffc | 2022-05-10 01:56:30 +0800 | [diff] [blame] | 901 | path: test/log/ |
| 902 | retention-days: 3 |