Skip to content

Migrate to bzlmod

Migrate to bzlmod #105

Workflow file for this run

name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
# Cancel previous actions from the same PR: https://stackoverflow.com/a/72408109
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.15.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: true
# Share repository cache between workflows.
repository-cache: true
# Share external cache between workflows.
external-cache: true
- name: bazel build
run: >-
bazelisk
--bazelrc=.github/workflows/ci.bazelrc
--bazelrc=.bazelrc
build
...
- name: bazel test
run: >-
bazelisk
--bazelrc=.github/workflows/ci.bazelrc
--bazelrc=.bazelrc
test
...
# run this block of manual tests. For some reason when run sequentially
# in the same bazel invocation, one or more will hang / TIMEOUT (300s).
- name: bazel test //example/golden:commonjs_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:commonjs_test
- name: bazel test //example/golden:cpp_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:cpp_test
- name: bazel test //example/golden:csharp_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:csharp_test
- name: bazel test //example/golden:go_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:go_test
- name: bazel test //example/golden:goembed_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:goembed_test
- name: bazel test //example/golden:java_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:java_test
- name: bazel test //example/golden:objc_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:objc_test
- name: bazel test //example/golden:proto_compiled_sources_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:proto_compiled_sources_test
- name: bazel test //example/golden:python_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:python_test
- name: bazel test //example/golden:ruby_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:ruby_test
- name: bazel test //example/golden:strip_import_prefix_test
run: bazelisk --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //example/golden:strip_import_prefix_test