Skip to content

Commit

Permalink
Add watchOS compilation to GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lunij committed Feb 9, 2023
1 parent fb41383 commit ef2d42d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/BuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ jobs:
run: make build_for_testing_ios
- name: Test for iOS
run: make test_without_building_ios
- name: Build for watchOS
run: make build_for_testing_watchos
- name: Test for watchOS
run: make test_without_building_watchos
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ XCODEBUILD_OPTIONS_IOS=\
-scheme $(PROJECT_NAME) \
-workspace .

XCODEBUILD_OPTIONS_WATCHOS=\
-configuration Debug \
-destination platform='watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest' \
-scheme $(PROJECT_NAME) \
-workspace .

.PHONY: setup_brew
setup_brew:
brew update && brew install xcbeautify
Expand All @@ -18,10 +24,18 @@ build_ios:
build_for_testing_ios:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) build-for-testing | xcbeautify

.PHONY: build_for_testing_watchos
build_for_testing_watchos:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_WATCHOS) build-for-testing | xcbeautify

.PHONY: test_ios
test_ios:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) test | xcbeautify

.PHONY: test_without_building_ios
test_without_building_ios:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) test-without-building | xcbeautify

.PHONY: test_without_building_watchos
test_without_building_watchos:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_WATCHOS) test-without-building | xcbeautify

0 comments on commit ef2d42d

Please sign in to comment.