From eb058651072c69b0e433d030e8264d6eb593ad83 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Sat, 26 Oct 2024 19:44:37 -0700 Subject: [PATCH] . e Update build action --- .github/workflows/build.yml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cae3c1c2..77b3aaeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,13 @@ name: Build on: + workflow_dispatch: push: branches: [ main ] pull_request: branches: [ main ] concurrency: - # Cancel any in-progress workflows for this workflow/branch combination. group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -25,12 +25,11 @@ jobs: - { scheme: 'OCHamcrest-tvOS', sdk: 'appletvsimulator', destination: 'platform=tvOS Simulator,OS=latest,name=Apple TV' } - { scheme: 'OCHamcrest-watchOS', sdk: 'watchsimulator', destination: 'platform=watchOS Simulator,OS=latest,name=Apple Watch Series 6 (44mm)' } steps: - - name: Check out project - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Show current version of Xcode run: xcodebuild -version - name: Build - run: xcodebuild build -project '${{ env.project }}' -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' CODE_SIGNING_ALLOWED='NO' | xcpretty && exit ${PIPESTATUS[0]} + run: set -o pipefail && xcodebuild build -project '${{ env.project }}' -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' CODE_SIGNING_ALLOWED='NO' | xcbeautify test: name: Build, test, report coverage @@ -39,14 +38,11 @@ jobs: scheme: OCHamcrest sdk: macosx steps: - - name: Check out project - uses: actions/checkout@v4 - - name: Set up Xcode version - run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer + - uses: actions/checkout@v4 - name: Show current version of Xcode run: xcodebuild -version - name: Build & test - run: xcodebuild test -project '${{ env.project }}' -scheme '${{ env.scheme }}' -sdk '${{ env.sdk }}' CODE_SIGNING_ALLOWED='NO' | xcpretty && exit ${PIPESTATUS[0]} + run: set -o pipefail && xcodebuild test -project '${{ env.project }}' -scheme '${{ env.scheme }}' -sdk '${{ env.sdk }}' CODE_SIGNING_ALLOWED='NO' | xcbeautify - name: Install gems run: | bundle config path vendor/bundle @@ -68,8 +64,7 @@ jobs: name: Build Swift package runs-on: macos-latest steps: - - name: Check out project - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Build run: cd Source; swift build -v @@ -78,8 +73,7 @@ jobs: name: Build Carthage runs-on: macos-latest steps: - - name: Check out project - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Show current version of Xcode run: xcodebuild -version - name: Show current version of Carthage @@ -93,8 +87,7 @@ jobs: name: Pod Spec Lint runs-on: macos-latest steps: - - name: Check out project - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Show current version of CocoaPods run: pod --version - name: Lint the pod spec @@ -104,8 +97,7 @@ jobs: needs: [ buildSwiftPackage, buildCarthage, podspec ] runs-on: ubuntu-latest steps: - - name: Check out repo - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: auto-merge if: | github.actor == 'dependabot[bot]' &&