-
-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (34 loc) · 1.41 KB
/
Copy pathci.yml
File metadata and controls
41 lines (34 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
# Windows is required: the library is built on Win32 APIs
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Build
run: dotnet build src/RestrictedProcess.sln --configuration Release
# The tests start real processes in the sandbox. They used to be skipped here because every one of
# them failed with "Access is denied": the process was created with CREATE_BREAKAWAY_FROM_JOB, which
# fails outright when the caller is already inside a job object that does not permit breakaway - as
# it is under a CI runner, and under `dotnet test` generally. Nested jobs have been supported since
# Windows 8, so the flag is gone and the job is now attached at creation instead.
#
# The suite runs serially by design (see xunit.runner.json): it measures processor time and memory,
# which parallel execution makes meaningless.
- name: Test
run: dotnet test --solution src/RestrictedProcess.sln --configuration Release
- name: Upload NuGet package artifact
uses: actions/upload-artifact@v7
with:
name: nuget-package
path: src/RestrictedProcess/bin/Release/*.nupkg