Skip to content

Commit

Permalink
Added -fprofile-instr-generate to fix watchos build (#642)
Browse files Browse the repository at this point in the history
* Added -fprofile-instr-generate to fix watchos build

* Update BuildAndTest.yml

updated runner to macos-15

* Update Makefile

specified os versions to avoid destination ambiguity
  • Loading branch information
bryce-b authored Nov 21, 2024
1 parent 6570e78 commit 76b833c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/BuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]

jobs:
macOS:
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- name: Build and Test for macOS
Expand All @@ -16,7 +16,7 @@ jobs:
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
iOS:
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- name: Install Homebrew kegs
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Test for iOS
run: make test-without-building-ios
tvOS:
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- name: Install Homebrew kegs
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Test for tvOS
run: make test-without-building-tvos
watchOS:
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- name: Install Homebrew kegs
Expand All @@ -53,4 +53,4 @@ jobs:
- name: Build tests for Linux
run: swift build --build-tests
- name: Run tests for Linux
run: swift test
run: swift test
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PROJECT_NAME="opentelemetry-swift-Package"

XCODEBUILD_OPTIONS_IOS=\
-configuration Debug \
-destination platform='iOS Simulator,name=iPhone 15,OS=latest' \
-destination platform='iOS Simulator,name=iPhone 16,OS=18.2' \
-scheme $(PROJECT_NAME) \
-test-iterations 5 \
-retry-tests-on-failure \
Expand All @@ -18,7 +18,7 @@ XCODEBUILD_OPTIONS_TVOS=\

XCODEBUILD_OPTIONS_WATCHOS=\
-configuration Debug \
-destination platform='watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest' \
-destination platform='watchOS Simulator,name=Apple Watch Series 10 (46mm),OS=11.2' \
-scheme $(PROJECT_NAME) \
-test-iterations 5 \
-retry-tests-on-failure \
Expand Down Expand Up @@ -50,7 +50,7 @@ build-for-testing-tvos:

.PHONY: build-for-testing-watchos
build-for-testing-watchos:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS_WATCHOS) build-for-testing | xcbeautify
set -o pipefail && xcodebuild OTHER_LDFLAGS="$(OTHER_LDFLAGS) -fprofile-instr-generate" $(XCODEBUILD_OPTIONS_WATCHOS) build-for-testing | xcbeautify

.PHONY: test-ios
test-ios:
Expand Down

0 comments on commit 76b833c

Please sign in to comment.