-
-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (54 loc) · 1.73 KB
/
ci-macos.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
name: macOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
macos-test-build-release-xcode:
runs-on: macOS-latest
strategy:
matrix:
xcode: ["14.3.1", "15.4", "16.0"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Restore cached Homebrew dependencies
uses: actions/cache@v3
with:
path: |
~/Library/Caches/Homebrew/sdl2--*
~/Library/Caches/Homebrew/downloads/*--sdl2-*
key: ${{ runner.os }}-brew-sdl2-${{ hashFiles('.github/brew-formulae') }}
restore-keys: ${{ runner.os }}-brew-sdl2-
- name: Restore cached SPM dependencies
uses: actions/cache@v3
with:
path: |
.build/repositories
key: ${{ runner.os }}-spm-repos-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-repos-
- name: Install dependencies
run: |
brew install sdl2
sdl2-config --version
- name: Build Release
run: swift build -c release
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
- name: Upload build artifacts
if: failure()
uses: actions/[email protected]
with:
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
*.lcov
.build/*.yaml
.build/**/*.a
.build/**/*.so
.build/**/*.dylib
.build/**/*.dSYM
.build/**/*.json