Skip to content

Commit

Permalink
Split jobs, for better ability to reason about the code
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmakbarlow committed Jan 10, 2025
1 parent 010fc6f commit d70c1d8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

jobs:
library:
tests:
runs-on: macos-14
strategy:
matrix:
Expand Down Expand Up @@ -69,11 +69,40 @@ jobs:
elif [[ "${{ matrix.combination.variation }}" == "examples" ]]; then
echo "IOS_VERSION=${{ matrix.combination.os_version }}" >> $GITHUB_ENV
fi
- name: Run Library Evolution builds
run: make build-for-library-evolution
- name: Run tests
run: make test-${{ matrix.combination.variation }}

library-evolution:
runs-on: macos-14
strategy:
matrix:
combination:
- xcode: '15.4'
variation: ios
os_version: 17.5
- xcode: '16.2'
variation: ios
os_version: 18.1

- xcode: '15.4'
variation: macos
- xcode: '16.2'
variation: macos

steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.combination.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.combination.xcode }}.app
- name: Skip macro validation
run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: Set OS version
run: |
if [[ "${{ matrix.combination.variation }}" == "ios" ]]; then
echo "IOS_VERSION=${{ matrix.combination.os_version }}" >> $GITHUB_ENV
fi
- name: Run Library Evolution builds
run: make library-evolution-${{ matrix.combination.os_version }}

wasm:
name: SwiftWasm
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ test-docs:
|| (echo "xcodebuild docbuild failed:\n\n$(DOC_WARNINGS)" | tr '\1' '\n' \
&& exit 1)

build-for-library-evolution: build-for-library-evolution-ios build-for-library-evolution-macos
library-evolution: build-for-library-evolution-ios build-for-library-evolution-macos

build-for-library-evolution-macos:
library-evolution-macos:
swift build \
-c release \
--target SwiftUINavigation \
Expand All @@ -87,7 +87,7 @@ build-for-library-evolution-macos:
-Xswiftc -enable-library-evolution \
-Xswiftc $(OTHER_SWIFT_FLAGS)

build-for-library-evolution-ios:
library-evolution-ios:
xcodebuild build \
-skipMacroValidation \
-workspace SwiftNavigation.xcworkspace \
Expand Down

0 comments on commit d70c1d8

Please sign in to comment.