diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000000..e68ef4d6d5 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,63 @@ +# 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 }})" + 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: >- + 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 }} -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 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)