-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (68 loc) · 1.88 KB
/
ci.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
branches:
- 'main'
# Run only one workflow per PR or commit
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
# Disable default permissions for all jobs
permissions: { }
env:
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
test-dotnet:
permissions:
contents: read # to fetch code (actions/checkout)
name: Run C# tests
runs-on: ${{ matrix.runner.agent }}
strategy:
matrix:
runner: [
{ agent: ubuntu-latest },
]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.100-preview.2.23157.25'
- name: Run C# tests
working-directory: src
run: |
dotnet test -l "console;verbosity=normal" --blame --blame-hang-timeout=30s
build-dotnet:
permissions:
contents: read # to fetch code (actions/checkout)
name: Build C# nugets
runs-on: windows-latest
needs: test-dotnet
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Copy LICENSE to src
run: |
cp LICENSE src/LICENSE
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.100-preview.2.23157.25'
- name: Build nugets
working-directory: src/builds/csharp/nuget
run: |
python3 build_nugets.py
- name: Upload nugets
uses: actions/upload-artifact@v3
with:
name: windows-x64-nugets
path: |
src/builds/csharp/nuget/build-result/*.nupkg
if-no-files-found: error