--- name: Windows (MSYS2) on: push: branches: [main] pull_request: branches: [main] merge_group: types: [checks_requested] branches: [main] permissions: contents: read jobs: windows-msys2: runs-on: windows-latest name: CI Windows (${{matrix.sys}}) strategy: fail-fast: false matrix: include: - sys: ucrt64 pkg-prefix: mingw-w64-ucrt-x86_64 env-path: /ucrt64 - sys: mingw64 pkg-prefix: mingw-w64-x86_64 env-path: /mingw64 - sys: clang64 pkg-prefix: mingw-w64-clang-x86_64 env-path: /clang64 asan: ON steps: - uses: actions/checkout@v7 - name: Setup MSYS2 uses: msys2/setup-msys2@v2 with: msystem: ${{matrix.sys}} update: true install: >- ${{matrix.pkg-prefix}}-clang ${{matrix.pkg-prefix}}-cmake ${{matrix.pkg-prefix}}-ninja ${{matrix.pkg-prefix}}-go ${{matrix.pkg-prefix}}-nasm make git diffutils - name: Build AWS-LC shell: msys2 {0} run: | set -eu git clone --depth 1 https://github.com/aws/aws-lc.git aws-lc-src cmake -B aws-lc-build aws-lc-src -GNinja \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=${{matrix.env-path}}/local \ -DBUILD_SHARED_LIBS=OFF \ -DBUILD_TESTING=OFF cmake --build aws-lc-build -j $(nproc) --target install - name: Build libs2n.a and unit tests shell: msys2 {0} run: | set -eu cmake -B build . \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_PREFIX_PATH=${{matrix.env-path}}/local \ -DS2N_ENFORCE_PROPER_LIBCRYPTO_FEATURE_PROBE=ON \ -DBUILD_TESTING=ON \ -DASAN=${{matrix.asan || 'OFF'}} cmake --build ./build -j $(nproc) - name: Run unit tests shell: msys2 {0} run: | set -eu ctest --test-dir build --output-on-failure -j $(nproc)