diff options
author | Joshua Sing <joshua@hypera.dev> | 2023-12-19 17:21:24 +1100 |
---|---|---|
committer | Joshua Sing <joshua@hypera.dev> | 2023-12-19 17:21:24 +1100 |
commit | 5107617db58ed76566835eaa5bb5ca4a318435f2 (patch) | |
tree | dc62227242e04c628fe15fac81fe1eede26dbb32 | |
parent | 30eff1169eb0cd62cee4ac44dac2eee76bddf7ea (diff) | |
download | portable-5107617db58ed76566835eaa5bb5ca4a318435f2.tar.gz portable-5107617db58ed76566835eaa5bb5ca4a318435f2.tar.bz2 portable-5107617db58ed76566835eaa5bb5ca4a318435f2.zip |
ci: clean up windows workflow
-rw-r--r-- | .github/workflows/windows.yml | 66 | ||||
-rw-r--r-- | .github/workflows/windows_test.yml | 46 |
2 files changed, 66 insertions, 46 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..421ebf3 --- /dev/null +++ b/.github/workflows/windows.yml | |||
@@ -0,0 +1,66 @@ | |||
1 | # GitHub Actions workflow to run tests on Windows. | ||
2 | name: "Windows" | ||
3 | |||
4 | on: | ||
5 | push: {} | ||
6 | pull_request: {} | ||
7 | schedule: | ||
8 | - cron: "0 0 * * 0" # At 00:00 weekly on Sunday. | ||
9 | |||
10 | jobs: | ||
11 | test: | ||
12 | name: "${{ matrix.os }}/${{ matrix.arch }}${{ matrix.generator && ' (' + 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 | autoconf | ||
36 | automake | ||
37 | diffutils | ||
38 | libtool | ||
39 | gcc | ||
40 | git | ||
41 | patch | ||
42 | perl | ||
43 | |||
44 | - name: "Setup" | ||
45 | shell: msys2 {0} | ||
46 | run: ./autogen.sh | ||
47 | |||
48 | - name: "Configure CMake" | ||
49 | shell: cmd | ||
50 | run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=../local | ||
51 | |||
52 | - name: "Build" | ||
53 | shell: cmd | ||
54 | run: cmake --build build --config Release | ||
55 | |||
56 | - name: "Test" | ||
57 | if: matrix.arch != 'ARM64' | ||
58 | shell: cmd | ||
59 | run: ctest --test-dir build -C Release --output-on-failure | ||
60 | |||
61 | - name: "Upload build artifacts" | ||
62 | if: always() | ||
63 | uses: actions/upload-artifact@v4 | ||
64 | with: | ||
65 | name: "${{ matrix.os }}-${{ matrix.arch }}-build-results" | ||
66 | 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 @@ | |||
1 | name: windows_ci | ||
2 | |||
3 | on: [push, pull_request] | ||
4 | |||
5 | jobs: | ||
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 | ||