Skip to content

feat: allow profiling from hybrid SDKs #5572

feat: allow profiling from hybrid SDKs

feat: allow profiling from hybrid SDKs #5572

Workflow file for this run

name: Build
on:
push:
branches:
- main
- release/**
pull_request:
paths:
- 'Sources/**'
- 'test-server/**'
- 'Samples/**'
- '.github/workflows/build.yml'
- 'fastlane/**'
- 'scripts/ci-select-xcode.sh'
- Sentry.xcworkspace
- Sentry.xcodeproj
- Gemfile.lock
- 'Package.swift'
jobs:
# We had issues that the release build was broken on main.
# With this we catch potential issues already in the PR.
ios-swift-release:
name: Release Build of iOS Swift
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh
- name: Run Fastlane
env:
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
run: fastlane build_ios_swift
shell: sh
build-sample:
name: Sample ${{ matrix.scheme }}
runs-on: macos-13
strategy:
fail-fast: false
matrix:
# other sample projects are built in ui-tests
scheme:
- macOS-Swift
- iOS13-Swift
steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh
# Disable code signing. We just want to make sure these compile.
- run: >-
env NSUnbufferedIO=YES
xcodebuild
-workspace Sentry.xcworkspace
-scheme '${{matrix.scheme}}'
-configuration Debug
CODE_SIGNING_ALLOWED="NO"
build
build-watch-os-sample:
name: Sample watchOS
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh 13.4.1
- run: make build-for-watchos
# Disable code signing. We just want to make sure these compile.
- run: >-
env NSUnbufferedIO=YES
xcodebuild
-project Samples/watchOS-Swift/watchOS-Swift.xcodeproj
-configuration Debug
CODE_SIGNING_ALLOWED="NO"
build
build-xcframework:
name: Build XCFramework
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh
- run: make build-xcframework
shell: sh
- name: Archiving XCFramework.zip
uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
if-no-files-found: error
path: |
${{ github.workspace }}/*.zip
- name: Archive build log if failed
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
with:
name: raw-build-output-build-xcframework
path: |
build-xcframework.log
validate-xcframework:
name: Validate XCFramework
runs-on: macos-13
needs: build-xcframework
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: ${{ github.sha }}
- run: ./scripts/ci-select-xcode.sh
- run: make build-xcframework-sample
shell: sh
# Use github.event.pull_request.head.sha instead of github.sha when available as
# the github.sha is be the pre merge commit id for PRs.
# See https://github.community/t/github-sha-isnt-the-value-expected/17903/17906.
validate-spm:
name: Validate Swift Package Manager
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Set SPM revision to current git commit
run: >-
if [[ "${{ github.event.pull_request.head.sha }}" != "" ]]; then
sed -i '' 's/.branch("main")/.revision("${{ github.event.pull_request.head.sha }}")/g' Samples/macOS-SPM-CommandLine/Package.swift
else
sed -i '' 's/.branch("main")/.revision("${{ github.sha }}")/g' Samples/macOS-SPM-CommandLine/Package.swift
fi
shell: bash
- run: swift build
working-directory: Samples/macOS-SPM-CommandLine
shell: sh
validate-spm-dynamic:
name: Validate Swift Package Manager Dynamic
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Set SPM revision to current git commit
run: >-
if [[ "${{ github.event.pull_request.head.sha }}" != "" ]]; then
sed -i '' 's/.branch("main")/.revision("${{ github.event.pull_request.head.sha }}")/g' Samples/SPM-Dynamic/Package.swift
else
sed -i '' 's/.branch("main")/.revision("${{ github.sha }}")/g' Samples/SPM-Dynamic/Package.swift
fi
shell: bash
- run: swift build
working-directory: Samples/SPM-Dynamic
shell: sh
swift-build:
name: Build with Swift
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- run: swift build
shell: sh