Skip to content

Commit

Permalink
Add BCR specific testing to CI. (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
helly25 authored Mar 4, 2025
1 parent d46a6f5 commit dd9735d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,23 @@ jobs:
compiler: ${{ matrix.compiler }}
llvm_version: ${{ matrix.llvm_version }}
bazel_config: ${{ matrix.bazel_config }}

test-bcr:
needs: [pre-commit, test-gcc, test-clang]
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
bazel_mode: [bzlmod]
compiler: [clang]
llvm_version: [19.1.6]
bazel_config: [opt]
module_versions: [0.4.2]

uses: ./.github/workflows/test.yml
with:
continue-on-error: true
os: ${{ matrix.os }}
bazel_mode: ${{ matrix.bazel_mode }}
compiler: ${{ matrix.compiler }}
llvm_version: ${{ matrix.llvm_version }}
bazel_config: ${{ matrix.bazel_config }}
15 changes: 11 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:
description: 'The way how Bazel should operate compilation and tests, one of (asan, fastbuild, opt).'
type: string
default: opt
module_version:
description: 'Version string for the MODULE.$ver.bazel to be copied from the bzlmod directory.'
type: string
default: ''

jobs:
test:
Expand All @@ -47,11 +51,11 @@ jobs:
- uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: ${{ inputs.os }}-${{ inputs.bazel_mode }}${{ inputs.compiler }}${{ inputs.llvm_version }}${{ inputs.gcc_version }}${{ inputs.bazel_config }}-${{github.ref}}-${{ github.sha }}
key: ${{ inputs.os }}-${{ inputs.bazel_mode }}${{ inputs.compiler }}${{ inputs.llvm_version }}${{ inputs.gcc_version }}${{ inputs.bazel_config }}${{ inputs.module_version }}-${{github.ref}}-${{ github.sha }}
restore-keys: |
${{ inputs.os }}-${{ inputs.bazel_mode }}${{ inputs.compiler }}${{ inputs.llvm_version }}${{ inputs.gcc_version }}${{ inputs.bazel_config }}-${{github.ref}}-
${{ inputs.os }}-${{ inputs.bazel_mode }}${{ inputs.compiler }}${{ inputs.llvm_version }}${{ inputs.gcc_version }}${{ inputs.bazel_config }}-refs/heads/main-
${{ inputs.os }}-${{ inputs.bazel_mode }}${{ inputs.compiler }}${{ inputs.llvm_version }}${{ inputs.gcc_version }}${{ inputs.bazel_config }}-
${{ inputs.os }}-${{ inputs.bazel_mode }}${{ inputs.compiler }}${{ inputs.llvm_version }}${{ inputs.gcc_version }}${{ inputs.bazel_config }}${{ inputs.module_version }}-${{github.ref}}-
${{ inputs.os }}-${{ inputs.bazel_mode }}${{ inputs.compiler }}${{ inputs.llvm_version }}${{ inputs.gcc_version }}${{ inputs.bazel_config }}${{ inputs.module_version }}-refs/heads/main-
${{ inputs.os }}-${{ inputs.bazel_mode }}${{ inputs.compiler }}${{ inputs.llvm_version }}${{ inputs.gcc_version }}${{ inputs.bazel_config }}${{ inputs.module_version }}-
- run: |
declare -a BAZEL_INIT=()
declare -a BAZEL_ARGS=()
Expand Down Expand Up @@ -90,4 +94,7 @@ jobs:
else
echo "ERROR: Matrix/Input var 'bazel_config' must be one of [asan, fastbuild, opt]."
fi
if [ -n "${{ inputs.module_version }}" ]; then
cp "bazelmod/MODULE.${{ inputs.module_version }}.bazel" MODULE.bazel
fi
bazel "${BAZEL_INIT[@]}" test "${BAZEL_ARGS[@]}" //...

0 comments on commit dd9735d

Please sign in to comment.