Set indirect linking for non wasm / RISC-V targets #994
Workflow file for this run
This file contains hidden or 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: CI | |
| # Controls when the action will run. | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the main branch | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| workflow_call: | |
| concurrency: | |
| # Cancel previous actions from the same PR or branch except 'main' branch. | |
| # See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info. | |
| group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}} | |
| cancel-in-progress: ${{ github.ref_name != 'main' }} | |
| env: | |
| # hermeticbuild/hermetic-llvm already publishes this BuildBuddy key, so fork | |
| # pull requests can use remote execution without repository secrets. | |
| BUILDBUDDY_API_KEY: 4jtaxdhxtyu4ylxdEwI7 | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # only test on linux for now, macos is not ready. | |
| os: [ubuntu-latest, ubuntu-24.04-arm] | |
| bazel_version: [8.x, 9.x] | |
| folder: | |
| - "." | |
| - "test" | |
| runs-on: ${{ matrix.os }} | |
| # Configure a human readable name for each job | |
| name: Test ${{ matrix.folder }} with Bazel ${{ matrix.bazel_version }} on ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # test/git_crates/Cargo.toml exercises SSH-form GitHub dependencies, but | |
| # fork pull requests cannot access SSH_PRIVATE_KEY for that public repo. | |
| - name: Fetch public GitHub SSH dependencies over HTTPS | |
| shell: bash | |
| run: | | |
| git config --global --add url."https://github.com/".insteadOf "ssh://git@github.com/" | |
| git config --global --add url."https://github.com/".insteadOf "git@github.com:" | |
| # Cache build and external artifacts so that the next ci build is incremental. | |
| # Because github action caches cannot be updated after a build, we need to | |
| # store the contents of each build in a unique cache key, then fall back to loading | |
| # it on the next ci run. We use hashFiles(...) in the key and restore-keys- with | |
| # the prefix to load the most recent cache for the branch on a cache miss. You | |
| # should customize the contents of hashFiles to capture any bazel input sources, | |
| # although this doesn't need to be perfect. If none of the input sources change | |
| # then a cache hit will load an existing cache and bazel won't have to do any work. | |
| # In the case of a cache miss, you want the fallback cache to contain most of the | |
| # previously built artifacts to minimize build time. The more precise you are with | |
| # hashFiles sources the less work bazel will have to do. | |
| - name: Mount bazel caches | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/bazel-repo | |
| key: bazel-cache-${{ matrix.os }}-${{ matrix.bazel_version }}-${{ matrix.folder }}-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'MODULE.bazel') }} | |
| restore-keys: | | |
| bazel-cache-${{ matrix.os }}-${{ matrix.bazel_version }}-${{ matrix.folder }} | |
| - name: bazel test //... | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel_version }} | |
| working-directory: ${{ matrix.folder }} | |
| shell: bash | |
| run: | | |
| bazel \ | |
| --bazelrc=.bazelrc \ | |
| test \ | |
| --config=remote \ | |
| --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY \ | |
| //... | |
| test_windows: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, windows-11-arm] | |
| bazel_version: [9.x] | |
| folder: | |
| - "test" | |
| runs-on: ${{ matrix.os }} | |
| # Configure a human readable name for each job | |
| name: Test ${{ matrix.folder }} with Bazel ${{ matrix.bazel_version }} on ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # test/git_crates/Cargo.toml exercises SSH-form GitHub dependencies, but | |
| # fork pull requests cannot access SSH_PRIVATE_KEY for that public repo. | |
| - name: Fetch public GitHub SSH dependencies over HTTPS | |
| shell: bash | |
| run: | | |
| git config --global --add url."https://github.com/".insteadOf "ssh://git@github.com/" | |
| git config --global --add url."https://github.com/".insteadOf "git@github.com:" | |
| - name: bazel test windows targets | |
| id: bazel_test | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel_version }} | |
| working-directory: ${{ matrix.folder }} | |
| shell: bash | |
| run: | | |
| git config --global core.longpaths true | |
| bazel \ | |
| --output_user_root=C:/bzl \ | |
| --bazelrc=.bazelrc \ | |
| build \ | |
| --config=remote \ | |
| --disk_cache= \ | |
| --repository_cache= \ | |
| --repo_contents_cache= \ | |
| --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY \ | |
| --jobs=100 \ | |
| //:all_builds_aarch64-pc-windows-gnullvm \ | |
| //:all_builds_x86_64-pc-windows-gnullvm |