Skip to content

Commit

Permalink
e Extract project/scheme variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jonreid committed Apr 8, 2021
1 parent 6cef307 commit cd1aab5
Showing 1 changed file with 13 additions and 22 deletions.
35 changes: 13 additions & 22 deletions .github/workflows/build.yml
@@ -1,11 +1,12 @@
name: Build
on:
push:
branches: [ actions ]
on: [ push, pull_request ]

env:
project: Source/OCHamcrest.xcodeproj

jobs:

build:
name: Build
name: Build without tests
runs-on: macos-latest
strategy:
matrix:
Expand All @@ -17,32 +18,22 @@ jobs:
- name: Check out project
uses: actions/checkout@v2
- name: Show current version of Xcode
run: xcode-select -p
- name: Show Build Settings
run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme '${{ matrix.run-config['scheme'] }}' -showBuildSettings
- name: Show Build SDKs
run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme '${{ matrix.run-config['scheme'] }}' -showsdks
- name: Show Available Destinations
run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme '${{ matrix.run-config['scheme'] }}' -showdestinations
run: xcodebuild -version
- name: Build
run: xcodebuild build -project Source/OCHamcrest.xcodeproj -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcpretty
run: xcodebuild build -project $project -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcpretty

test:
name: Build, Test, Coverage
name: Build, test, report coverage
runs-on: macos-latest
env:
scheme: OCHamcrest
steps:
- name: Check out project
uses: actions/checkout@v2
- name: Show current version of Xcode
run: xcode-select -p
- name: Show Build Settings
run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme 'OCHamcrest' -showBuildSettings
- name: Show Build SDKs
run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme 'OCHamcrest' -showsdks
- name: Show Available Destinations
run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme 'OCHamcrest' -showdestinations
run: xcodebuild -version
- name: Build & test
run: xcodebuild test -project Source/OCHamcrest.xcodeproj -scheme OCHamcrest -sdk macosx | xcpretty
run: xcodebuild test -project $project -scheme $scheme -sdk macosx | xcpretty
- name: Install gems
run: |
bundle config path vendor/bundle
Expand Down

0 comments on commit cd1aab5

Please sign in to comment.