Repository navigation
Deduplicate TypeSwitch logic for resolving block argument attribute targets across findAttributeForBlockArgument, setAttributeForBlockArgument, and removeAttributeForBlockArgument. #340
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 CHEDDAR (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-cheddar: | |
| runs-on: | |
| labels: ubuntu-latest | |
| env: | |
| BUILDBUDDY_API_KEY: ${{ github.repository == 'google/heir' && secrets.BUILDBUDDY_API_KEY || 'SEVzwPt2S7PHhY1OxD3u' }} | |
| BAZEL_CONFIG_FLAG: ${{ github.repository == 'google/heir' && '--config=ci --config=remote' || '--config=ci' }} | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| # `bazel query` is configuration-agnostic, so it would follow every | |
| # select() branch and load LLVM's libc (which needs the unavailable | |
| # @linux_uapi repo). `cquery` with the same flags as the build only | |
| # follows configured deps and lets the build reuse the analysis cache. | |
| - name: "Find CHEDDAR targets" | |
| run: | | |
| set -o pipefail | |
| read -r -a BAZEL_CONFIGS <<< "$BAZEL_CONFIG_FLAG" | |
| bazel cquery -c opt "${BAZEL_CONFIGS[@]}" --config=cheddar \ | |
| --remote_header=x-buildbuddy-api-key="$BUILDBUDDY_API_KEY" \ | |
| 'rdeps(//... + @cheddar//:cheddar, @cheddar//:cheddar)' \ | |
| --output=starlark --starlark:expr='str(target.label)' \ | |
| | sort -u > cheddar_targets.txt | |
| cat cheddar_targets.txt | |
| - name: "Run `bazel build --config=cheddar`" | |
| run: | | |
| read -r -a BAZEL_CONFIGS <<< "$BAZEL_CONFIG_FLAG" | |
| bazel build -c opt "${BAZEL_CONFIGS[@]}" --config=cheddar \ | |
| --remote_header=x-buildbuddy-api-key="$BUILDBUDDY_API_KEY" \ | |
| --build_metadata=ROLE=CI_BUILD_CHEDDAR \ | |
| --target_pattern_file=cheddar_targets.txt |