-
Notifications
You must be signed in to change notification settings - Fork 204
125 lines (104 loc) · 3.31 KB
/
main.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
121
122
123
124
125
name: Main
on: [push, pull_request]
jobs:
mac-test:
name: Mac Test
runs-on: macos-latest
strategy:
matrix:
include:
- platform: macOS
scheme: "SWXMLHash OSX"
action: "build-for-testing test-without-building"
- platform: iOS
scheme: "SWXMLHash iOS"
action: "build-for-testing test-without-building"
sdk-and-dest: '-sdk iphonesimulator -destination "OS=17.2,name=iPhone 15"'
- platform: tvOS
scheme: "SWXMLHash tvOS"
sdk-and-dest: '-sdk appletvsimulator -destination "name=Apple TV"'
- platform: watchOS
scheme: "SWXMLHash watchOS"
action: "build-for-testing test-without-building"
sdk-and-dest: "-sdk watchsimulator"
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.0"
- name: Build and Test
env:
WORKSPACE: "-workspace SWXMLHash.xcworkspace"
run: |
xcodebuild ${{ matrix.action }} $WORKSPACE -scheme ${{ matrix.scheme }} ${{ matrix.sdk-and-dest }} | xcpretty
# TODO: I'd like to use this action instead of the above xcodebuild command, but I'm getting a destination error:
# xcodebuild: error: Unable to find a destination matching the provided destination specifier:
# { id:D918798E-6DEE-48F7-850A-A4C0D9328F0A }
#
# - uses: mxcl/xcodebuild@v3.0.0
# with:
# platform: ${{ matrix.platform }}
# workspace: "SWXMLHash.xcworkspace"
linux-test:
name: Linux Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: swift:5.8-focal
skip-testing: true
- image: swift:5.8-jammy
skip-testing: true
- image: swift:5.8-rhel-ubi9
skip-testing: true
- image: swift:5.9-focal
skip-testing: true
- image: swift:5.9-jammy
skip-testing: true
- image: swift:5.9-rhel-ubi9
skip-testing: true
- image: swift:5.10-focal
skip-testing: true
- image: swift:5.10-jammy
skip-testing: true
- image: swift:5.10-rhel-ubi9
skip-testing: true
- image: swiftlang/swift:nightly-6.0-focal
perform-testing: true
- image: swiftlang/swift:nightly-6.0-jammy
perform-testing: true
container:
image: ${{ matrix.image }}
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
if: ${{ matrix.skip-testing }}
run: |
swift build
- name: Build and test
if: ${{ matrix.perform-testing }}
run: |
swift build --build-tests
swift test
windows-test:
name: Windows Test
runs-on: windows-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- image: swiftlang/swift:nightly-6.0-windowsservercore-1809
container:
image: ${{ matrix.image }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and test
run: |
swift build --build-tests
swift test