Skip to content

Commit

Permalink
ci: xcode15 stable instead of beta (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
levibostian authored Sep 27, 2023
1 parent 5adafee commit fcbf04e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 33 deletions.
10 changes: 10 additions & 0 deletions .github/actions/setup-ios/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Setup iOS
description: Setup CI with iOS development tools to compile and test iOS source code.

runs:
using: "composite"
steps:
- name: Install XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15"
6 changes: 1 addition & 5 deletions .github/workflows/build-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ jobs:
name: Building app...${{ matrix.sample-app }}
steps:
- uses: actions/checkout@v4

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15.0-beta"
- uses: ./.github/actions/setup-ios

- name: Install CLI tools used in CI script
run: |
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/deploy-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:

permissions:
contents: write # access to push the git tag
issues: write # Bot creates an issue if there is an issue during deployment process
pull-requests: write # allow bot to make comments on PRs after they get deployed

jobs:
deploy-git-tag:
Expand All @@ -32,12 +30,6 @@ jobs:
- name: Install sd CLI to use later in the workflow
uses: kenji-miyake/setup-sd@v1

# once this issue is resolved, we can remove this workaround. https://github.com/cycjimmy/semantic-release-action/issues/159#issuecomment-1490892625
- name: Workaround for latest cycjimmy/semantic-release-action v3 throwing error while executing
uses: actions/setup-node@v3
with:
node-version: 14

# Semantic-release tool is used to:
# 1. Determine the next semantic version for the software during deployment.
# For example, if the last deployment you made was version 1.3.5 and you are releasing a new feature
Expand Down Expand Up @@ -141,7 +133,7 @@ jobs:
if: ${{ needs.deploy-git-tag.outputs.new_release_published == 'true' || github.event_name == 'workflow_dispatch' }}
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
runs-on: macos-12
runs-on: macos-13
steps:
- name: Checkout git tag that got created in previous step
uses: actions/checkout@v4
Expand All @@ -153,7 +145,9 @@ jobs:
uses: actions/checkout@v4
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
ref: ${{ inputs.existing-git-tag }}
ref: ${{ inputs.existing-git-tag }}

- uses: ./.github/actions/setup-ios

- name: Install cocoapods
run: gem install cocoapods
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [pull_request]
jobs:
assert-formatted:
name: Assert that code has been linted and formatted before merging
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install swiftformat and swiftlint
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,16 @@ concurrency: # cancel previous workflow run if one exists.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Thanks, https://swiftpackageindex.com/docs/builds for help coming up with *how* we build the artifacts. Swift build on Linux, XCode build on mac. Changing the XCode version to a specific version is how to set what version of Swift we want to test against on macOS. This is more real-world but also because I encountered issues with trying to install a Swift version in the macOS environment and try to run tests on it.
# See example commands by choosing a package: https://swiftpackageindex.com/nativedevbr/swift-log/builds and viewing the build information for each environment to see the commands run in that environment.

jobs:
xcode-test:
strategy:
matrix:
# 13.3 = swift 5.6
# Thanks: https://swiftly.dev/swift-versions, https://xcodereleases.com/, https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#xcode
xcode: ["14.3"]
automated-tests:
runs-on: macos-13
name: XCode macOS tests (xcode ${{ matrix.xcode }})
permissions:
checks: write # Need write permission to add test result check.
steps:
- uses: actions/checkout@v4
- name: Set up XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- uses: ./.github/actions/setup-ios
# If running tests fails, sometimes it's because of scheme name is wrong. This gives us all available schemes.
- name: Get XCode schemes (xcode ${{ matrix.xcode }})
- name: Get XCode schemes
run: xcrun xcodebuild -list

- name: Setup Ruby to run Fastlane
Expand All @@ -36,7 +24,7 @@ jobs:
ruby-version: '3.0'
bundler-cache: true # install dependencies in Gemfile, including Fastlane.

- name: Run tests (xcode ${{ matrix.xcode }})
- name: Run tests
uses: maierj/[email protected]
with:
lane: 'scan'
Expand Down Expand Up @@ -64,7 +52,7 @@ jobs:
- name: Publish test results
uses: mikepenz/action-junit-report@v4
with:
check_name: XCode macOS tests (xcode ${{ matrix.xcode }}) - Results
check_name: XCode macOS tests - Results
report_paths: test-report.xml
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_failure: true
Expand Down

0 comments on commit fcbf04e

Please sign in to comment.