From 5107617db58ed76566835eaa5bb5ca4a318435f2 Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Tue, 19 Dec 2023 17:21:24 +1100 Subject: [PATCH 1/6] ci: clean up windows workflow --- .github/workflows/windows.yml | 66 ++++++++++++++++++++++++++++++ .github/workflows/windows_test.yml | 46 --------------------- 2 files changed, 66 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/windows.yml delete mode 100644 .github/workflows/windows_test.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000000..421ebf358a --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,66 @@ +# 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. + +jobs: + test: + name: "${{ matrix.os }}/${{ matrix.arch }}${{ matrix.generator && ' (' + matrix.generator + ')' || '' }}" + runs-on: "${{ matrix.os }}" + permissions: + contents: read + strategy: + fail-fast: false + matrix: + os: ["windows-2022", "windows-2019"] + arch: ["ARM64", "x64", "Win32"] + 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: >- + autoconf + automake + diffutils + libtool + gcc + git + patch + perl + + - name: "Setup" + shell: msys2 {0} + run: ./autogen.sh + + - name: "Configure CMake" + shell: cmd + run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -DCMAKE_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 }}-build-results" + path: "build" diff --git a/.github/workflows/windows_test.yml b/.github/workflows/windows_test.yml deleted file mode 100644 index bac948e9f8..0000000000 --- a/.github/workflows/windows_test.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: windows_ci - -on: [push, pull_request] - -jobs: - build-native: - strategy: - matrix: - os: [windows-2019, windows-2022] - arch: [Win32, x64, ARM64] - include: - - generator: "Visual Studio 16 2019" - os: windows-2019 - - generator: "Visual Studio 17 2022" - os: windows-2022 - runs-on: ${{ matrix.os }} - continue-on-error: false - name: ${{ matrix.os }} - ${{ matrix.arch }} - steps: - - uses: msys2/setup-msys2@v2 - with: - update: true - install: >- - autoconf - automake - diffutils - libtool - gcc - git - patch - perl - - uses: actions/checkout@main - - shell: msys2 {0} - run: ./autogen.sh - - shell: cmd - run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=../local - - shell: cmd - run: cmake --build build --config Release - - shell: cmd - if: ${{ matrix.arch != 'ARM64' }} - run: ctest --test-dir build -C Release --output-on-failure - - uses: actions/upload-artifact@v3 - if: always() - with: - name: windows-build-results-${{ matrix.os }}-${{ matrix.arch }} - path: build From 7108fb424b509f0b5672396e67805213bd73defb Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Tue, 19 Dec 2023 17:22:13 +1100 Subject: [PATCH 2/6] readme: add windows badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c623fe99bb..77f9a37a8c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Linux Build Status](https://github.com/libressl/portable/actions/workflows/linux.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/linux.yml) [![macOS Build Status](https://github.com/libressl/portable/actions/workflows/macos.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/macos.yml) +[![Windows Build Status](https://github.com/libressl/portable/actions/workflows/windows.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/windows.yml) [![Android Build Status](https://github.com/libressl/portable/actions/workflows/android.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/android.yml) [![Solaris Build Status](https://github.com/libressl/portable/actions/workflows/solaris.yml/badge.svg)](https://github.com/libressl/portable/actions/workflows/solaris.yml) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libressl.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libressl) From dc4ce0d90d8d69a46dc0857b839fcffa4a3a5d3b Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Tue, 19 Dec 2023 17:32:44 +1100 Subject: [PATCH 3/6] ci: fix windows workflow syntax --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 421ebf358a..fa0b9d0cae 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -9,7 +9,7 @@ on: jobs: test: - name: "${{ matrix.os }}/${{ matrix.arch }}${{ matrix.generator && ' (' + matrix.generator + ')' || '' }}" + name: "${{ matrix.os }}/${{ matrix.arch }}${{ matrix.generator && format(' ({0})', matrix.generator) || '' }}" runs-on: "${{ matrix.os }}" permissions: contents: read From 509eb6486f8d5e96eaa6c16e72443bfc5d4e9027 Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Tue, 19 Dec 2023 17:34:10 +1100 Subject: [PATCH 4/6] ci: tidy windows workflow job name --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index fa0b9d0cae..ce6e9ce54b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -9,7 +9,7 @@ on: jobs: test: - name: "${{ matrix.os }}/${{ matrix.arch }}${{ matrix.generator && format(' ({0})', matrix.generator) || '' }}" + name: "${{ matrix.os }}/${{ matrix.arch }} (${{ matrix.generator }})" runs-on: "${{ matrix.os }}" permissions: contents: read From 46d8c871188db5e2b98b1b3072af8b0cc457968a Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Tue, 19 Dec 2023 20:25:54 +1100 Subject: [PATCH 5/6] ci: avoid unnecessary steps in windows workflow --- .github/workflows/windows.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ce6e9ce54b..d581b3edc0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,17 +33,15 @@ jobs: update: true install: >- autoconf - automake diffutils - libtool gcc git patch perl - - name: "Setup" + - name: "Update" shell: msys2 {0} - run: ./autogen.sh + run: ./update.sh - name: "Configure CMake" shell: cmd From 747c270d93f4525b33afbc5874cf1d935884d01a Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Wed, 20 Dec 2023 00:49:46 +1100 Subject: [PATCH 6/6] ci: remove autoconf from msys2 in windows workflow --- .github/workflows/windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d581b3edc0..e68ef4d6d5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -32,7 +32,6 @@ jobs: with: update: true install: >- - autoconf diffutils gcc git