forked from libressl/portable
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 1.93 KB
/
windows.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
# GitHub Actions workflow to run tests on Windows.
name: "Windows"
on:
push: {}
pull_request: {}
schedule:
- cron: "0 0 * * 0" # At 00:00 weekly on Sunday.
concurrency:
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
cancel-in-progress: true
jobs:
test:
name: "${{ matrix.os }}/${{ matrix.arch }} (${{ matrix.generator }}${{ matrix.shared == 'ON' && ', shared' || '' }})"
runs-on: "${{ matrix.os }}"
if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: ["windows-2022", "windows-2019"]
arch: ["ARM64", "x64", "Win32"]
shared: ["ON", "OFF"]
include:
- os: "windows-2022"
generator: "Visual Studio 17 2022"
- os: "windows-2019"
generator: "Visual Studio 16 2019"
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Setup MSYS2"
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
diffutils
gcc
git
patch
perl
- name: "Update"
shell: msys2 {0}
run: ./update.sh
- name: "Configure CMake"
shell: cmd
run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -D BUILD_SHARED_LIBS=${{ matrix.shared }} -D CMAKE_INSTALL_PREFIX=../local
- name: "Build"
shell: cmd
run: cmake --build build --config Release
- name: "Test"
if: matrix.arch != 'ARM64'
shell: cmd
run: ctest --test-dir build -C Release --output-on-failure
- name: "Upload build artifacts"
if: always()
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.os }}-${{ matrix.arch }}${{ matrix.shared == 'ON' && '-shared' || '' }}-build-results"
path: "build"