-
Notifications
You must be signed in to change notification settings - Fork 15
111 lines (98 loc) · 2.92 KB
/
ci-on-pr-bazel-test-mac.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: "macOS CI"
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- created
jobs:
build-debug:
runs-on: macos-12
name: "Bazel Debug Build"
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Bazel cache
id: cache-bazel-debug
uses: actions/cache@v3.0.4
with:
path: ~/.cache/bazel/
key: ${{ runner.os }}-bazel-debug
- name: "Building debug"
run: |
bazelisk build --keep_going --disk_cache=~/.cache/bazel/ --config clang --config debug --features asan //qir/...
env:
CC: clang
CXX: clang++
build-release:
runs-on: macos-12
name: "Bazel Release Build"
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Bazel cache
id: cache-bazel-release
uses: actions/cache@v3.0.4
with:
path: ~/.cache/bazel/
key: ${{ runner.os }}-bazel-release
- name: "Building release"
run: |
bazelisk build --keep_going --disk_cache=~/.cache/bazel/ --config clang //qir/...
env:
CC: clang
CXX: clang++
test-debug:
runs-on: macos-12
name: "Bazel Debug Test"
needs: [build-debug]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Bazel cache
id: cache-bazel-debug
uses: actions/cache@v3.0.4
with:
path: ~/.cache/bazel/
key: ${{ runner.os }}-bazel-debug
- name: "Running debug unit tests with address sanitation"
run: |
bazelisk test --test_output=all --keep_going --disk_cache=~/.cache/bazel/ --config clang --config debug --features asan //qir/...
env:
CC: clang
CXX: clang++
test-release:
runs-on: macos-12
name: "Bazel Release Test"
needs: [build-release]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Bazel cache
id: cache-bazel-release
uses: actions/cache@v3.0.4
with:
path: ~/.cache/bazel/
key: ${{ runner.os }}-bazel-release
- name: "Running release tests"
run: |
bazelisk test --test_output=all --keep_going --disk_cache=~/.cache/bazel/ --config clang //qir/...
env:
CC: clang
CXX: clang++