Skip to content

Commit

Permalink
Update action to use the proper xcode version
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenachbaur-okta committed Oct 28, 2024
1 parent 6a1a81b commit d718677
Showing 1 changed file with 34 additions and 29 deletions.
63 changes: 34 additions & 29 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ on:
- 'Tests/**/*.swift'

env:
DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer
NSUnbufferedIO: YES

jobs:
Expand All @@ -31,6 +30,11 @@ jobs:
matrix:
os: [macos-latest-large, ubuntu-latest]
swift_version: ["5.10", "6.0"]
exclude:
- os: ubuntu-latest
swift_version: "6.0"
env:
DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
Expand All @@ -47,6 +51,8 @@ jobs:

Cocoapods:
name: CocoaPods Build
env:
DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer
runs-on: macos-latest-xlarge # Running on xlarge to use arm64 chipset
timeout-minutes: 10
needs:
Expand All @@ -68,26 +74,25 @@ jobs:
runs-on: macos-latest-xlarge
strategy:
matrix:
destination:
- "platform=iOS Simulator,OS=16.4,name=iPhone 14 Pro Max"
- "platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro Max"
- "platform=tvOS Simulator,OS=17.5,name=Apple TV"
- "platform=visionOS Simulator,OS=1.2,name=Apple Vision Pro"
- "platform=watchOS Simulator,OS=10.5,name=Apple Watch Series 7 (45mm)"
- "platform=macOS,name=My Mac"
include:
- destination: "platform=iOS Simulator,OS=16.4,name=iPhone 14 Pro Max"
xcode_version: "15.4"
- destination: "platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro Max"
xcode_version: "16.0"
- destination: "platform=tvOS Simulator,OS=17.5,name=Apple TV"
xcode_version: "16.0"
- destination: "platform=visionOS Simulator,OS=1.2,name=Apple Vision Pro"
xcode_version: "15.4"
- destination: "platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro"
xcode_version: "16.0"
- destination: "platform=watchOS Simulator,OS=10.5,name=Apple Watch Series 7 (45mm)"
xcode_version: "16.0"
- destination: "platform=macOS,name=My Mac"
xcode_version: "16.0"
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer
timeout-minutes: 25
steps:
- name: Set test variables
run: |
echo "DESTINATION=${{matrix.destination}}" >> "$GITHUB_ENV"
destination="${{matrix.destination}}"
if [[ $destination =~ "tvOS" ]] || [[ $destination =~ "watchOS" ]]; then
echo "SKIP_WEBAUTHENTICATIONUI=true" >> "$GITHUB_ENV"
echo "WebAuthenticationUI is unsupported on this platform"
else
echo "SKIP_WEBAUTHENTICATIONUI=false" >> "$GITHUB_ENV"
fi
- uses: actions/checkout@master
- name: Build AuthFoundation
run: |
Expand All @@ -96,55 +101,55 @@ jobs:
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme AuthFoundation \
-destination "$DESTINATION" 2>&1
-destination "$destination" 2>&1
- name: Test AuthFoundation
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme AuthFoundation \
-destination "$DESTINATION" 2>&1
-destination "$destination" 2>&1
- name: Build OktaDirectAuth
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaDirectAuth \
-destination "$DESTINATION" 2>&1
-destination "$destination" 2>&1
- name: Test OktaDirectAuth
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaDirectAuth \
-destination "$DESTINATION" 2>&1
-destination "$destination" 2>&1
- name: Build OktaOAuth2
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaOAuth2 \
-destination "$DESTINATION" 2>&1
-destination "$destination" 2>&1
- name: Test OktaOAuth2
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaOAuth2 \
-destination "$DESTINATION" 2>&1
-destination "$destination" 2>&1
- name: Build WebAuthenticationUI
if: env.SKIP_WEBAUTHENTICATIONUI != 'true'
if: "!contains(matrix.destination, 'tvOS') && !contains(matrix.destination, 'watchOS')"
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme WebAuthenticationUI \
-destination "$DESTINATION" 2>&1
-destination "$destination" 2>&1
- name: Test WebAuthenticationUI
if: env.SKIP_WEBAUTHENTICATIONUI != 'true'
if: "!contains(matrix.destination, 'tvOS') && !contains(matrix.destination, 'watchOS')"
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme WebAuthenticationUI \
-destination "$DESTINATION" 2>&1
-destination "$destination" 2>&1

0 comments on commit d718677

Please sign in to comment.