Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ runs:
bazel-cache-${{ inputs.os }}-${{ inputs.zigVersion }}-${{ inputs.bazelVersion }}-${{ inputs.bzlmodEnabled }}-${{ inputs.folder }}-${{ inputs.targetPattern }}

- name: Configure remote cache and execution
if: inputs.remoteEnabled
if: ${{ inputs.remoteEnabled == 'true' }}
working-directory: ${{ inputs.folder }}
shell: bash
env:
Expand Down
107 changes: 54 additions & 53 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,59 +166,59 @@ jobs:

# Zig documentation builds are separated to work around the following issue:
# https://github.com/aherrmann/rules_zig/issues/273
test-zig-docs:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

needs:
- matrix-prep-bazelversion
- matrix-prep-zigversion

# Run bazel test in each workspace with each version of Bazel supported
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
bazelVersion:
- ${{ fromJSON(needs.matrix-prep-bazelversion.outputs.bazelversions)[0] }}
zigVersion:
- ${{ fromJSON(needs.matrix-prep-zigversion.outputs.zigversions)[0] }}
bzlmodEnabled: [true, false]
folder:
- "."
- "e2e/workspace"
targetPattern: ["//..."]
tagFilters: ["+zig-docs"]

# Configure a human readable name for each job
name: Test ${{ matrix.targetPattern }} ${{ matrix.tagFilters }} in ${{ matrix.folder }} with Zig ${{ matrix.zigVersion }}, Bazel ${{ matrix.bazelVersion }}, and bzlmod ${{ matrix.bzlmodEnabled }} on ${{ matrix.os }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- uses: ./.github/actions/test
with:
os: ${{ matrix.os }}
folder: ${{ matrix.folder }}
bazelVersion: ${{ matrix.bazelVersion }}
bzlmodEnabled: ${{ matrix.bzlmodEnabled }}
# Disable documentation generation for all but the first Bazel
# version, by setting --no@rules_zig//docs:build_docs in
# .bazelrc.user. The generated documentation can vary between Bazel
# versions. For example, Bazel version 7 changed the documentation of
# the implicit `repo_mapping` parameter to repository rules compared
# to Bazel version 6.
docsEnabled: ${{ matrix.bazelVersion == fromJSON(needs.matrix-prep-bazelversion.outputs.bazelversions)[0] }}
zigVersion: ${{ matrix.zigVersion }}
targetPattern: ${{ matrix.targetPattern }}
tagFilters: ${{ matrix.tagFilters }}
# Disable remote execution and avoid concurrency to work around
# https://github.com/aherrmann/rules_zig/issues/273
remoteEnabled: false
bazelFlags: "--jobs=1"
buildbuddyApiKey: ${{ secrets.BUILDBUDDY_API_KEY }}
#test-zig-docs:
# # The type of runner that the job will run on
# runs-on: ${{ matrix.os }}

# needs:
# - matrix-prep-bazelversion
# - matrix-prep-zigversion

# # Run bazel test in each workspace with each version of Bazel supported
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, macos-latest]
# bazelVersion:
# - ${{ fromJSON(needs.matrix-prep-bazelversion.outputs.bazelversions)[0] }}
# zigVersion:
# - ${{ fromJSON(needs.matrix-prep-zigversion.outputs.zigversions)[0] }}
# bzlmodEnabled: [true, false]
# folder:
# - "."
# - "e2e/workspace"
# targetPattern: ["//..."]
# tagFilters: ["+zig-docs"]

# # Configure a human readable name for each job
# name: Test ${{ matrix.targetPattern }} ${{ matrix.tagFilters }} in ${{ matrix.folder }} with Zig ${{ matrix.zigVersion }}, Bazel ${{ matrix.bazelVersion }}, and bzlmod ${{ matrix.bzlmodEnabled }} on ${{ matrix.os }}

# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v4

# - uses: ./.github/actions/test
# with:
# os: ${{ matrix.os }}
# folder: ${{ matrix.folder }}
# bazelVersion: ${{ matrix.bazelVersion }}
# bzlmodEnabled: ${{ matrix.bzlmodEnabled }}
# # Disable documentation generation for all but the first Bazel
# # version, by setting --no@rules_zig//docs:build_docs in
# # .bazelrc.user. The generated documentation can vary between Bazel
# # versions. For example, Bazel version 7 changed the documentation of
# # the implicit `repo_mapping` parameter to repository rules compared
# # to Bazel version 6.
# docsEnabled: ${{ matrix.bazelVersion == fromJSON(needs.matrix-prep-bazelversion.outputs.bazelversions)[0] }}
# zigVersion: ${{ matrix.zigVersion }}
# targetPattern: ${{ matrix.targetPattern }}
# tagFilters: ${{ matrix.tagFilters }}
# # Disable remote execution and avoid concurrency to work around
# # https://github.com/aherrmann/rules_zig/issues/273
# remoteEnabled: false
# bazelFlags: "--jobs=1"
# buildbuddyApiKey: ${{ secrets.BUILDBUDDY_API_KEY }}

integration-tests:
# The type of runner that the job will run on
Expand Down Expand Up @@ -275,6 +275,7 @@ jobs:
- matrix-prep-zigversion
- test-bazel-versions
- test-zig-versions
#- test-zig-docs
- integration-tests
if: ${{ always() }}
steps:
Expand Down