Skip to content

Commit

Permalink
chore: build ci matrix strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Jul 7, 2023
1 parent 2f11e94 commit e3fac8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
8 changes: 0 additions & 8 deletions .createapi.yml

This file was deleted.

10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ concurrency:
jobs:
library:
runs-on: macos-latest
strategy:
matrix:
platform:
- iOS Simulator,name=iPhone 14 Pro Max
- macOS
- tvOS Simulator,name=Apple TV
- watchOS Simulator,name=Apple Watch Series 7 (45mm)

steps:
- uses: actions/checkout@v3
- name: Run tests
run: make test-library
run: PLATFORM=${{ matrix.platform }} make test-library

example:
runs-on: macos-latest
Expand Down
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
PLATFORM_IOS = iOS Simulator,name=iPhone 14 Pro Max
PLATFORM_MACOS = macOS
PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst
PLATFORM_TVOS = tvOS Simulator,name=Apple TV
PLATFORM_WATCHOS = watchOS Simulator,name=Apple Watch Series 7 (45mm)
PLATFORM ?= iOS Simulator,name=iPhone 14 Pro Max

test-library:
for platform in "$(PLATFORM_IOS)" "$(PLATFORM_MACOS)" "$(PLATFORM_TVOS)" "$(PLATFORM_WATCHOS)"; do \
xcodebuild test \
xcodebuild test \
-workspace GoTrue.xcworkspace \
-scheme GoTrue \
-destination platform="$$platform" || exit 1; \
done;
-destination platform="$(PLATFORM)" || exit 1;

build-example:
xcodebuild build \
-workspace GoTrue.xcworkspace \
-scheme Examples \
-destination platform="$(PLATFORM_IOS)" || exit 1;
-destination platform="$(PLATFORM)" || exit 1;

format:
@swiftformat .
Expand Down

0 comments on commit e3fac8e

Please sign in to comment.