Skip to content

Commit becaa00

Browse files
Update build
1 parent 31f61d0 commit becaa00

File tree

4 files changed

+11
-34
lines changed

4 files changed

+11
-34
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ jobs:
2323
matrix:
2424
# Using macos-12 because we need Xcode 13.3 or later to build Sentry.Samples.Maui. (macos-latest currently points at macos-11 which uses Xcode 13.2)
2525
os: [ubuntu-latest, windows-latest, macos-12]
26-
include:
27-
- os: ubuntu-latest
28-
slnf: SentryLinux.slnf
29-
- os: windows-latest
30-
slnf: SentryWindows.slnf
31-
- os: macos-12
32-
slnf: SentryMac.slnf
3326

3427
steps:
3528
- name: Checkout
@@ -64,7 +57,9 @@ jobs:
6457
key: ${{ runner.os }}-nuget+workloads2-${{ hashFiles('**/*.*proj', '**/*.props') }}
6558
restore-keys: ${{ runner.os }}-nuget+workloads2
6659

67-
# .NET Android workloads don't support Linux https://github.com/dotnet/sdk/issues/22411
60+
- name: Install .NET Workloads (Ubuntu)
61+
if: startsWith(matrix.os, 'ubuntu')
62+
run: dotnet workload install maui-android
6863
- name: Install .NET Workloads (Windows)
6964
if: startsWith(matrix.os, 'windows')
7065
run: dotnet workload install maui-android maui-windows
@@ -73,26 +68,15 @@ jobs:
7368
run: dotnet workload install maui-android maui-ios maui-maccatalyst
7469

7570
- name: Build
76-
run: dotnet build ${{ matrix.slnf }} -c Release /p:CopyLocalLockFileAssemblies=true
71+
run: dotnet build -c Release /p:CopyLocalLockFileAssemblies=true
7772

7873
- name: Test
79-
run: dotnet test ${{ matrix.slnf }} -c Release --no-build -l GitHubActions -l "trx;LogFileName=${{ matrix.os }}-test-results.trx"
80-
81-
# - name: Create Test Report
82-
# uses: phoenix-actions/test-reporting@4b942144e31c4039ac808d9b29945864b628a574
83-
# # run this step even if previous step failed
84-
# if: success() || failure()
85-
# with:
86-
# name: Unit Test Results (${{ matrix.os }})
87-
# path: '**/*.trx'
88-
# reporter: dotnet-trx
89-
# list-suites: 'failed'
90-
# list-tests: 'failed'
74+
run: dotnet test -c Release --no-build -l GitHubActions -l "trx;LogFileName=${{ matrix.os }}-test-results.trx"
9175

9276
- name: Pack
9377
# Only pack in one build environment. We'll use macOS so we can build for ios/maccatalyst targets
9478
if: startsWith(matrix.os, 'macos')
95-
run: dotnet pack ${{ matrix.slnf }} -c Release --no-build
79+
run: dotnet pack -c Release --no-build
9680

9781
- name: Upload Verify Results
9882
if: failure()

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ jobs:
4242
languages: ${{ matrix.language }}
4343

4444
- name: Build
45-
# TODO: Won't run over code specific to Windows or macOS
46-
# Prob best to use reusable workflows to have the setup shared with build.yml
45+
# TODO: Prob best to use reusable workflows to have the setup shared with build.yml
4746
# https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
48-
run: dotnet build SentryLinux.slnf
47+
run: dotnet build
4948

5049
- name: Perform CodeQL Analysis
5150
uses: github/codeql-action/analyze@v2

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ $ErrorActionPreference = "Stop"
22

33
$testLogger = if ($env:GITHUB_ACTIONS -eq "true") {"GitHubActions;report-warnings=false"} else {"console"}
44

5-
dotnet test SentryWindows.slnf -c Release -l $testLogger `
5+
dotnet test -c Release -l $testLogger `
66
/p:CopyLocalLockFileAssemblies=true
77
if ($LASTEXITCODE -ne 0) { exit 1 }
88

9-
dotnet pack SentryWindows.slnf -c Release --no-build
9+
dotnet pack -c Release --no-build
1010
if ($LASTEXITCODE -ne 0) { exit 1 }

build.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,5 @@ if [ "$GITHUB_ACTIONS" == "true" ]
88
testLogger="console"
99
fi
1010

11-
case "$OSTYPE" in
12-
darwin*) export Filter=SentryMac.slnf ;;
13-
linux*) export Filter=SentryLinux.slnf ;;
14-
*) echo Unsupported $OSTYPE && exit -1 ;;
15-
esac
16-
17-
dotnet test $Filter -c Release -l $testLogger \
11+
dotnet test -c Release -l $testLogger \
1812
/p:CopyLocalLockFileAssemblies=true

0 commit comments

Comments
 (0)