Skip to content

Commit

Permalink
ci: update to Xcode 14 (#412)
Browse files Browse the repository at this point in the history
* ci: update to Xcode 14

* Update release.yml

* run cocoapods on Xcode 13
  • Loading branch information
cbaker6 authored Sep 14, 2022
1 parent e2827c5 commit baf70f6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ on:
pull_request:
branches: '*'
env:
CI_XCODE_VER: '/Applications/Xcode_12.5.1.app/Contents/Developer'
CI_XCODE_OLDEST: '/Applications/Xcode_12.5.1.app/Contents/Developer'
CI_XCODE_13: '/Applications/Xcode_13.4.1.app/Contents/Developer'
CI_XCODE_LATEST: '/Applications/Xcode_14.0.app/Contents/Developer'

jobs:
xcode-test-ios:
Expand All @@ -18,23 +19,23 @@ jobs:
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(iOS\) -destination platform\=iOS\ Simulator,name\=iPhone\ 12\ Pro\ Max -derivedDataPath DerivedData -test-iterations 10 -retry-tests-on-failure clean test | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Prepare codecov
uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
with:
format: lcov
search-paths: ./DerivedData
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
env_vars: IOS
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

xcode-test-macos:
runs-on: macos-12
Expand All @@ -51,23 +52,23 @@ jobs:
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(macOS\) -destination platform\=macOS -derivedDataPath DerivedData -test-iterations 10 -retry-tests-on-failure clean test | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Prepare codecov
uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
with:
format: lcov
search-paths: ./DerivedData
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
env_vars: MACOS
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

xcode-test-tvos:
runs-on: macos-12
Expand All @@ -78,23 +79,23 @@ jobs:
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(tvOS\) -destination platform\=tvOS\ Simulator,name\=Apple\ TV -derivedDataPath DerivedData -test-iterations 10 -retry-tests-on-failure clean test | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Prepare codecov
uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
with:
format: lcov
search-paths: ./DerivedData
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
env_vars: TVOS
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

xcode-build-watchos:
runs-on: macos-12
Expand All @@ -105,13 +106,13 @@ jobs:
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -target ParseSwift\ \(watchOS\) | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: WATCHOS
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

spm-test:
runs-on: macos-12
Expand All @@ -128,23 +129,23 @@ jobs:
- name: Build and Test
run: swift test --enable-code-coverage -v
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Prepare codecov
uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
with:
format: lcov
search-paths: ./.build
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
env_vars: SPM
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

spm-test-5_2:
needs: xcode-build-watchos
Expand All @@ -154,7 +155,7 @@ jobs:
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(iOS\) -destination platform\=iOS\ Simulator,name\=iPhone\ 11 -derivedDataPath DerivedData clean test | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
DEVELOPER_DIR: ${{ env.CI_XCODE_OLDEST }}
- name: Prepare codecov
uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
Expand All @@ -168,7 +169,7 @@ jobs:
env_vars: IOS_Earliest
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
DEVELOPER_DIR: ${{ env.CI_XCODE_OLDEST }}

linux:
runs-on: ubuntu-18.04
Expand Down Expand Up @@ -233,7 +234,7 @@ jobs:
- name: Generate Docs
run: set -o pipefail && env NSUnbufferedIO=YES Scripts/generate-documentation
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

cocoapods:
needs: xcode-build-watchos
Expand Down Expand Up @@ -261,4 +262,4 @@ jobs:
- name: Carthage
run: ./Scripts/carthage.sh build --no-skip-current --use-xcframeworks
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
types: [published]
env:
CI_XCODE_13: '/Applications/Xcode_13.4.1.app/Contents/Developer'
CI_XCODE_LATEST: '/Applications/Xcode_14.0.app/Contents/Developer'

jobs:
cocoapods:
Expand Down Expand Up @@ -36,4 +37,4 @@ jobs:
run: set -o pipefail && env NSUnbufferedIO=YES Scripts/update-gh-pages-documentation-site
env:
CURRENT_BRANCH_NAME: release
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

0 comments on commit baf70f6

Please sign in to comment.