Debian Codegraph @

extra/protobuf/protobuf-24.4/third_party/utf8_range/.github/workflows/bazel_tests.yml

raw
1 name: Bazel Tests
2
3 on:
4 push:
5 branches:
6 - main
7 pull_request:
8 branches:
9 - main
10 workflow_dispatch:
11
12 jobs:
13
14 ubuntu:
15 runs-on: ${{ matrix.os }}
16
17 strategy:
18 fail-fast: false # Don't cancel all jobs if one fails.
19 matrix:
20 include:
21 - { NAME: "Debug", CC: clang, os: ubuntu-20.04, flags: "-c dbg" }
22 - { NAME: "Optmized", CC: clang, os: ubuntu-20.04, flags: "-c opt" }
23 - { NAME: "GCC Optimized", CC: gcc, os: ubuntu-20.04, flags: "-c opt" }
24 - { NAME: "ASAN", CC: clang, os: ubuntu-20.04, flags: "--config=asan -c dbg" }
25 - { NAME: "UBSAN", CC: clang, os: ubuntu-20.04, flags: "--config=ubsan -c dbg", install: "libunwind-dev" }
26 - { NAME: "macOS", CC: clang, os: macos-11, flags: "" }
27
28 name: Bazel ${{ matrix.NAME }}
29
30 steps:
31 - uses: actions/checkout@v2
32 - name: Setup Bazel
33 run: |
34 echo "BAZEL=bazel" >> $GITHUB_ENV
35 echo "USE_BAZEL_VERSION=5.1.1" >> $GITHUB_ENV
36 - name: Setup Bazel (macOS)
37 if: runner.os == 'macOS'
38 run: echo "BAZEL=bazelisk" >> $GITHUB_ENV
39 - name: Install dependencies
40 run: sudo apt update && sudo apt install -y ${{ matrix.install }}
41 if: matrix.install != ''
42 - name: Run tests
43 run: cd ${{ github.workspace }} && CC=${{ matrix.CC }} ${{ env.BAZEL }} test --test_output=errors ... ${{ matrix.flags }}