Repository navigation
87 lines (72 loc) · 2.21 KB
/
Copy pathci.yml
File metadata and controls
87 lines (72 loc) · 2.21 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
name: CI
on:
push:
branches: [master, main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build and test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up .NET 10
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore CSharp_BatchConvertToCompressedFile.sln
- name: Build
run: dotnet build CSharp_BatchConvertToCompressedFile.sln -c Release --no-restore -warnaserror
- name: Test
run: >
dotnet test CSharp_BatchConvertToCompressedFile.sln -c Release --no-build
--collect:"XPlat Code Coverage"
--results-directory TestResults
--logger "trx;LogFileName=test-results.trx"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}
path: TestResults/
if-no-files-found: ignore
package-smoke:
name: Publish ${{ matrix.rid }}
needs: build-and-test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rid: [win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up .NET 10
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Publish
run: >
dotnet publish BatchConvertToCompressedFile/BatchConvertToCompressedFile.csproj
-c Release -r ${{ matrix.rid }} --self-contained false
-p:PublishSingleFile=true
-p:IncludeNativeLibrariesForSelfExtract=true
-p:DebugType=embedded
-o artifacts/${{ matrix.rid }}
- name: Upload publish output
uses: actions/upload-artifact@v7
with:
name: publish-${{ matrix.rid }}
path: artifacts/${{ matrix.rid }}/
if-no-files-found: error