mirror of
https://github.com/libressl/portable.git
synced 2026-01-17 21:51:17 +01:00
71 lines
2.1 KiB
YAML
71 lines
2.1 KiB
YAML
# 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-2025"]
|
|
arch: ["ARM64", "x64", "Win32"]
|
|
shared: ["ON", "OFF"]
|
|
include:
|
|
- os: "windows-2022"
|
|
generator: "Visual Studio 17 2022"
|
|
- os: "windows-2025"
|
|
# XXX - use appropriate value
|
|
generator: "Visual Studio 17 2022"
|
|
steps:
|
|
- name: "Checkout repository"
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- name: "Setup MSYS2"
|
|
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
|
|
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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: "${{ matrix.os }}-${{ matrix.arch }}${{ matrix.shared == 'ON' && '-shared' || '' }}-build-results"
|
|
path: "build"
|