-
Notifications
You must be signed in to change notification settings - Fork 43
60 lines (58 loc) · 1.99 KB
/
win-build-test.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
name: Windows build and test
on:
push:
pull_request:
types: [opened, synchronize, reopened]
permissions: write-all
jobs:
test-windows:
strategy:
fail-fast: false
matrix:
os: [windows-latest, windows-2019, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install VC-Redist 2010 and 2012
run: |
Install-Module -Name VcRedist -Force
$VcList = Get-VcList -Export All | Where-Object { $_.Release -eq "2010" -or $_.Release -eq "2012" }
Save-VcRedist -VcList $VcList
Install-VcRedist -VcList $VcList -Silent
- name: Build
uses: ./.github/actions/build-action
- name: Positive outcome badge
if: ${{ matrix.os == 'windows-latest' }}
uses: ./.github/actions/badge-creation
with:
label: "${{ runner.os }} build"
status: "Success"
color: "green"
path: "badges/build-${{ runner.os }}"
- name: Negative outcome badge
if: ${{ failure() && matrix.os == 'windows-latest' }}
uses: ./.github/actions/badge-creation
with:
label: "${{ runner.os }} build"
status: "Failure"
color: "red"
path: "badges/build-${{ runner.os }}"
- name: Run tests
uses: ./.github/actions/test-action
- name: Positive outcome badge
if: ${{ matrix.os == 'windows-latest' }}
uses: ./.github/actions/badge-creation
with:
label: "${{ runner.os }} test"
status: "Success"
color: "green"
path: "badges/test-${{ runner.os }}"
- name: Negative outcome badge
if: ${{ failure() && matrix.os == 'windows-latest' }}
uses: ./.github/actions/badge-creation
with:
label: "${{ runner.os }} test"
status: "Failure"
color: "red"
path: "badges/test-${{ runner.os }}"