From fcbf04edacf55a55a3d3b8e1f5da2b5f02fd876c Mon Sep 17 00:00:00 2001 From: Levi Bostian Date: Wed, 27 Sep 2023 09:34:51 -0500 Subject: [PATCH] ci: xcode15 stable instead of beta (#387) --- .github/actions/setup-ios/action.yml | 10 ++++++++++ .github/workflows/build-sample-apps.yml | 6 +----- .github/workflows/deploy-sdk.yml | 14 ++++---------- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 22 +++++----------------- 5 files changed, 21 insertions(+), 33 deletions(-) create mode 100644 .github/actions/setup-ios/action.yml diff --git a/.github/actions/setup-ios/action.yml b/.github/actions/setup-ios/action.yml new file mode 100644 index 000000000..100cc8fe7 --- /dev/null +++ b/.github/actions/setup-ios/action.yml @@ -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" \ No newline at end of file diff --git a/.github/workflows/build-sample-apps.yml b/.github/workflows/build-sample-apps.yml index 0e7480a5a..121ad6910 100644 --- a/.github/workflows/build-sample-apps.yml +++ b/.github/workflows/build-sample-apps.yml @@ -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: | diff --git a/.github/workflows/deploy-sdk.yml b/.github/workflows/deploy-sdk.yml index fac76815b..102aa7978 100644 --- a/.github/workflows/deploy-sdk.yml +++ b/.github/workflows/deploy-sdk.yml @@ -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: @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 87fc6db6c..62710aa80 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5390cd7b6..3f6deb793 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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/fastlane-action@v3.0.0 with: lane: 'scan' @@ -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