Skip to content

Commit 1089366

Browse files
committed
Update CI to run tests for tvOS
1 parent 334f00a commit 1089366

File tree

2 files changed

+60
-20
lines changed

2 files changed

+60
-20
lines changed

.github/workflows/BuildAndTest.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,28 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v2
2222
- name: Install Homebrew kegs
23-
run: make setup_brew
23+
run: make setup-brew
2424
- name: Build for iOS
25-
run: make build_for_testing_ios
25+
run: make build-for-testing-ios
2626
- name: Test for iOS
27-
run: make test_without_building_ios
27+
run: make test-without-building-ios
28+
tvOS:
29+
runs-on: macOS-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Install Homebrew kegs
33+
run: make setup-brew
34+
- name: Build for tvOS
35+
run: make build-for-testing-tvos
36+
- name: Test for tvOS
37+
run: make test-without-building-tvos
2838
watchOS:
2939
runs-on: macOS-latest
3040
steps:
3141
- uses: actions/checkout@v2
3242
- name: Install Homebrew kegs
33-
run: make setup_brew
43+
run: make setup-brew
3444
- name: Build for watchOS
35-
run: make build_for_testing_watchos
45+
run: make build-for-testing-watchos
3646
- name: Test for watchOS
37-
run: make test_without_building_watchos
47+
run: make test-without-building-watchos

Makefile

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,66 @@ XCODEBUILD_OPTIONS_IOS=\
66
-scheme $(PROJECT_NAME) \
77
-workspace .
88

9+
XCODEBUILD_OPTIONS_TVOS=\
10+
-configuration Debug \
11+
-destination platform='tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest' \
12+
-scheme $(PROJECT_NAME) \
13+
-workspace .
14+
915
XCODEBUILD_OPTIONS_WATCHOS=\
1016
-configuration Debug \
1117
-destination platform='watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest' \
1218
-scheme $(PROJECT_NAME) \
1319
-workspace .
1420

15-
.PHONY: setup_brew
16-
setup_brew:
21+
.PHONY: setup-brew
22+
setup-brew:
1723
brew update && brew install xcbeautify
1824

19-
.PHONY: build_ios
20-
build_ios:
25+
.PHONY: build-ios
26+
build-ios:
2127
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) build | xcbeautify
2228

23-
.PHONY: build_for_testing_ios
24-
build_for_testing_ios:
29+
.PHONY: build-tvos
30+
build-tvos:
31+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_TVOS) build | xcbeautify
32+
33+
.PHONY: build-watchos
34+
build-watchos:
35+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) build | xcbeautify
36+
37+
.PHONY: build-for-testing-ios
38+
build-for-testing-ios:
2539
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) build-for-testing | xcbeautify
2640

27-
.PHONY: build_for_testing_watchos
28-
build_for_testing_watchos:
41+
.PHONY: build-for-testing-tvos
42+
build-for-testing-tvos:
43+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_TVOS) build-for-testing | xcbeautify
44+
45+
.PHONY: build-for-testing-watchos
46+
build-for-testing-watchos:
2947
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_WATCHOS) build-for-testing | xcbeautify
3048

31-
.PHONY: test_ios
32-
test_ios:
49+
.PHONY: test-ios
50+
test-ios:
3351
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) test | xcbeautify
3452

35-
.PHONY: test_without_building_ios
36-
test_without_building_ios:
53+
.PHONY: test-tvos
54+
test-tvos:
55+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_TVOS) test | xcbeautify
56+
57+
.PHONY: test-watchos
58+
test-watchos:
59+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_WATCHOS) test | xcbeautify
60+
61+
.PHONY: test-without-building-ios
62+
test-without-building-ios:
3763
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) test-without-building | xcbeautify
3864

39-
.PHONY: test_without_building_watchos
40-
test_without_building_watchos:
65+
.PHONY: test-without-building-tvos
66+
test-without-building-tvos:
67+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_TVOS) test-without-building | xcbeautify
68+
69+
.PHONY: test-without-building-watchos
70+
test-without-building-watchos:
4171
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_WATCHOS) test-without-building | xcbeautify

0 commit comments

Comments
 (0)