From 6f9736e5c1ac0ef6eed0bc368122f9a6931fc298 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Fri, 29 Mar 2024 14:28:57 -0700 Subject: [PATCH] ci updates --- .github/dependabot.yml | 2 +- .github/workflows/ci.yml | 29 ++++++++--------------------- .github/workflows/spm-ios.yml | 31 ++++++++++++------------------- 3 files changed, 21 insertions(+), 41 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 953595f..84a32fb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b51b81..8a9dd14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/spm-ios.yml b/.github/workflows/spm-ios.yml index 0e6f5fd..475a937 100644 --- a/.github/workflows/spm-ios.yml +++ b/.github/workflows/spm-ios.yml @@ -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 @@ -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