try adding an sh_wrapper around heir-opt to populate env vars #7946
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: Build and Test (Linux) | |
| permissions: read-all | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| runs-on: | |
| labels: ubuntu-22.04-32core | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install -y libomp-dev | |
| - name: Check out repository code | |
| uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # pin@v3 | |
| - name: Cache bazel build artifacts | |
| uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # [email protected] | |
| with: | |
| path: | | |
| ~/.cache/bazel | |
| key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}-${{ hashFiles('bazel/import_llvm.bzl') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}-${{ hashFiles('bazel/import_llvm.bzl') }} | |
| ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}- | |
| - name: "Run `bazel build`" | |
| run: | | |
| bazel build -c opt //... --explain=bazel-explain.log --verbose_explanations | |
| - name: "Run `bazel test`" | |
| run: | | |
| bazel test -c opt //... | |
| - name: Upload bazel explanation log | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # [email protected] | |
| if: always() | |
| with: | |
| name: bazel-logs | |
| path: bazel-explain.log | |
| retention-days: 30 | |
| - uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # [email protected] | |
| with: | |
| path: | | |
| ~/.cache/bazel | |
| key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}-${{ hashFiles('bazel/import_llvm.bzl') }} |