-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (80 loc) · 2.19 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI Build
env:
BuildDir: ./bld
ScriptDir: ./scripts
SrcDir: ./src
Product: HawDict
on:
push:
branches:
- main
defaults:
run:
shell: pwsh
jobs:
ci_build_windows:
name: CI Windows Build
runs-on: windows-latest
strategy:
matrix:
target: [Unpacked, Win32, Win64]
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Checkout
uses: actions/checkout@v2
- name: Build ${{ matrix.target }}
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1
- name: Run Tests
run: dotnet test ${{ env.SrcDir }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.Product }}.${{ matrix.target }}
path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.zip
ci_build_linux:
name: CI Linux Build
runs-on: ubuntu-latest
strategy:
matrix:
target: [Linux]
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Checkout
uses: actions/checkout@v2
- name: Build ${{ matrix.target }}
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1
- name: Run Tests
run: dotnet test ${{ env.SrcDir }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.Product }}.${{ matrix.target }}
path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.tar.gz
ci_build_macos:
name: CI MacOS Build
runs-on: macOS-latest
strategy:
matrix:
target: [MacOS]
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Checkout
uses: actions/checkout@v2
- name: Build ${{ matrix.target }}
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1
- name: Run Tests
run: dotnet test ${{ env.SrcDir }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.Product }}.${{ matrix.target }}
path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.tar.gz