@@ -5,46 +5,139 @@ on: [push, pull_request]
55jobs :
66 mac-test :
77 name : Mac Test
8- runs-on : macOS-latest
8+ runs-on : macos-latest
9+ strategy :
10+ matrix :
11+ include :
12+ - platform : macOS
13+ scheme : " SWXMLHash OSX"
14+ action : " build-for-testing test-without-building"
915
16+ - platform : iOS
17+ scheme : " SWXMLHash iOS"
18+ action : " build-for-testing test-without-building"
19+ sdk-and-dest : ' -sdk iphonesimulator -destination "OS=17.2,name=iPhone 15"'
20+
21+ - platform : tvOS
22+ scheme : " SWXMLHash tvOS"
23+ sdk-and-dest : ' -sdk appletvsimulator -destination "name=Apple TV"'
24+
25+ - platform : watchOS
26+ scheme : " SWXMLHash watchOS"
27+ action : " build-for-testing test-without-building"
28+ sdk-and-dest : " -sdk watchsimulator"
1029 steps :
1130 - name : Checkout
12- uses : actions/checkout@master
13- - name : Build and test
31+ uses : actions/checkout@v4
32+
33+ - uses : maxim-lobanov/setup-xcode@v1
34+ with :
35+ xcode-version : " 16.0"
36+
37+ - name : Build and Test
1438 env :
1539 WORKSPACE : " -workspace SWXMLHash.xcworkspace"
16- ACTION : " build-for-testing test-without-building"
1740 run : |
18- set -o pipefail
19- xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash OSX" | xcpretty
20- xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash iOS" -sdk iphonesimulator -destination "OS=17.2,name=iPhone 15" | xcpretty
21- xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash tvOS" -sdk appletvsimulator -destination "name=Apple TV" | xcpretty
22- xcodebuild build $WORKSPACE -scheme "SWXMLHash watchOS" -sdk watchsimulator | xcpretty
23- bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_TOKEN}}
41+ xcodebuild ${{ matrix.action }} $WORKSPACE -scheme ${{ matrix.scheme }} ${{ matrix.sdk-and-dest }} | xcpretty
42+
43+ # TODO: I'd like to use this action instead of the above xcodebuild command, but I'm getting a destination error:
44+ # xcodebuild: error: Unable to find a destination matching the provided destination specifier:
45+ # { id:D918798E-6DEE-48F7-850A-A4C0D9328F0A }
46+ #
47+ 48+ # with:
49+ # platform: ${{ matrix.platform }}
50+ # workspace: "SWXMLHash.xcworkspace"
2451
2552 linux-test :
2653 name : Linux Test
2754 runs-on : ubuntu-latest
55+ strategy :
56+ fail-fast : false
57+ matrix :
58+ include :
59+ - image : swift:5.8-focal
60+ skip-testing : true
61+
62+ - image : swift:5.8-jammy
63+ skip-testing : true
64+
65+ - image : swift:5.8-rhel-ubi9
66+ skip-testing : true
67+
68+ - image : swift:5.9-focal
69+ skip-testing : true
70+
71+ - image : swift:5.9-jammy
72+ skip-testing : true
73+
74+ - image : swift:5.9-rhel-ubi9
75+ skip-testing : true
2876
77+ - image : swift:5.10-focal
78+ skip-testing : true
79+
80+ - image : swift:5.10-jammy
81+ skip-testing : true
82+
83+ - image : swift:5.10-rhel-ubi9
84+ skip-testing : true
85+
86+ - image : swift:6.0-focal
87+ perform-testing : true
88+
89+ - image : swift:6.0-jammy
90+ perform-testing : true
91+
92+ - image : swift:6.0-rhel-ubi9
93+ perform-testing : true
94+ container :
95+ image : ${{ matrix.image }}
96+ timeout-minutes : 10
2997 steps :
3098 - name : Checkout
31- uses : actions/checkout@master
99+ uses : actions/checkout@v4
100+ - name : Build
101+ if : ${{ matrix.skip-testing }}
102+ run : |
103+ swift build
32104 - name : Build and test
105+ if : ${{ matrix.perform-testing }}
33106 run : |
34- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
107+ swift build --build-tests
35108 swift test
36109
37110 windows-test :
38111 name : Windows Test
39112 runs-on : windows-latest
113+ timeout-minutes : 10
114+ strategy :
115+ fail-fast : false
116+ matrix :
117+ include :
118+ - branch : swift-5.10-release
119+ tag : 5.10-RELEASE
120+ skip-testing : true
121+
122+ - branch : swift-6.0-release
123+ tag : 6.0-RELEASE
124+ perform-testing : true
40125
41126 steps :
42127 - name : Install Swift
43128 uses : compnerd/gha-setup-swift@main
44129 with :
45- branch : swift-5.8-release
46- tag : 5.8-RELEASE
130+ branch : ${{ matrix.branch}}
131+ tag : ${{ matrix.tag }}
132+
47133 - name : Checkout
48- uses : actions/checkout@master
134+ uses : actions/checkout@v4
135+ - name : Build
136+ if : ${{ matrix.skip-testing }}
137+ run : |
138+ swift build
49139 - name : Build and test
50- run : swift test
140+ if : ${{ matrix.perform-testing }}
141+ run : |
142+ swift build --build-tests
143+ swift test
0 commit comments