Merge pull request #507 from haberman/bazel-tests

Restored Bazel tests.
pull/13171/head
Joshua Haberman 3 years ago committed by GitHub
commit 212846cc47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      .github/workflows/bazel_tests.yml
  2. 20
      .github/workflows/clang_format.yml

@ -1,4 +1,4 @@
name: Check ClangFormat
name: Bazel Tests
on:
push:
@ -10,11 +10,27 @@ on:
workflow_dispatch:
jobs:
check_clang_format:
runs-on: ubuntu-20.04
ubuntu:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
include:
- { CC: clang, os: ubuntu-20.04, flags: "" }
- { CC: clang, os: ubuntu-20.04, flags: "-c opt" } # Some warnings only fire with -c opt
- { CC: gcc, os: ubuntu-20.04, flags: "-c opt" }
- { CC: clang, os: ubuntu-20.04, flags: "--//:fasttable_enabled=true -- -cmake:test_generated_files" }
- { CC: clang, os: ubuntu-20.04, flags: "--config=asan -- -benchmarks:benchmark -python/..." }
- { CC: clang, os: macos-11, flags: "" }
steps:
- uses: actions/checkout@v2
- name: Run ClangFormat
run: find . | grep -E '\.(c|h|cc)$' | grep -E -v '^./(third_party|cmake)' | xargs clang-format -i
- name: Check for differences
run: git diff --exit-code
- name: Setup Python venv
run: rm -rf /tmp/venv && python3 -m venv /tmp/venv
- name: Install dependencies
run: sudo apt install -y ${{ matrix.install }}
if: matrix.install != ''
- name: Run tests
run: cd ${{ github.workspace }} && PATH=/tmp/venv/bin:$PATH CC=${{ matrix.CC }} bazel test --test_output=errors ... ${{ matrix.flags }}

@ -0,0 +1,20 @@
name: Check ClangFormat
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
check_clang_format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run ClangFormat
run: find . | grep -E '\.(c|h|cc)$' | grep -E -v '^./(third_party|cmake)' | xargs clang-format -i
- name: Check for differences
run: git diff --exit-code
Loading…
Cancel
Save