Skip to content

Commit

Permalink
ci updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Mar 29, 2024
1 parent 08611bd commit 6f9736e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
Expand Down
29 changes: 8 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,9 @@ on:
push:
branches:
- main
paths:
- '.github/workflows/ci.yml'
- 'Sources/**/*.*'
- 'Tests/**/*.*'
- 'Example/**/*.*'
pull_request:
branches:
- main
paths:
- '.github/workflows/ci.yml'
- 'Sources/**/*.*'
- 'Tests/**/*.*'
- 'Example/**/*.*'

env:
PROJECT: ReactiveCollectionsKit.xcodeproj
Expand All @@ -28,15 +18,14 @@ env:
EXAMPLE_PROJECT: Example/ExampleApp.xcodeproj
EXAMPLE_SCHEME: ExampleApp

DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer

IOS_SDK: iphonesimulator14.5
IOS_DEST: "OS=14.5,name=iPhone 12 Mini"
IOS_DEST: "platform=iOS Simulator,name=iPhone 15,OS=latest"

jobs:
env-details:
name: Environment details
runs-on: macOS-11
runs-on: macos-13
steps:
- name: xcode version
run: xcodebuild -version -sdk
Expand All @@ -48,7 +37,7 @@ jobs:
test-iOS:
name: iOS unit test
runs-on: macOS-11
runs-on: macOS-13
steps:
- name: git checkout
uses: actions/checkout@v4
Expand All @@ -59,13 +48,12 @@ jobs:
xcodebuild clean test \
-project "$PROJECT" \
-scheme "$SCHEME" \
-sdk "$IOS_SDK" \
-destination "$IOS_DEST" \
ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | xcpretty -c
CODE_SIGN_IDENTITY="-" | xcpretty -c
ui-test-iOS:
name: iOS UI test
runs-on: macOS-11
name: iOS UI tests
runs-on: macos-13
steps:
- name: git checkout
uses: actions/checkout@v4
Expand All @@ -76,6 +64,5 @@ jobs:
xcodebuild clean test \
-project "$EXAMPLE_PROJECT" \
-scheme "$EXAMPLE_SCHEME" \
-sdk "$IOS_SDK" \
-destination "$IOS_DEST" \
ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | xcpretty -c
CODE_SIGN_IDENTITY="-" | xcpretty -c
31 changes: 12 additions & 19 deletions .github/workflows/spm-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,19 @@ on:
push:
branches:
- main
paths:
- '.github/workflows/spm-ios.yml'
- 'Package*'
- 'Sources/**/*.*'
- 'Tests/**/*.*'
pull_request:
branches:
- main
paths:
- '.github/workflows/spm-ios.yml'
- 'Package*'
- 'Sources/**/*.*'
- 'Tests/**/*.*'

env:
DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer

IOS_SDK: iphonesimulator14.5
IOS_DEST: "OS=14.5,name=iPhone 12 Mini"

DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
IOS_DEST: "platform=iOS Simulator,name=iPhone 15,OS=latest"
SCHEME: ReactiveCollectionsKit

jobs:
main:
name: SwiftPM Build
runs-on: macOS-11
runs-on: macos-13
steps:
- name: git checkout
uses: actions/checkout@v4
Expand All @@ -45,10 +32,16 @@ jobs:
xcrun simctl delete unavailable
xcrun simctl list
- name: generate xcodeproj
run: swift package generate-xcodeproj
# Only if needed. If repo contains an Xcode project, delete it.
- name: delete xcodeproj
run: rm -rf ReactiveCollectionsKit.xcodeproj

- name: Build
run: |
set -o pipefail
xcodebuild clean build -scheme "$SCHEME" -sdk "$IOS_SDK" -destination "$IOS_DEST" | xcpretty -c
xcodebuild build -scheme "$SCHEME" -destination "$IOS_DEST" | xcpretty -c
- name: Test
run: |
set -o pipefail
xcodebuild test -scheme "$SCHEME" -destination "$IOS_DEST" | xcpretty -c

0 comments on commit 6f9736e

Please sign in to comment.