-
Notifications
You must be signed in to change notification settings - Fork 295
71 lines (64 loc) · 1.82 KB
/
build-test.yaml
File metadata and controls
71 lines (64 loc) · 1.82 KB
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
#
# .github/workflows/build-test.yaml
#
---
name: Build, Test, and Lint
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
permissions: {}
jobs:
build-test:
name: Build, Test, and Lint
strategy:
matrix:
include:
- runner: macos-14
xcode: swift
- runner: macos-15
xcode: 26.3
- runner: macos-15-intel
xcode: 26.3
- runner: macos-26
xcode: 26.4
- runner: macos-26-intel
xcode: 26.4
runs-on: ${{matrix.runner}}
defaults:
run:
# Force all run commands to not use Rosetta 2 on arm64
shell: ${{endsWith(matrix.runner, '-intel') && '/bin/zsh -Negku {0}' || 'arch -arm64 /bin/zsh -Negku {0}'}}
steps:
- name: 🛒 Checkout repo
env:
GIT_CONFIG_COUNT: 1
GIT_CONFIG_KEY_0: init.defaultBranch
GIT_CONFIG_VALUE_0: ${{github.event.repository.default_branch}}
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# Include all history & tags for Scripts/version
fetch-depth: 0
- name: 🔧 Setup repo
run: Scripts/setup_workflow_repo
- name: 🛠 Select Xcode version
if: matrix.xcode != 'swift'
run: sudo xcode-select -s /Applications/Xcode_${{matrix.xcode}}.app
- name: 👢 Bootstrap
run: Scripts/bootstrap
- name: 🕊 Use Homebrew Core Swift
if: matrix.xcode == 'swift'
run: |
brew install swift
printf $'%s\n' "$(brew --prefix swift)/bin" >> "${GITHUB_PATH}"
- name: 🏗 Build
run: Scripts/build build-test -c release
- name: 🧪 Test
if: matrix.runner != 'macos-14'
run: Scripts/test
- name: 🚨 Lint
run: Scripts/lint