Skip to content

Migrate to rules_rs and llvm toolchains #152

Migrate to rules_rs and llvm toolchains

Migrate to rules_rs and llvm toolchains #152

Workflow file for this run

name: BCR consumer
# Build bazel-diff as a non-root module from the release source archive,
# using the same targets as .bcr/presubmit.yml.
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
verify-targets:
name: Consume as dependency (Bazel ${{ matrix.bazel }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Keep in sync with the bazel matrix in .bcr/presubmit.yml.
bazel: ['8.5.0', '8.x', '9.x']
steps:
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: ^1.17
- name: Setup Bazelisk
run: go install github.com/bazelbuild/bazelisk@latest
- uses: actions/checkout@v4
- name: Pack release archive
run: .github/workflows/pack_release_archive.sh "$RUNNER_TEMP/release.tar.gz"
- name: Set up consumer module
run: |
mkdir -p "$RUNNER_TEMP/consumer"
cd "$RUNNER_TEMP/consumer"
cat > MODULE.bazel <<EOF
module(name = "bcr-consumer-check")
# archive_override replaces this version with the release archive.
bazel_dep(name = "bazel-diff", version = "0.0.0")
archive_override(
module_name = "bazel-diff",
urls = ["file://$RUNNER_TEMP/release.tar.gz"],
)
EOF
touch BUILD.bazel
- name: Build BCR verify_targets as a consumer
working-directory: ${{ runner.temp }}/consumer
env:
USE_BAZEL_VERSION: ${{ matrix.bazel }}
# Keep in sync with the build_targets in .bcr/presubmit.yml.
run: ~/go/bin/bazelisk build @bazel-diff//:bazel-diff @bazel-diff//:bazel-diff-rust