|
191 | 191 | required: true
|
192 | 192 | type: string
|
193 | 193 |
|
| 194 | + brotli_revision: |
| 195 | + required: true |
| 196 | + type: string |
| 197 | + |
| 198 | + brotli_version: |
| 199 | + required: true |
| 200 | + type: string |
| 201 | + |
194 | 202 | ANDROID_API_LEVEL:
|
195 | 203 | required: true
|
196 | 204 | type: string
|
@@ -1308,6 +1316,94 @@ jobs:
|
1308 | 1316 | name: ${{ matrix.os }}-${{ matrix.arch }}-zlib-${{ inputs.zlib_version }}
|
1309 | 1317 | path: ${{ github.workspace }}/BuildRoot/Library/zlib-${{ inputs.zlib_version }}/usr
|
1310 | 1318 |
|
| 1319 | + brotli: |
| 1320 | + runs-on: ${{ inputs.default_build_runner }} |
| 1321 | + |
| 1322 | + strategy: |
| 1323 | + fail-fast: false |
| 1324 | + matrix: ${{ fromJSON(inputs.target_matrix) }} |
| 1325 | + |
| 1326 | + name: ${{ matrix.os }} ${{ matrix.arch }} brotli |
| 1327 | + |
| 1328 | + steps: |
| 1329 | + |
| 1330 | + with: |
| 1331 | + path: ${{ github.workspace }}/SourceCache/ci-build |
| 1332 | + show-progress: false |
| 1333 | + |
| 1334 | + - uses: ./SourceCache/ci-build/.github/actions/setup-build |
| 1335 | + with: |
| 1336 | + setup-vs-dev-env: ${{ matrix.os == 'Windows' }} |
| 1337 | + host-arch: ${{ matrix.arch }} |
| 1338 | + - uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master |
| 1339 | + if: inputs.build_os == 'Darwin' |
| 1340 | + |
| 1341 | + - name: Compute workspace hash |
| 1342 | + id: workspace_hash |
| 1343 | + run: | |
| 1344 | + $stringAsStream = [System.IO.MemoryStream]::new() |
| 1345 | + $writer = [System.IO.StreamWriter]::new($stringAsStream) |
| 1346 | + $writer.write("${{ github.workspace }}") |
| 1347 | + $writer.Flush() |
| 1348 | + $stringAsStream.Position = 0 |
| 1349 | + $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash |
| 1350 | + echo "hash=$hash" >> $env:GITHUB_OUTPUT |
| 1351 | + - name: Setup sccache |
| 1352 | + uses: ./SourceCache/ci-build/.github/actions/setup-sccache |
| 1353 | + with: |
| 1354 | + s3-bucket: ${{ vars.SCCACHE_S3_BUCKET }} |
| 1355 | + aws-region: ${{ vars.SCCACHE_AWS_REGION }} |
| 1356 | + aws-arn: ${{ vars.SCCACHE_AWS_ARN }} |
| 1357 | + disk-max-size: 100M |
| 1358 | + disk-cache-key: ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-brotli |
| 1359 | + |
| 1360 | + |
| 1361 | + with: |
| 1362 | + repository: google/brotli |
| 1363 | + ref: ${{ inputs.brotli_revision }} |
| 1364 | + path: ${{ github.workspace }}/SourceCache/brotli |
| 1365 | + show-progress: false |
| 1366 | + |
| 1367 | + - uses: nttld/setup-ndk@v1 |
| 1368 | + if: matrix.os == 'Android' |
| 1369 | + id: setup-ndk |
| 1370 | + with: |
| 1371 | + ndk-version: ${{ inputs.ANDROID_NDK_VERSION }} |
| 1372 | + local-cache: true |
| 1373 | + |
| 1374 | + - name: Configure brotli |
| 1375 | + uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project |
| 1376 | + with: |
| 1377 | + project-name: brotli |
| 1378 | + swift-version: ${{ inputs.swift_version }} |
| 1379 | + enable-caching: true |
| 1380 | + debug-info: ${{ inputs.debug_info }} |
| 1381 | + build-os: ${{ inputs.build_os }} |
| 1382 | + build-arch: ${{ inputs.build_arch }} |
| 1383 | + os: ${{ matrix.os }} |
| 1384 | + arch: ${{ matrix.arch }} |
| 1385 | + src-dir: ${{ github.workspace }}/SourceCache/brotli |
| 1386 | + bin-dir: ${{ github.workspace }}/BinaryCache/brotli-${{ inputs.brotli_version }} |
| 1387 | + install-dir: ${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr |
| 1388 | + android-api-level: ${{ inputs.ANDROID_API_LEVEL }} |
| 1389 | + android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }} |
| 1390 | + ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }} |
| 1391 | + msvc-compilers: '@("C")' |
| 1392 | + cmake-defines: | |
| 1393 | + @{ |
| 1394 | + 'BUILD_SHARED_LIBS' = "NO"; |
| 1395 | + 'CMAKE_POSITION_INDEPENDENT_CODE' = "YES"; |
| 1396 | + } |
| 1397 | + - name: Build brotli |
| 1398 | + run: cmake --build ${{ github.workspace }}/BinaryCache/brotli-${{ inputs.brotli_version }} |
| 1399 | + - name: Install brotli |
| 1400 | + run: cmake --build ${{ github.workspace }}/BinaryCache/brotli-${{ inputs.brotli_version }} --target install |
| 1401 | + |
| 1402 | + - uses: actions/upload-artifact@v4 |
| 1403 | + with: |
| 1404 | + name: ${{ matrix.os }}-${{ matrix.arch }}-brotli-${{ inputs.brotli_version }} |
| 1405 | + path: ${{ github.workspace }}/BuildRoot/Library/brotli-${{ inputs.brotli_version }}/usr |
| 1406 | + |
1311 | 1407 | curl:
|
1312 | 1408 | needs: [zlib]
|
1313 | 1409 | runs-on: ${{ inputs.default_build_runner }}
|
|
0 commit comments