-
-
Notifications
You must be signed in to change notification settings - Fork 43
148 lines (115 loc) · 3.75 KB
/
build.yml
File metadata and controls
148 lines (115 loc) · 3.75 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Build
on:
pull_request:
branches:
- main
- 'release/*'
push:
branches:
- main
- 'release/*'
jobs:
build:
name: Test & Coverage
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
DOTNET_ROLL_FORWARD: Major
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install msquic
run: |
sudo apt-get update
sudo apt-get install -y libmsquic
- name: Download .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0
- name: Restore tools
run: dotnet tool restore
- name: Begin scan
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
run: dotnet sonarscanner begin /k:"GenHTTP" /d:sonar.token="$SONAR_TOKEN" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*,**/Playground/**/*,**/*.css,**/*.js,**/*.html" /o:"kaliumhexacyanoferrat" /k:"GenHTTP" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.branch.name="${GITHUB_REF##*/}" /d:sonar.dotnet.excludeTestProjects=true
- name: Build project
run: dotnet build GenHTTP.slnx -c Release
- name: Test project
run: dotnet test GenHTTP.slnx --no-build --collect:"XPlat Code Coverage" -c Release -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: End scan
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
run: dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"
verify:
name: ${{ matrix.os.name }} ${{ matrix.arch }}
needs: build
runs-on: ${{ matrix.os.runs-on }}
env:
TEST_ENGINE: Internal
strategy:
fail-fast: false
matrix:
include:
- os:
name: 🐧
runs-on: ubuntu-latest
arch: x64
runtime: linux-x64
platform: linux/amd64
- os:
name: 🐧
runs-on: linux-arm32
arch: arm32
runtime: linux-arm
platform: linux/arm/v7
- os:
name: 🐧
runs-on: ubuntu-22.04-arm
arch: arm64
runtime: linux-arm64
platform: linux/arm64/v8
- os:
name: 🪟
runs-on: windows-latest
arch: x64
runtime: win-x64
platform: windows/amd64
- os:
name: 🪟
runs-on: windows-latest
arch: arm64
runtime: win-arm64
platform: windows/arm64
- os:
name: 🍎
runs-on: macos-26-intel
arch: x64
runtime: osx-x64
platform: macos/amd64
- os:
name: 🍎
runs-on: macos-26
arch: arm64
runtime: osx-arm64
platform: macos/arm64
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Harden macOS x64 environment
if: matrix.os.runs-on == 'macos-26-intel'
run: |
sudo rm -rf /opt/homebrew || true
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
export DYLD_LIBRARY_PATH=""
export DYLD_FALLBACK_LIBRARY_PATH=""
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
if: matrix.os.runs-on != 'linux-arm32'
with:
dotnet-version: |
8.0
9.0
10.0
- name: Build & Test (${{ matrix.runtime }})
run: dotnet test Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj -c Release --logger "console;verbosity=detailed"