-
-
Notifications
You must be signed in to change notification settings - Fork 16
95 lines (94 loc) · 2.55 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
name: CI
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- '*.txt'
pull_request:
branches:
- master
paths-ignore:
- '*.md'
- '*.txt'
schedule:
- cron: "7 0 * * MON"
- cron: "10 6 * * WED"
- cron: "30 12 * * FRI"
jobs:
build_linux:
name: Linux Build & Test
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
WCL_IS_CI_BUILD: 1
BUILD_SECRET_KEY: "${{ secrets.BUILD_SECRET }}"
steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
9.0.x
- uses: actions/checkout@v4
with:
submodules: true
- name: PrepEnv
shell: pwsh
run: ./WikiClientLibrary.Commons/CI/PrepEnv.ps1
- name: Build
shell: pwsh
run: ./WikiClientLibrary.Commons/CI/Build.ps1
- name: CollectArtifacts
shell: pwsh
run: './WikiClientLibrary.Commons/CI/CollectArtifacts -Configuration Release'
- uses: actions/upload-artifact@master
with:
name: BuildArtifacts-Linux-Release
path: ./CollectedArtifacts
- name: Test
shell: pwsh
run: ./WikiClientLibrary.Commons/CI/Test.ps1
build_windows:
if: success()
name: Windows Build & Test
runs-on: windows-latest
timeout-minutes: 30
strategy:
matrix:
config: ["Debug", "Release"]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
WCL_IS_CI_BUILD: 1
BUILD_SECRET_KEY: "${{ secrets.BUILD_SECRET }}"
steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.x
8.0.x
include-prerelease: true
- uses: actions/checkout@v4
with:
submodules: true
- name: PrepEnv
shell: pwsh
run: './WikiClientLibrary.Commons/CI/PrepEnv.ps1'
- name: Build
shell: pwsh
run: './WikiClientLibrary.Commons/CI/Build.ps1 -Configuration ${{ matrix.config }}'
- name: CollectArtifacts
shell: pwsh
run: './WikiClientLibrary.Commons/CI/CollectArtifacts -Configuration ${{ matrix.config }}'
- uses: actions/upload-artifact@master
with:
name: BuildArtifacts-Windows-${{ matrix.config }}
path: ./CollectedArtifacts
- name: Test
shell: pwsh
run: './WikiClientLibrary.Commons/CI/Test.ps1 -Configuration ${{ matrix.config }}'