Skip to content

Commit

Permalink
. e Update build action
Browse files Browse the repository at this point in the history
  • Loading branch information
jonreid committed Oct 27, 2024
1 parent cf8cdb9 commit eb05865
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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]' &&
Expand Down

0 comments on commit eb05865

Please sign in to comment.