Skip to content

Commit

Permalink
update CI config for macos-latest (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
watt authored Jun 20, 2024
1 parent 15d7d29 commit 7abd376
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 38 deletions.
84 changes: 47 additions & 37 deletions .github/workflows/swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- main
pull_request:

env:
XCODE_VERSION: 15.1
IOS_DESTINATION: platform=iOS Simulator,OS=17.2,name=iPad (10th generation)

jobs:
development-apps:
runs-on: macos-latest
Expand All @@ -24,90 +28,96 @@ jobs:
- Development-Unit-WorkflowRxSwiftTestingTests

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache gems
uses: actions/cache@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
path: .bundle
key: gems-${{ hashFiles('Gemfile.lock') }}

- name: Bundle Install
run: |
bundle check || bundle install --path .bundle
# Uses version specified in .ruby_version
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Pod Install
run: |
bundle exec pod gen Development.podspec
- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app

- name: Build & Test
run: |
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
set -o pipefail
xcodebuild \
-workspace gen/Development/Development.xcworkspace \
-scheme ${{ matrix.scheme }} \
-destination "$IOS_DESTINATION" \
build test | bundle exec xcpretty
spm:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

- name: Swift Package Manager - iOS
run: |
xcodebuild -scheme "Workflow-Package" test -destination "name=iPhone 11"
xcodebuild \
-scheme "Workflow-Package" \
-destination "$IOS_DESTINATION" \
test
- name: Swift Package Manager - macOS
run: |
xcodebuild -scheme "Workflow-Package" test -destination "platform=macOS"
xcodebuild \
-scheme "Workflow-Package" \
-destination "platform=macOS" \
test
tutorial:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache gems
uses: actions/cache@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
path: .bundle
key: gems-${{ hashFiles('Gemfile.lock') }}

- name: Bundle Install
run: |
bundle check || bundle install --path .bundle
# Uses version specified in .ruby_version
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

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

- name: Tutorial App
run: |
cd Samples/Tutorial
bundle exec pod install
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
set -o pipefail
xcodebuild \
-workspace Tutorial.xcworkspace \
-scheme Tutorial \
-destination "$IOS_DESTINATION" \
build test | bundle exec xcpretty
documentation-lint:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache gems
uses: actions/cache@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
path: .bundle
key: gems-${{ hashFiles('Gemfile.lock') }}

- name: Bundle Install
run: |
bundle check || bundle install --path .bundle
brew install sourcedocs
# Uses version specified in .ruby_version
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

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

- name: Install sourcedocs
run: brew install sourcedocs

- name: Swiftdocs
run: |
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ gem 'cocoapods-trunk', '>=1.6.0'
gem 'cocoapods'

gem 'cocoapods-generate'
gem 'xcpretty'
6 changes: 5 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ GEM
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.2.6)
rouge (2.0.7)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
typhoeus (1.4.1)
Expand All @@ -99,6 +100,8 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)

PLATFORMS
ruby
Expand All @@ -107,6 +110,7 @@ DEPENDENCIES
cocoapods
cocoapods-generate
cocoapods-trunk (>= 1.6.0)
xcpretty

BUNDLED WITH
2.1.4
2.5.13
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7abd376

Please sign in to comment.