Skip to content

Commit 0bc9812

Browse files
authored
Update GitHub Actions workflow using macOS-12 (#538)
* Updated 'ci' workflow for Xcode 13.3.1 * Modernized and simplified the workflow using 'strategy.matrix' * 'arm64-apple-ios15.4' target is not included in swiftpm because its build gets an build error.
1 parent a4d9897 commit 0bc9812

File tree

1 file changed

+90
-69
lines changed

1 file changed

+90
-69
lines changed

.github/workflows/ci.yml

Lines changed: 90 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -10,94 +10,115 @@ on:
1010

1111
jobs:
1212
build:
13-
runs-on: macOS-11
14-
steps:
15-
- uses: actions/checkout@v1
16-
- name: "Swift 5.4"
17-
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.4 clean build
18-
env:
19-
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
20-
- name: "Swift 5.5"
21-
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.5 clean build
22-
env:
23-
DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer
24-
25-
build_compat:
26-
runs-on: macOS-10.15
27-
steps:
28-
- uses: actions/checkout@v1
29-
- name: "Swift 5.1"
30-
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.1 clean build
31-
env:
32-
DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer
33-
- name: "Swift 5.2"
34-
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.2 clean build
35-
env:
36-
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
37-
- name: "Swift 5.3"
38-
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.3 clean build
39-
env:
40-
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
41-
42-
testing:
43-
runs-on: macOS-11
13+
runs-on: ${{ matrix.runsOn }}
14+
env:
15+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- swift: "5.6"
21+
xcode: "13.3.1"
22+
runsOn: macos-12
23+
- swift: "5.5"
24+
xcode: "13.2.1"
25+
runsOn: macos-11
26+
- swift: "5.4"
27+
xcode: "12.5.1"
28+
runsOn: macos-11
29+
- swift: "5.3"
30+
xcode: "12.4"
31+
runsOn: macos-10.15
32+
- swift: "5.2"
33+
xcode: "11.7"
34+
runsOn: macos-10.15
35+
- swift: "5.1"
36+
xcode: "11.3.1"
37+
runsOn: macos-10.15
4438
steps:
45-
- uses: actions/checkout@v1
46-
- name: "Testing in iOS 14.5"
47-
run: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=14.5,name=iPhone 12 Pro'
48-
env:
49-
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
50-
- name: "Testing in iOS 15.0"
51-
run: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=15.0,name=iPhone 13 Pro'
52-
env:
53-
DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer
39+
- uses: actions/checkout@v2
40+
- name: Building in Swift ${{ matrix.swift }}
41+
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=${{ matrix.swift }} clean build
5442

55-
testing_compat:
56-
runs-on: macOS-10.15
43+
test:
44+
runs-on: ${{ matrix.runsOn }}
45+
env:
46+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
include:
51+
- os: "15.4"
52+
xcode: "13.3.1"
53+
sim: "iPhone 13 Pro"
54+
runsOn: macos-12
55+
- os: "15.2"
56+
xcode: "13.2.1"
57+
sim: "iPhone 13 Pro"
58+
runsOn: macos-11
59+
- os: "15.0"
60+
xcode: "13.1"
61+
sim: "iPhone 13 Pro"
62+
runsOn: macos-11
63+
- os: "14.5"
64+
xcode: "12.5.1"
65+
sim: "iPhone 12 Pro"
66+
runsOn: macos-11
67+
- os: "14.4"
68+
xcode: "12.4"
69+
sim: "iPhone 12 Pro"
70+
runsOn: macos-10.15
71+
- os: "13.7"
72+
xcode: "11.7"
73+
sim: "iPhone 11 Pro"
74+
runsOn: macos-10.15
5775
steps:
58-
- uses: actions/checkout@v1
59-
- name: "Testing in iOS 13.7"
60-
run: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=13.7,name=iPhone 11 Pro'
61-
env:
62-
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
63-
- name: "Testing in iOS 14.4"
64-
run: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=14.4,name=iPhone 12 Pro'
65-
env:
66-
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
76+
- uses: actions/checkout@v2
77+
- name: Testing in iOS ${{ matrix.os }}
78+
run: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=${{ matrix.os }},name=${{ matrix.sim }}'
6779

6880
example:
69-
runs-on: macOS-11
81+
runs-on: macos-12
7082
env:
71-
DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer
83+
DEVELOPER_DIR: /Applications/Xcode_13.3.1.app/Contents/Developer
84+
strategy:
85+
fail-fast: false
86+
matrix:
87+
include:
88+
- example: "Maps"
89+
- example: "Stocks"
90+
- example: "Samples"
7291
steps:
73-
- uses: actions/checkout@v1
74-
- name: "Build Maps"
75-
run: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Maps -sdk iphonesimulator clean build
76-
- name: "Build Stocks"
77-
run: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Stocks -sdk iphonesimulator clean build
78-
- name: "Build Samples"
79-
run: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Samples -sdk iphonesimulator clean build
92+
- uses: actions/checkout@v2
93+
- name: Building ${{ matrix.example }}
94+
run: xcodebuild -workspace FloatingPanel.xcworkspace -scheme ${{ matrix.example }} -sdk iphonesimulator clean build
8095

8196
swiftpm:
82-
runs-on: macOS-11
97+
runs-on: macos-12
8398
env:
84-
DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer
99+
DEVELOPER_DIR: /Applications/Xcode_13.3.1.app/Contents/Developer
100+
strategy:
101+
fail-fast: false
102+
matrix:
103+
include:
104+
- target: "arm64-apple-ios15.4-simulator"
105+
- target: "x86_64-apple-ios15.4-simulator"
85106
steps:
86-
- uses: actions/checkout@v1
87-
- name: "Swift Package build"
88-
run: swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.3-simulator"
107+
- uses: actions/checkout@v2
108+
- name: "Swift Package Manager build"
109+
run: swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "${{ matrix.target }}"
89110

90111
carthage:
91-
runs-on: macOS-11
112+
runs-on: macos-11
92113
steps:
93-
- uses: actions/checkout@v1
114+
- uses: actions/checkout@v2
94115
- name: "Carthage build"
95116
run: carthage build --use-xcframeworks --no-skip-current
96117

97118
cocoapods:
98-
runs-on: macOS-11
119+
runs-on: macos-12
99120
steps:
100-
- uses: actions/checkout@v1
121+
- uses: actions/checkout@v2
101122
- name: "CocoaPods: pod lib lint"
102123
run: pod lib lint --allow-warnings
103124
- name: "CocoaPods: pod spec lint"

0 commit comments

Comments
 (0)