2021-03-28 12:10:49 -07:00
|
|
|
#
|
|
|
|
# .github/workflows/build-test.yml
|
|
|
|
#
|
|
|
|
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
|
|
|
|
|
2021-05-09 13:25:36 -07:00
|
|
|
name: Build, Test, and Lint
|
2021-03-28 11:01:23 -07:00
|
|
|
|
2021-06-27 10:55:16 -07:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2021-03-28 11:01:23 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-test:
|
|
|
|
|
2021-12-24 13:58:56 -07:00
|
|
|
defaults:
|
|
|
|
run:
|
2021-12-24 17:22:34 -07:00
|
|
|
# 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
|
2021-12-24 13:58:56 -07:00
|
|
|
shell: arch -arm64 bash --noprofile --norc -eo pipefail {0}
|
|
|
|
|
2021-05-09 13:25:36 -07:00
|
|
|
name: Build, Test, and Lint
|
2021-12-24 17:22:34 -07:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2021-12-22 18:31:29 -07:00
|
|
|
# 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]
|
2021-12-24 17:22:34 -07:00
|
|
|
|
2021-03-28 11:01:23 -07:00
|
|
|
steps:
|
2021-06-27 10:55:16 -07:00
|
|
|
# https://github.com/actions/checkout#usage
|
2022-03-02 12:27:20 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-03-28 12:10:49 -07:00
|
|
|
with:
|
2021-12-26 12:25:42 -07:00
|
|
|
# A fetch-depth of 0 includes all history and tags for script/version
|
2021-04-28 23:10:15 -07:00
|
|
|
fetch-depth: 0
|
2021-03-28 12:18:24 -07:00
|
|
|
|
2021-03-28 11:01:23 -07:00
|
|
|
- name: Bootstrap
|
|
|
|
run: script/bootstrap
|
2021-03-28 12:18:24 -07:00
|
|
|
|
2021-03-28 11:01:23 -07:00
|
|
|
- name: Build
|
|
|
|
run: script/build
|
2021-03-28 12:18:24 -07:00
|
|
|
|
2021-03-28 11:01:23 -07:00
|
|
|
- name: Test
|
|
|
|
run: script/test
|
2021-05-09 13:25:36 -07:00
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: script/lint
|