forked from x64-dev/GenLauncher_GO
-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (69 loc) · 2.95 KB
/
Copy pathci.yml
File metadata and controls
84 lines (69 loc) · 2.95 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
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
# Normalizes source paths in the produced assemblies, which is what makes the
# Deterministic setting in Directory.Build.props reproducible off this machine.
ContinuousIntegrationBuild: true
jobs:
build-and-test:
name: Build, test, and verify coverage
runs-on: windows-2025
timeout-minutes: 20
env:
GENLAUNCHERGO_REQUIRE_SYMBOLIC_LINK_TESTS: true
steps:
- name: Check out repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Set up .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
with:
global-json-file: global.json
- name: Restore
run: dotnet restore .\GenLauncherGO.sln
# Style, naming, and code quality rules are `error` in .editorconfig and
# run through EnforceCodeStyleInBuild, so the build itself is the primary
# gate.
- name: Build
run: dotnet build .\GenLauncherGO.sln --configuration Release --no-restore
# Runs the whitespace, style, and analyzer formatters. Not redundant with
# the build: whitespace and end-of-line violations are reported here only,
# as are style fixers that have no build-time implementation. Configuration
# independent, so once is enough.
- name: Verify formatting
run: dotnet format .\GenLauncherGO.sln --verify-no-changes --no-restore
- name: Test with coverage backstop
run: dotnet msbuild .\eng\coverage.proj -target:Coverage -property:Configuration=Release -property:SkipCoverageBuild=true
publish-smoke-test:
name: Publish smoke test
runs-on: windows-2025
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Set up .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
with:
global-json-file: global.json
- name: Publish supported single-file executable
shell: pwsh
run: |
$publishDirectory = Join-Path $env:RUNNER_TEMP "GenLauncherGO-publish"
dotnet publish .\GenLauncherGO.UI\GenLauncherGO.UI.csproj -p:PublishProfile=WinX64SelfContained --output $publishDirectory
$launcherPath = Join-Path $publishDirectory "GenLauncherGO.exe"
if (-not (Test-Path -LiteralPath $launcherPath -PathType Leaf)) {
throw "Expected the supported launcher executable at $launcherPath."
}
$looseLibraries = @(Get-ChildItem -LiteralPath $publishDirectory -Filter "*.dll" -File -Recurse)
if ($looseLibraries.Count -ne 0) {
throw "The supported single-file publish unexpectedly produced loose DLL files."
}