Skip to content

Update comment

Update comment #376

Workflow file for this run

name: Test
on: [push]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected]
if: always()
test-ubuntu-clang-asan:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v3
- name: Bazel cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-clang_asan-${{ github.sha }}
restore-keys: |
${{ runner.os }}-clang_asan-
- name: Test Clang/ASAN
run: |
bazel test --enable_bzlmod --noenable_workspace --config=clang --config=asan -c dbg //...
test-ubuntu-clang-17:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v3
- name: Bazel cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-clang_17-${{ github.sha }}
restore-keys: |
${{ runner.os }}-clang_17-
- name: Test Clang 17
run: |
CONTROL_FILE=bazelmod/llvm.MODULE.bazel
sed -e 's,llvm_version = ".*",llvm_version = "17.0.4",g' "${CONTROL_FILE}" > "${CONTROL_FILE}.bak"
mv "${CONTROL_FILE}.bak" "${CONTROL_FILE}"
bazel test --enable_bzlmod --noenable_workspace --config=clang -c fastbuild //...
test-ubuntu-clang-opt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v3
- name: Bazel cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-clang_opt-${{ github.sha }}
restore-keys: |
${{ runner.os }}-clang_opt-
- name: Test Clang/OPT
run: |
bazel test --enable_bzlmod --noenable_workspace --config=clang -c opt //...
test-ubuntu-gcc-fastbuild:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v3
- name: Bazel cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-gcc_fastbuild-${{ github.sha }}
restore-keys: |
${{ runner.os }}-gcc_fastbuild-
- name: Test GCC/Fastbuild
run: |
# Use WORKSPACE
CC=gcc bazel test --noenable_bzlmod --enable_workspace -c fastbuild //...
test-macos-native-fastbuild:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v3
- name: Bazel cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-native_fastbuild-${{ github.sha }}
restore-keys: |
${{ runner.os }}-native_fastbuild-
- name: Test native/Fastbuild
run: |
# Use WORKSPACE
# Set the output cache to the same value Linux is using, so we can safely use the same in actions/cache
CACHE_ROOT=~/.cache/bazel
bazel --output_user_root="${CACHE_ROOT}" test --repository_cache="${CACHE_ROOT}/repo-cache" --noenable_bzlmod --enable_workspace -c fastbuild //...