Calls to SentryTracingBuilder can now be chained correctly #6226
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
pull_request: | |
jobs: | |
build: | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Cancel Previous Runs | |
if: github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') | |
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # Tag: 0.12.0 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Rebuild Solution Filters | |
shell: pwsh | |
run: scripts/generate-solution-filters.ps1 | |
- name: Ensure Solution Filters are up to date | |
shell: pwsh | |
run: scripts/dirty-check.ps1 -PathToCheck ./*.slnf -GuidanceOnFailure "Uncommitted changes to the solution filters detected. Run `scripts/generate-solution-filters.ps1` locally and commit changes." | |
# We use macOS for the final publishing build so we we get all the iOS/macCatalyst targets in the packages | |
- name: Set Environment Variables | |
if: startsWith(matrix.os, 'macos') && startsWith(github.ref_name, 'release/') | |
run: echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV | |
- name: Setup Environment | |
uses: ./.github/actions/environment | |
- name: Build Native Dependencies | |
uses: ./.github/actions/buildnative | |
- name: Build Cocoa SDK | |
if: runner.os == 'macOS' | |
uses: ./.github/actions/buildcocoasdk | |
- name: Restore .NET Dependencies | |
run: dotnet restore Sentry-CI-Build-${{ runner.os }}.slnf --nologo | |
- name: Build (for non-release branch) | |
if: env.CI_PUBLISHING_BUILD != 'true' | |
run: dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo | |
- name: Build (for release branch) | |
if: env.CI_PUBLISHING_BUILD == 'true' | |
run: dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo -p:CopyLocalLockFileAssemblies=true | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
- name: Test | |
run: dotnet test Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-build --nologo -l GitHubActions -l "trx;LogFilePrefix=testresults_${{ runner.os }}" | |
- name: Test symbol upload | |
uses: getsentry/github-workflows/sentry-cli/integration-test/@v2 | |
with: | |
path: test | |
- name: Upload Verify Results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: verify-test-results | |
path: '**/*.received.*' | |
# To save time and disk space, we only create and archive the Nuget packages when we're actually releasing. | |
- name: Create Nuget Packages (release branch only) | |
if: env.CI_PUBLISHING_BUILD == 'true' | |
run: dotnet pack Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-build --nologo | |
- name: Archive Nuget Packages (release branch only) | |
if: env.CI_PUBLISHING_BUILD == 'true' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.sha }} | |
if-no-files-found: error | |
path: | | |
${{ github.workspace }}/src/**/Release/*.nupkg | |
${{ github.workspace }}/src/**/Release/*.snupkg |