Skip to content

Commit a6a581b

Browse files
committed
Test iOS implementation on CI
1 parent 2d618fa commit a6a581b

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/BuildAndTest.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ jobs:
1717
chmod +x codecov
1818
xcrun llvm-cov export -ignore-filename-regex="pb\.swift|grpc\.swift" -format="lcov" .build/debug/opentelemetry-swiftPackageTests.xctest/Contents/MacOS/opentelemetry-swiftPackageTests -instr-profile .build/debug/codecov/default.profdata > .build/debug/codecov/coverage_report.lcov
1919
./codecov -f .build/debug/codecov/coverage_report.lcov
20+
- name: Install Homebrew kegs
21+
run: make setup_brew
22+
- name: Build for iOS
23+
run: make build_for_testing_ios
24+
- name: Test for iOS
25+
run: make test_without_building_ios

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
PROJECT_NAME="opentelemetry-swift-Package"
2+
3+
XCODEBUILD_OPTIONS_IOS=\
4+
-configuration Debug \
5+
-destination platform='iOS Simulator,name=iPhone 14,OS=latest' \
6+
-scheme $(PROJECT_NAME) \
7+
-workspace .
8+
9+
.PHONY: setup_brew
10+
setup_brew:
11+
brew update && brew install xcbeautify
12+
13+
.PHONY: build_ios
14+
build_ios:
15+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) build | xcbeautify
16+
17+
.PHONY: build_for_testing_ios
18+
build_for_testing_ios:
19+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) build-for-testing | xcbeautify
20+
21+
.PHONY: test_ios
22+
test_ios:
23+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) test | xcbeautify
24+
25+
.PHONY: test_without_building_ios
26+
test_without_building_ios:
27+
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) test-without-building | xcbeautify

0 commit comments

Comments
 (0)