Skip to content

Commit 76b833c

Browse files
authored
Added -fprofile-instr-generate to fix watchos build (#642)
* 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
1 parent 6570e78 commit 76b833c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/BuildAndTest.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
macOS:
7-
runs-on: macos-14
7+
runs-on: macos-15
88
steps:
99
- uses: actions/checkout@v2
1010
- name: Build and Test for macOS
@@ -16,7 +16,7 @@ jobs:
1616
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
1717
./codecov -f .build/debug/codecov/coverage_report.lcov
1818
iOS:
19-
runs-on: macos-14
19+
runs-on: macos-15
2020
steps:
2121
- uses: actions/checkout@v2
2222
- name: Install Homebrew kegs
@@ -26,7 +26,7 @@ jobs:
2626
- name: Test for iOS
2727
run: make test-without-building-ios
2828
tvOS:
29-
runs-on: macos-14
29+
runs-on: macos-15
3030
steps:
3131
- uses: actions/checkout@v2
3232
- name: Install Homebrew kegs
@@ -36,7 +36,7 @@ jobs:
3636
- name: Test for tvOS
3737
run: make test-without-building-tvos
3838
watchOS:
39-
runs-on: macos-14
39+
runs-on: macos-15
4040
steps:
4141
- uses: actions/checkout@v2
4242
- name: Install Homebrew kegs
@@ -53,4 +53,4 @@ jobs:
5353
- name: Build tests for Linux
5454
run: swift build --build-tests
5555
- name: Run tests for Linux
56-
run: swift test
56+
run: swift test

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PROJECT_NAME="opentelemetry-swift-Package"
22

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

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

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

5555
.PHONY: test-ios
5656
test-ios:

0 commit comments

Comments
 (0)