aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2023-12-19 15:07:40 +0100
committerTheo Buehler <tb@openbsd.org>2023-12-19 15:07:40 +0100
commita21a50397a7ae59315c5a5be2c73b1af142712d1 (patch)
tree4bf0ffe14b79e4ef7b14c2aed4c57593cc41c9e1 /.github
parent30eff1169eb0cd62cee4ac44dac2eee76bddf7ea (diff)
parent747c270d93f4525b33afbc5874cf1d935884d01a (diff)
downloadportable-a21a50397a7ae59315c5a5be2c73b1af142712d1.tar.gz
portable-a21a50397a7ae59315c5a5be2c73b1af142712d1.tar.bz2
portable-a21a50397a7ae59315c5a5be2c73b1af142712d1.zip
Land #979
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/windows.yml63
-rw-r--r--.github/workflows/windows_test.yml46
2 files changed, 63 insertions, 46 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644
index 0000000..e68ef4d
--- /dev/null
+++ b/.github/workflows/windows.yml
@@ -0,0 +1,63 @@
1# GitHub Actions workflow to run tests on Windows.
2name: "Windows"
3
4on:
5 push: {}
6 pull_request: {}
7 schedule:
8 - cron: "0 0 * * 0" # At 00:00 weekly on Sunday.
9
10jobs:
11 test:
12 name: "${{ matrix.os }}/${{ matrix.arch }} (${{ matrix.generator }})"
13 runs-on: "${{ matrix.os }}"
14 permissions:
15 contents: read
16 strategy:
17 fail-fast: false
18 matrix:
19 os: ["windows-2022", "windows-2019"]
20 arch: ["ARM64", "x64", "Win32"]
21 include:
22 - os: "windows-2022"
23 generator: "Visual Studio 17 2022"
24 - os: "windows-2019"
25 generator: "Visual Studio 16 2019"
26 steps:
27 - name: "Checkout repository"
28 uses: actions/checkout@v4
29
30 - name: "Setup MSYS2"
31 uses: msys2/setup-msys2@v2
32 with:
33 update: true
34 install: >-
35 diffutils
36 gcc
37 git
38 patch
39 perl
40
41 - name: "Update"
42 shell: msys2 {0}
43 run: ./update.sh
44
45 - name: "Configure CMake"
46 shell: cmd
47 run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=../local
48
49 - name: "Build"
50 shell: cmd
51 run: cmake --build build --config Release
52
53 - name: "Test"
54 if: matrix.arch != 'ARM64'
55 shell: cmd
56 run: ctest --test-dir build -C Release --output-on-failure
57
58 - name: "Upload build artifacts"
59 if: always()
60 uses: actions/upload-artifact@v4
61 with:
62 name: "${{ matrix.os }}-${{ matrix.arch }}-build-results"
63 path: "build"
diff --git a/.github/workflows/windows_test.yml b/.github/workflows/windows_test.yml
deleted file mode 100644
index bac948e..0000000
--- a/.github/workflows/windows_test.yml
+++ /dev/null
@@ -1,46 +0,0 @@
1name: windows_ci
2
3on: [push, pull_request]
4
5jobs:
6 build-native:
7 strategy:
8 matrix:
9 os: [windows-2019, windows-2022]
10 arch: [Win32, x64, ARM64]
11 include:
12 - generator: "Visual Studio 16 2019"
13 os: windows-2019
14 - generator: "Visual Studio 17 2022"
15 os: windows-2022
16 runs-on: ${{ matrix.os }}
17 continue-on-error: false
18 name: ${{ matrix.os }} - ${{ matrix.arch }}
19 steps:
20 - uses: msys2/setup-msys2@v2
21 with:
22 update: true
23 install: >-
24 autoconf
25 automake
26 diffutils
27 libtool
28 gcc
29 git
30 patch
31 perl
32 - uses: actions/checkout@main
33 - shell: msys2 {0}
34 run: ./autogen.sh
35 - shell: cmd
36 run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=../local
37 - shell: cmd
38 run: cmake --build build --config Release
39 - shell: cmd
40 if: ${{ matrix.arch != 'ARM64' }}
41 run: ctest --test-dir build -C Release --output-on-failure
42 - uses: actions/upload-artifact@v3
43 if: always()
44 with:
45 name: windows-build-results-${{ matrix.os }}-${{ matrix.arch }}
46 path: build