bazel_tests.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Bazel Tests
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. workflow_dispatch:
  10. jobs:
  11. ubuntu:
  12. runs-on: ${{ matrix.os }}
  13. strategy:
  14. fail-fast: false # Don't cancel all jobs if one fails.
  15. matrix:
  16. include:
  17. - { CC: clang, os: ubuntu-20.04, flags: "" }
  18. - { CC: clang, os: ubuntu-20.04, flags: "-c opt" } # Some warnings only fire with -c opt
  19. - { CC: gcc, os: ubuntu-20.04, flags: "-c opt" }
  20. - { CC: clang, os: ubuntu-20.04, flags: "--//:fasttable_enabled=true -- -cmake:test_generated_files" }
  21. - { CC: clang, os: ubuntu-20.04, flags: "--config=asan -c dbg -- -benchmarks:benchmark -python/..." }
  22. - { CC: clang, os: ubuntu-20.04, flags: "--config=ubsan -c dbg -- -benchmarks:benchmark -python/... -upb/bindings/lua/...", install: "libunwind-dev" }
  23. - { CC: clang, os: macos-11, flags: "" }
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Setup Python venv
  27. run: rm -rf /tmp/venv && python3 -m venv /tmp/venv
  28. - name: Install dependencies
  29. run: sudo apt install -y ${{ matrix.install }}
  30. if: matrix.install != ''
  31. - name: Run tests
  32. run: cd ${{ github.workspace }} && PATH=/tmp/venv/bin:$PATH CC=${{ matrix.CC }} bazel test --test_output=errors ... ${{ matrix.flags }}