-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (56 loc) · 1.87 KB
/
Copy pathbuild.yml
File metadata and controls
70 lines (56 loc) · 1.87 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
name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
test:
# The Windows only paths - console mode, the hint's screen buffer reads, the
# device tree reader - are guarded at runtime rather than compiled out, so
# the same tests are meant to pass everywhere.
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore
run: dotnet restore SerialTerm.sln
- name: Build
run: dotnet build SerialTerm.sln --configuration Release --no-restore
- name: Test
run: dotnet test SerialTerm.sln --configuration Release --no-build --verbosity normal
publish:
# Proves every target still produces a single file, which is the thing that
# silently broke while the runtime identifier was pinned to win-x64.
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
runtime: [win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Publish ${{ matrix.runtime }}
run: >
dotnet publish SerialTerm/SerialTerm.csproj
--configuration Release
--runtime ${{ matrix.runtime }}
--output publish/${{ matrix.runtime }}
- name: Upload ${{ matrix.runtime }}
uses: actions/upload-artifact@v4
with:
name: SerialTerm-${{ matrix.runtime }}
path: |
publish/${{ matrix.runtime }}/SerialTerm
publish/${{ matrix.runtime }}/SerialTerm.exe
if-no-files-found: error