-
Notifications
You must be signed in to change notification settings - Fork 275
56 lines (43 loc) · 1.59 KB
/
build-test.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
#
# .github/workflows/build-test.yml
#
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
name: Build, Test, and Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
defaults:
run:
# Prefixes all `run` commands with the following command to force them to run outside Rosetta.
# https://github.com/actions/runner/issues/805#issuecomment-942784948
# https://github.com/rolpdog/cffi-mirror/blob/release-1.15/.github/workflows/ci.yaml#L81-L141
# https://github.com/actions/virtual-environments/issues/2187#issuecomment-790507204
shell: arch -arm64 bash --noprofile --norc -eo pipefail {0}
name: Build, Test, and Lint
# GitHub provided runners (in case we need to switch back)
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
# runs-on: macos-latest
# https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow
# https://github.com/mas-cli/mas/settings/actions/runners
runs-on: [self-hosted, macOS]
steps:
# https://github.com/actions/checkout#usage
- uses: actions/checkout@v3
with:
# A fetch-depth of 0 includes all history and tags for script/version
fetch-depth: 0
- name: Bootstrap
run: script/bootstrap
- name: Build
run: script/build
- name: Test
run: script/test
- name: Lint
run: script/lint