Skip to content

Commit

Permalink
Modernize xcodebuild workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHerrmann committed Mar 3, 2024
1 parent 541496b commit 8532131
Showing 1 changed file with 25 additions and 52 deletions.
77 changes: 25 additions & 52 deletions .github/workflows/xcodebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,33 @@ name: Xcode Build

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
workflow_dispatch:
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.app/Contents/Developer

jobs:
build-macos:
runs-on: macos-11

build:
name: Build Package
runs-on: macos-latest
strategy:
matrix:
destination:
- generic/platform=macOS
- generic/platform=macOS,variant=Mac Catalyst
- generic/platform=iOS
- generic/platform=tvOS
- generic/platform=watchOS
steps:
- uses: actions/checkout@v2
- name: Build macOS
run: xcodebuild -scheme UIImageColors-Package -destination 'platform=macOS'
- name: Run macOS tests
run: xcodebuild -scheme UIImageColors-Package -destination 'platform=macOS' test

build-macos-catalyst:
runs-on: macos-11

steps:
- uses: actions/checkout@v2
- name: Build macOS Catalyst
run: xcodebuild -scheme UIImageColors-Package -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst'
- name: Run macOS Catalyst tests
run: xcodebuild -scheme UIImageColors-Package -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' test

build-ios:
runs-on: macos-11

steps:
- uses: actions/checkout@v2
- name: Build iOS
run: xcodebuild -scheme UIImageColors-Package -destination 'name=iPhone 12'
- name: Run iOS tests
run: xcodebuild -scheme UIImageColors-Package -destination 'name=iPhone 12' test

build-tvos:
runs-on: macos-11

steps:
- uses: actions/checkout@v2
- name: Build tvOS
run: xcodebuild -scheme UIImageColors-Package -destination 'name=Apple TV'
- name: Run tvOS tests
run: xcodebuild -scheme UIImageColors-Package -destination 'name=Apple TV' test

build-watchos:
runs-on: macos-11

steps:
- uses: actions/checkout@v2
- name: Build watchOS
run: xcodebuild -scheme UIImageColors-Package -destination 'name=Apple Watch Series 6 - 44mm'
- name: Run watchOS tests
run: xcodebuild -scheme UIImageColors-Package -destination 'name=Apple Watch Series 6 - 44mm' test
- uses: actions/checkout@v4
- name: Build
run: |
xcodebuild \
-scheme UIImageColors-Package \
-destination '${{ matrix.destination }}'
- name: Test
run: |
xcodebuild \
-scheme UIImageColors-Package \
-destination '${{ matrix.destination }}' \
test

0 comments on commit 8532131

Please sign in to comment.