Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added -fprofile-instr-generate to fix watchos build #642

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading