Skip to content

Commit

Permalink
wip CI
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Oct 24, 2023
1 parent 75def37 commit ec3d287
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,28 @@ concurrency:

jobs:
library:
strategy:
matrix:
platform:
- iOS Simulator,name=iPhone 14 Pro
- macOS
- macOS,variant=Mac Catalyst
- tvOS Simulator,name=Apple TV
- watchOS Simulator,name=Apple Watch Series 8 (41mm)
runs-on: macos-13
name: Test Library
steps:
- uses: actions/checkout@v3
- name: Select Xcode 14.3
run: sudo xcode-select -s /Applications/Xcode_14.3.app
- name: Run tests
run: make test-library
run: env PLATFORM="${{ matrix.platform }}" make test-library

example:
strategy:
matrix:
platform:
- iOS Simulator,name=iPhone 14 Pro
runs-on: macos-13
name: Build Example
steps:
Expand All @@ -34,4 +46,4 @@ jobs:
- name: Copy Secrets file
run: cp Examples/Examples/_Secrets.swift Examples/Examples/Secrets.swift
- name: Build example
run: make build-example
run: env PLATFORM="${{ matrix.platform }}" make build-example
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
PLATFORM_IOS = iOS Simulator,name=iPhone 15 Pro
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 9 (41mm)
PLATFORM ?= iOS Simulator,name=iPhone 15 Pro

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

build-example:
for example in "Examples" "ProductSample"; do \
xcodebuild build \
-workspace supabase-swift.xcworkspace \
-scheme "$$example" \
-destination platform="$(PLATFORM_IOS)" || exit 1; \
-destination platform="$(PLATFORM)" || exit 1; \
done;

format:
Expand Down

0 comments on commit ec3d287

Please sign in to comment.