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 263a2dd commit 24e988c
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 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 @@ -21,12 +21,11 @@ jobs:
- { project: 'Source/ViewControllerPresentationSpy.xcodeproj', scheme: 'ViewControllerPresentationSpy-tvOS', sdk: 'appletvsimulator', destination: 'platform=tvOS Simulator,OS=latest,name=Apple TV' }
- { project: 'ObjCSample/ObjCSampleViewControllerPresentationSpy.xcodeproj', scheme: 'ObjCSampleViewControllerPresentationSpy', sdk: 'iphonesimulator', destination: 'platform=iOS Simulator,OS=latest,name=iPhone 8' }
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 '${{ matrix.run-config['project'] }}' -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcpretty && exit ${PIPESTATUS[0]}
run: set -o pipefail && xcodebuild build -project '${{ matrix.run-config['project'] }}' -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcbeautify

test:
name: Build & test
Expand All @@ -37,12 +36,11 @@ jobs:
- { project: 'SwiftSample/SwiftSampleViewControllerPresentationSpy.xcodeproj', scheme: 'SwiftSampleViewControllerPresentationSpy', sdk: 'iphonesimulator', destination: 'platform=iOS Simulator,OS=latest,name=iPad Air (4th generation)' }
- { project: 'SwiftSamplePackage/SwiftSampleViewControllerPresentationSpy.xcodeproj', scheme: 'SwiftSampleViewControllerPresentationSpy', sdk: 'iphonesimulator', destination: 'platform=iOS Simulator,OS=latest,name=iPad Air (4th generation)' }
steps:
- name: Check out project
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Show current version of Xcode
run: xcodebuild -version
- name: Build & test
run: xcodebuild build -project '${{ matrix.run-config['project'] }}' -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcpretty && exit ${PIPESTATUS[0]}
run: set -o pipefail && xcodebuild build -project '${{ matrix.run-config['project'] }}' -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcbeautify

buildCarthage:
needs: [ build, test ]
Expand All @@ -58,17 +56,15 @@ jobs:
name: Pod Spec Lint
runs-on: macos-latest
steps:
- name: Check out project
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Lint the pod spec
run: pod spec lint --quick

auto-merge:
needs: [ 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 24e988c

Please sign in to comment.