Skip to content

Commit

Permalink
Test iOS implementation on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lunij committed Jan 2, 2023
1 parent 2d618fa commit a6a581b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/BuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ jobs:
chmod +x codecov
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
./codecov -f .build/debug/codecov/coverage_report.lcov
- name: Install Homebrew kegs
run: make setup_brew
- name: Build for iOS
run: make build_for_testing_ios
- name: Test for iOS
run: make test_without_building_ios
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PROJECT_NAME="opentelemetry-swift-Package"

XCODEBUILD_OPTIONS_IOS=\
-configuration Debug \
-destination platform='iOS Simulator,name=iPhone 14,OS=latest' \
-scheme $(PROJECT_NAME) \
-workspace .

.PHONY: setup_brew
setup_brew:
brew update && brew install xcbeautify

.PHONY: build_ios
build_ios:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) build | xcbeautify

.PHONY: build_for_testing_ios
build_for_testing_ios:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_IOS) 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

0 comments on commit a6a581b

Please sign in to comment.