Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI workflows #1948

Open
wants to merge 32 commits into
base: v4
Choose a base branch
from
Open

Update CI workflows #1948

wants to merge 32 commits into from

Conversation

nauaros
Copy link
Contributor

@nauaros nauaros commented Jan 15, 2025

Summary

Demo

Update workflows machine version.

Ticket

COIOS-000

@nauaros nauaros self-assigned this Jan 15, 2025
@nauaros nauaros added the chore a pull request that has chore changes that shouldn't be in the release notes label Jan 15, 2025
@@ -10,20 +10,45 @@ on:
jobs:

tests:
runs-on: macos-12
runs-on: macos-14-xlarge
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need xlarge machine? We could use macos-latest and ideally forget about this type of updates.

xcode_version: '16.1'
needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 16

# - destination: 'name=iPhone 11 Pro'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented code

@@ -23,7 +26,7 @@ jobs:
- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to lock it now?

Copy link
Contributor

@goergisn goergisn Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to sync it with our local machines (like with v5) so the tests are reproducible

- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks repetitive, I guess it could be extracted to the top level as env var

env:
  xcode_version: '16.1'

and later used as

with:
    xcode-version: ${{env.xcode_version}}

@@ -125,7 +125,7 @@ cp "../Demo/Configuration.swift" Source/Configuration.swift
xcodegen generate

echo_header "Run Tests"
xcodebuild build test -project $PROJECT_NAME.xcodeproj -scheme App -destination "name=iPhone 13" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty && exit ${PIPESTATUS[0]}
xcodebuild build test -project $PROJECT_NAME.xcodeproj -scheme App -destination "name=iPhone 16" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty && exit ${PIPESTATUS[0]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is a good candidate for env var extraction as we will be updating this once in a while

swift package update

swift package generate-xcodeproj
echo "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file change is substantial and is not very clear, can you provide brief explanation what's happening in here?

@nauaros nauaros changed the title Update workflows machine version Update CI workflows Jan 16, 2025
nauaros and others added 6 commits January 17, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore a pull request that has chore changes that shouldn't be in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants