Upgrade the github-ci to macOS 14
This commit is contained in:
parent
e057a3cda6
commit
94ae5347ba
|
@ -14,12 +14,12 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
Pods:
|
Pods:
|
||||||
name: Cocoapods Lint
|
name: Cocoapods Lint
|
||||||
runs-on: macos-13
|
runs-on: macos-14
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_14.1.app
|
DEVELOPER_DIR: /Applications/Xcode_15.2.app
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Cocoapods
|
- name: Install Cocoapods
|
||||||
run: gem install cocoapods --no-document --quiet
|
run: gem install cocoapods --no-document --quiet
|
||||||
|
@ -27,6 +27,12 @@ jobs:
|
||||||
- name: Install Xcpretty
|
- name: Install Xcpretty
|
||||||
run: gem install xcpretty --no-document --quiet
|
run: gem install xcpretty --no-document --quiet
|
||||||
|
|
||||||
|
- name: Pod Update
|
||||||
|
run: pod repo update --silent
|
||||||
|
|
||||||
|
- name: Pod Install
|
||||||
|
run: pod install
|
||||||
|
|
||||||
- name: Run SDWebImageSwiftUI podspec lint
|
- name: Run SDWebImageSwiftUI podspec lint
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
@ -34,24 +40,23 @@ jobs:
|
||||||
|
|
||||||
Demo:
|
Demo:
|
||||||
name: Run Demo
|
name: Run Demo
|
||||||
runs-on: macos-13
|
runs-on: macos-14
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_14.1.app
|
DEVELOPER_DIR: /Applications/Xcode_15.2.app
|
||||||
WORKSPACE_NAME: SDWebImageSwiftUI.xcworkspace
|
WORKSPACE_NAME: SDWebImageSwiftUI.xcworkspace
|
||||||
OSXSCHEME: SDWebImageSwiftUIDemo-macOS
|
OSXSCHEME: SDWebImageSwiftUIDemo-macOS
|
||||||
iOSSCHEME: SDWebImageSwiftUIDemo
|
iOSSCHEME: SDWebImageSwiftUIDemo
|
||||||
TVSCHEME: SDWebImageSwiftUIDemo-tvOS
|
TVSCHEME: SDWebImageSwiftUIDemo-tvOS
|
||||||
WATCHSCHEME: SDWebImageSwiftUIDemo-watchOS WatchKit App
|
WATCHSCHEME: SDWebImageSwiftUIDemo-watchOS WatchKit App
|
||||||
strategy:
|
iosDestination: platform=iOS Simulator,name=iPhone 15 Pro
|
||||||
matrix:
|
macOSDestination: platform=macOS,arch=x86_64
|
||||||
iosDestination: ["platform=iOS Simulator,name=iPhone 14 Pro"]
|
macCatalystDestination: platform=macOS,arch=x86_64,variant=Mac Catalyst
|
||||||
tvOSDestination: ["platform=tvOS Simulator,name=Apple TV"]
|
tvOSDestination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
|
||||||
watchOSDestination: ["platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)"]
|
watchOSDestination: platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)
|
||||||
macOSDestination: ["platform=macOS"]
|
visionOSDestination: platform=visionOS Simulator,name=Apple Vision Pro
|
||||||
macCatalystDestination: ["platform=macOS,variant=Mac Catalyst"]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Clean DerivedData
|
- name: Clean DerivedData
|
||||||
run: |
|
run: |
|
||||||
|
@ -73,45 +78,57 @@ jobs:
|
||||||
- name: Run demo for OSX
|
- name: Run demo for OSX
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.OSXSCHEME }}" -destination "${{ matrix.macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.OSXSCHEME }}" -destination "${{ env.macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||||
|
|
||||||
- name: Run demo for iOS
|
- name: Run demo for iOS
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.iOSSCHEME }}" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.iOSSCHEME }}" -destination "${{ env.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||||
|
|
||||||
- name: Run demo for TV
|
- name: Run demo for TV
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.TVSCHEME }}" -destination "${{ matrix.tvOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.TVSCHEME }}" -destination "${{ env.tvOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||||
|
|
||||||
- name: Run demo for Watch
|
- name: Run demo for Watch
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.WATCHSCHEME }}" -destination "${{ matrix.watchOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
xcodebuild build -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.WATCHSCHEME }}" -destination "${{ env.watchOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||||
|
|
||||||
Test:
|
Test:
|
||||||
name: Unit Test
|
name: Unit Test
|
||||||
runs-on: macos-13
|
runs-on: macos-14
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_14.1.app
|
DEVELOPER_DIR: /Applications/Xcode_15.2.app
|
||||||
WORKSPACE_NAME: SDWebImageSwiftUI.xcworkspace
|
WORKSPACE_NAME: SDWebImageSwiftUI.xcworkspace
|
||||||
OSXSCHEME: SDWebImageSwiftUITests macOS
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
iOSSCHEME: SDWebImageSwiftUITests
|
# use matrix to generate jobs for each platform
|
||||||
TVSCHEME: SDWebImageSwiftUITests tvOS
|
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
iosDestination: ["platform=iOS Simulator,name=iPhone 14 Pro"]
|
platform: [iOS, macOS, tvOS]
|
||||||
macOSDestination: ["platform=macOS"]
|
include:
|
||||||
tvOSDestination: ["platform=tvOS Simulator,name=Apple TV"]
|
- platform: iOS
|
||||||
|
destination: platform=iOS Simulator,name=iPhone 15 Pro
|
||||||
|
scheme: SDWebImageSwiftUITests
|
||||||
|
flag: ios
|
||||||
|
- platform: macOS
|
||||||
|
destination: platform=macOS,arch=x86_64
|
||||||
|
scheme: SDWebImageSwiftUITests macOS
|
||||||
|
flag: macos
|
||||||
|
- platform: tvOS
|
||||||
|
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
|
||||||
|
scheme: SDWebImageSwiftUITests tvOS
|
||||||
|
flag: tvos
|
||||||
|
# - platform: visionOS
|
||||||
|
# destination: platform=visionOS Simulator,name=Apple Vision Pro
|
||||||
|
# scheme: Vision
|
||||||
|
# flag: visionos
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
- name: Clean DerivedData
|
fetch-depth: 0
|
||||||
run: |
|
|
||||||
rm -rf ~/Library/Developer/Xcode/DerivedData/
|
|
||||||
mkdir DerivedData
|
|
||||||
|
|
||||||
- name: Install Cocoapods
|
- name: Install Cocoapods
|
||||||
run: gem install cocoapods --no-document --quiet
|
run: gem install cocoapods --no-document --quiet
|
||||||
|
@ -125,38 +142,30 @@ jobs:
|
||||||
- name: Pod Install
|
- name: Pod Install
|
||||||
run: pod install
|
run: pod install
|
||||||
|
|
||||||
- name: Test - ${{ matrix.iosDestination }}
|
- name: Clean DerivedData
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
rm -rf ~/Library/Developer/Xcode/DerivedData/
|
||||||
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.iOSSCHEME }}" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
mkdir DerivedData
|
||||||
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
|
|
||||||
|
|
||||||
- name: Test - ${{ matrix.macOSDestination }}
|
- name: Run test
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.OSXSCHEME }}" -destination "${{ matrix.macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
|
xcodebuild build-for-testing -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||||
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
|
xcodebuild test-without-building -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
|
||||||
|
mv ~/Library/Developer/Xcode/DerivedData/ "./DerivedData/${{ matrix.platform }}"
|
||||||
- name: Test - ${{ matrix.tvOSDestination }}
|
|
||||||
run: |
|
|
||||||
set -o pipefail
|
|
||||||
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.TVSCHEME }}" -destination "${{ matrix.tvOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
|
||||||
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/tvOS
|
|
||||||
|
|
||||||
- name: Code Coverage
|
- name: Code Coverage
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
export PATH="/usr/local/opt/curl/bin:$PATH"
|
export PATH="/usr/local/opt/curl/bin:$PATH"
|
||||||
curl --version
|
curl --version
|
||||||
bash <(curl -s https://codecov.io/bash) -D './DerivedData/macOS' -J '^SDWebImageSwiftUI$' -c -X gcov -F macos
|
bash <(curl -s https://codecov.io/bash) -v -D "./DerivedData/${{ matrix.platform }}" -J '^SDWebImageSwiftUI$' -c -X gcov -F "${{ matrix.flag }}"
|
||||||
bash <(curl -s https://codecov.io/bash) -D './DerivedData/iOS' -J '^SDWebImageSwiftUI$' -c -X gcov -F ios
|
|
||||||
bash <(curl -s https://codecov.io/bash) -D './DerivedData/tvOS' -J '^SDWebImageSwiftUI$' -c -X gcov -F tvos
|
|
||||||
|
|
||||||
Build:
|
Build:
|
||||||
name: Build Library
|
name: Build Library
|
||||||
runs-on: macos-13
|
runs-on: macos-14
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_14.1.app
|
DEVELOPER_DIR: /Applications/Xcode_15.2.app
|
||||||
PROJECT_NAME: SDWebImageSwiftUI.xcodeproj
|
PROJECT_NAME: SDWebImageSwiftUI.xcodeproj
|
||||||
OSXSCHEME: SDWebImageSwiftUI macOS
|
OSXSCHEME: SDWebImageSwiftUI macOS
|
||||||
iOSSCHEME: SDWebImageSwiftUI
|
iOSSCHEME: SDWebImageSwiftUI
|
||||||
|
@ -164,7 +173,7 @@ jobs:
|
||||||
WATCHSCHEME: SDWebImageSwiftUI watchOS
|
WATCHSCHEME: SDWebImageSwiftUI watchOS
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build the SwiftPM
|
- name: Build the SwiftPM
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in New Issue