-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (60 loc) · 1.87 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
name: CI
on:
push:
branches: [main]
pull_request:
permissions: read-all
jobs:
test:
runs-on: ${{ matrix.os }}-latest
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
BUILDBUDDY_RW_API_KEY: ${{ secrets.BUILDBUDDY_RW_API_KEY }}
strategy:
fail-fast: false
matrix:
bazel-version: [6.x, 7.x]
os: [ubuntu, macos]
external_dependency_system: [bzlmod, workspace]
exclude:
# Don't expect Bazel compatibility issues depending on OS, so speed this up
- bazel-version: 6.x
os: macos
include:
- external_dependency_system: bzlmod
flags: --enable_bzlmod
- external_dependency_system: workspace
flags: --noenable_bzlmod
steps:
- uses: actions/checkout@v4
- name: Use BuildBuddy RW API key instead of public readonly key
run: sed -i.bak 's#x-buildbuddy-api-key=.*#x-buildbuddy-api-key=${{ env.BUILDBUDDY_RW_API_KEY }}#' .bazelrc
if: ${{ env.BUILDBUDDY_RW_API_KEY }}
- run: echo "common ${{ matrix.flags }}" >> .bazelrc
# Don't want to bother with hundreds of lines of Workspace setup for the rules_pycross compat test
- if: matrix.external_dependency_system == 'workspace' || matrix.os == 'macos'
run: echo "tests/rules_pycross" >> .bazelignore
- run: bazel test //...
examples:
runs-on: ubuntu-latest
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
strategy:
fail-fast: false
matrix:
bazel-version: [6.x, 7.x]
steps:
- uses: actions/checkout@v4
- run: examples/integration_test.sh
determinism:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: tests/determinism/reproducible_shas.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1