Build //:artifacts.tar #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build //:artifacts.tar | |
run-name: Build //:artifacts.tar | |
# This gives read-only access to the token. | |
permissions: read-all | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
bazel-build: | |
strategy: | |
matrix: | |
includescanner: ["goma", "clangscandeps"] | |
os: ["ubuntu-20.04", "macos-13", "windows-2019"] | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true # Allow other marix jobs to complete if one fails | |
steps: | |
# Clean up unused tools to have more disk space in the GitHub hosted runner. | |
- if: runner.os == 'Linux' | |
name: Free disk space | |
run: | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: '3.11' | |
- name: Get Bazel | |
uses: bazel-contrib/setup-bazel@e403ad507104847c3539436f64a9e9eecc73eeec # v0.8.5 | |
with: | |
# Avoid downloading Bazel every time. | |
bazelisk-cache: true | |
# Disk and repository caches are disabled on mac due to some build errors with c-ares~/ares* symbols when they are used. | |
# Store build cache per workflow unless running on mac. | |
# See https://docs.github.com/en/actions/learn-github-actions/expressions#format for format function syntax | |
disk-cache: ${{ runner.os != 'macOS' && format('{0} {1}', github.workflow, matrix.includescanner) || false }} | |
# Use repository cache unless running on mac. | |
repository-cache: ${{ runner.os != 'macOS' }} | |
# Checkout the depot tools they are needed by the goma repository | |
- if: runner.os != 'Windows' | |
name: Checkout depot tools | |
run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
- if: runner.os != 'Windows' | |
name: Update PATH | |
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH | |
- if: runner.os == 'Windows' | |
name: Checkout depot tools (win) | |
run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git C:\src\depot_tools | |
- if: runner.os == 'macOS' | |
name: Remove Openssl | |
run: sudo rm -rf /usr/local/include/openssl /usr/local/lib/libcrypto.* | |
- if: runner.os == 'Windows' | |
name: Add depot tools to path (win) | |
run: | | |
Add-Content $env:GITHUB_ENV "BAZEL_SH=C:\MSYS64\usr\bin\bash.exe" | |
echo C:\MSYS64\usr\bin | Out-File -FilePath $env:GITHUB_PATH -Append | |
echo C:\msys64\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Append | |
- name: Bazel Build | |
run: bazelisk build --config=${{ matrix.includescanner }} --jobs=50 --//:use_android_glibc=true --verbose_failures //:artifacts.tar || bazelisk config --dump_all |