Skip to content

Commit 7abd376

Browse files
authored
update CI config for macos-latest (#287)
1 parent 15d7d29 commit 7abd376

File tree

8 files changed

+54
-38
lines changed

8 files changed

+54
-38
lines changed

Diff for: .github/workflows/swift.yaml

+47-37
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
- main
77
pull_request:
88

9+
env:
10+
XCODE_VERSION: 15.1
11+
IOS_DESTINATION: platform=iOS Simulator,OS=17.2,name=iPad (10th generation)
12+
913
jobs:
1014
development-apps:
1115
runs-on: macos-latest
@@ -24,90 +28,96 @@ jobs:
2428
- Development-Unit-WorkflowRxSwiftTestingTests
2529

2630
steps:
27-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
2832

29-
- name: Cache gems
30-
uses: actions/cache@v3
33+
- name: Setup Ruby
34+
uses: ruby/setup-ruby@v1
3135
with:
32-
path: .bundle
33-
key: gems-${{ hashFiles('Gemfile.lock') }}
34-
35-
- name: Bundle Install
36-
run: |
37-
bundle check || bundle install --path .bundle
36+
# Uses version specified in .ruby_version
37+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
3838

3939
- name: Pod Install
4040
run: |
4141
bundle exec pod gen Development.podspec
4242
4343
- name: Switch Xcode
44-
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
44+
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app
4545

4646
- name: Build & Test
4747
run: |
48-
set -o pipefail && xcodebuild -workspace gen/Development/Development.xcworkspace -scheme ${{ matrix.scheme }} -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
48+
set -o pipefail
49+
xcodebuild \
50+
-workspace gen/Development/Development.xcworkspace \
51+
-scheme ${{ matrix.scheme }} \
52+
-destination "$IOS_DESTINATION" \
53+
build test | bundle exec xcpretty
4954
5055
spm:
5156
runs-on: macos-latest
5257

5358
steps:
54-
- uses: actions/checkout@v3
59+
- uses: actions/checkout@v4
5560

5661
- name: Switch Xcode
57-
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
62+
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app
5863

5964
- name: Swift Package Manager - iOS
6065
run: |
61-
xcodebuild -scheme "Workflow-Package" test -destination "name=iPhone 11"
66+
xcodebuild \
67+
-scheme "Workflow-Package" \
68+
-destination "$IOS_DESTINATION" \
69+
test
6270
6371
- name: Swift Package Manager - macOS
6472
run: |
65-
xcodebuild -scheme "Workflow-Package" test -destination "platform=macOS"
73+
xcodebuild \
74+
-scheme "Workflow-Package" \
75+
-destination "platform=macOS" \
76+
test
6677
6778
tutorial:
6879
runs-on: macos-latest
6980

7081
steps:
71-
- uses: actions/checkout@v3
82+
- uses: actions/checkout@v4
7283

73-
- name: Cache gems
74-
uses: actions/cache@v3
84+
- name: Setup Ruby
85+
uses: ruby/setup-ruby@v1
7586
with:
76-
path: .bundle
77-
key: gems-${{ hashFiles('Gemfile.lock') }}
78-
79-
- name: Bundle Install
80-
run: |
81-
bundle check || bundle install --path .bundle
87+
# Uses version specified in .ruby_version
88+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
8289

8390
- name: Switch Xcode
84-
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
91+
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app
8592

8693
- name: Tutorial App
8794
run: |
8895
cd Samples/Tutorial
8996
bundle exec pod install
90-
set -o pipefail && xcodebuild -workspace Tutorial.xcworkspace -scheme Tutorial -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
97+
set -o pipefail
98+
xcodebuild \
99+
-workspace Tutorial.xcworkspace \
100+
-scheme Tutorial \
101+
-destination "$IOS_DESTINATION" \
102+
build test | bundle exec xcpretty
91103
92104
documentation-lint:
93105
runs-on: macos-latest
94106

95107
steps:
96-
- uses: actions/checkout@v3
108+
- uses: actions/checkout@v4
97109

98-
- name: Cache gems
99-
uses: actions/cache@v3
110+
- name: Setup Ruby
111+
uses: ruby/setup-ruby@v1
100112
with:
101-
path: .bundle
102-
key: gems-${{ hashFiles('Gemfile.lock') }}
103-
104-
- name: Bundle Install
105-
run: |
106-
bundle check || bundle install --path .bundle
107-
brew install sourcedocs
113+
# Uses version specified in .ruby_version
114+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
108115

109116
- name: Switch Xcode
110-
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
117+
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app
118+
119+
- name: Install sourcedocs
120+
run: brew install sourcedocs
111121

112122
- name: Swiftdocs
113123
run: |

Diff for: .ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.2.2

Diff for: Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ gem 'cocoapods-trunk', '>=1.6.0'
44
gem 'cocoapods'
55

66
gem 'cocoapods-generate'
7+
gem 'xcpretty'

Diff for: Gemfile.lock

+5-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ GEM
8686
netrc (0.11.0)
8787
public_suffix (4.0.7)
8888
rexml (3.2.6)
89+
rouge (2.0.7)
8990
ruby-macho (2.5.1)
9091
ruby2_keywords (0.0.5)
9192
typhoeus (1.4.1)
@@ -99,6 +100,8 @@ GEM
99100
colored2 (~> 3.1)
100101
nanaimo (~> 0.3.0)
101102
rexml (~> 3.2.4)
103+
xcpretty (0.3.0)
104+
rouge (~> 2.0.7)
102105

103106
PLATFORMS
104107
ruby
@@ -107,6 +110,7 @@ DEPENDENCIES
107110
cocoapods
108111
cocoapods-generate
109112
cocoapods-trunk (>= 1.6.0)
113+
xcpretty
110114

111115
BUNDLED WITH
112-
2.1.4
116+
2.5.13

0 commit comments

Comments
 (0)