-
-
Notifications
You must be signed in to change notification settings - Fork 20
120 lines (105 loc) · 3.36 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
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
112
113
114
115
116
117
118
119
120
name: macOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
macos-test-build-release-xcode:
runs-on: macOS-latest
strategy:
matrix:
xcode: ["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: Test
run: swift test -c release
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
- name: Upload test artifacts
if: failure()
uses: actions/[email protected]
with:
name: test-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
.build/**/*.json
.build/**/*.xctest
- name: Build Release
run: swift build -c release
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
- name: Upload artifacts
if: always()
uses: actions/[email protected]
with:
name: build-artifacts-macOS-${{ matrix.xcode }}-${{ github.run_id }}
path: |
.build/*.yaml
.build/*.xml
.build/*.json
.build/*.txt
.build/**/*.json
.build/**/*.txt
.build/**/*.a
.build/**/*.dSYM
.build/**/*.gdb
.build/**/*.xctest
.build/**/*.bundle
.build/**/MetalApp
.build/**/Minimal
if-no-files-found: warn
include-hidden-files: true
- name: Zip XCFramework
run: |
zip -q -9 -r SDL2.xcframework.zip SDL2.xcframework
echo "`swift package compute-checksum SDL2.xcframework.zip`" > SDL2.xcframework.checksum.txt
- name: Publish XCFramework
uses: actions/[email protected]
with:
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
SDL2.xcframework.zip
SDL2.xcframework.checksum.txt
macos-test-build-release-xcode-legacy:
runs-on: macos-12
strategy:
matrix:
xcode: ["13.4.1"]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Test
run: swift test
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
- name: Upload test artifacts
if: failure()
uses: actions/[email protected]
with:
name: test-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
.build/**/*.json
.build/**/*.xctest
- 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