File tree Expand file tree Collapse file tree 2 files changed +40
-41
lines changed Expand file tree Collapse file tree 2 files changed +40
-41
lines changed Original file line number Diff line number Diff line change 1+ name : Native AOT Docker
2+ description : Builds a minimal Native AOT app and runs it in a Docker container.
3+ runs :
4+ using : composite
5+ steps :
6+ - name : Setup Local Source
7+ shell : bash
8+ run : |
9+ mkdir /tmp/local-packages
10+ cp ${{github.workspace}}/src/Sentry/bin/Release/Sentry.*.nupkg /tmp/local-packages/
11+ dotnet nuget add source /tmp/local-packages --name local-packages
12+ dotnet nuget list source
13+
14+ - name : Setup Project
15+ shell : bash
16+ run : |
17+ dotnet --version
18+ dotnet new console --aot
19+ dotnet add package Sentry --prerelease --source /tmp/local-packages
20+ cat > Program.cs <<'EOF'
21+ SentrySdk.Init(options =>
22+ {
23+ options.Dsn = "https://[email protected] /42"; 24+ options.Debug = true;
25+ });
26+ Console.WriteLine("Hello, Sentry!");
27+ EOF
28+ working-directory : /tmp/hello-sentry
29+
30+ - name : Publish Project
31+ shell : bash
32+ run : dotnet publish -p:EnableSdkContainerSupport=true -t:PublishContainer
33+ working-directory : /tmp/hello-sentry
34+
35+ - name : Run Container
36+ shell : bash
37+ run : docker run hello-sentry
Original file line number Diff line number Diff line change @@ -218,48 +218,10 @@ jobs:
218218 with :
219219 path : integration-test
220220
221- native-aot-docker :
222- needs : build
223- name : Native AOT in Docker
224- runs-on : ubuntu-22.04
225-
226- steps :
227- - uses : actions/setup-dotnet@v4
228- with :
229- dotnet-version : 9.0
230-
231- - name : Fetch NuGet Packages
232- uses : actions/download-artifact@v4
233- with :
234- name : ${{ github.sha }}
235- path : src
221+ - name : Test Native AOT in Docker
222+ if : ${{ runner.os == 'Linux' && !matrix.container }}
223+ uses : ./.github/actions/nativeaotdocker
236224
237- - name : Setup Local Source
238- run : |
239- mkdir local-packages
240- cp src/Sentry/bin/Release/Sentry.*.nupkg local-packages/
241- dotnet nuget add source $PWD/local-packages --name local-packages
242- dotnet nuget list source
243-
244- - name : Setup Project
245- run : |
246- dotnet new console --aot -n hello-sentry
247- dotnet add package Sentry --prerelease --source ./local-packages
248- cat > Program.cs <<'EOF'
249- SentrySdk.Init(options =>
250- {
251- options.Dsn = "https://[email protected] /42"; 252- options.Debug = true;
253- });
254- Console.WriteLine("Hello, Sentry!");
255- EOF
256-
257- - name : Publish Project
258- run : dotnet publish -p:EnableSdkContainerSupport=true -t:PublishContainer
259-
260- - name : Run Container
261- run : docker run hello-sentry
262-
263225 trim-analysis :
264226 needs : build-sentry-native
265227 name : Trim analysis
You can’t perform that action at this time.
0 commit comments