Skip to content

Windows CI workflow #19

Windows CI workflow

Windows CI workflow #19

Workflow file for this run

name: C/C++ CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.sys.os }}
strategy:
matrix:
sys:
- { os: ubuntu-latest, shell: bash }
- { os: macos-latest, shell: bash }
- { os: windows-latest, shell: 'msys2 {0}' }
defaults:
run:
shell: ${{ matrix.sys.shell }}
steps:
- uses: actions/checkout@v4
- if: ${{ runner.os == 'Windows' }}
# Based on https://www.msys2.org/docs/ci/
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: git mingw-w64-ucrt-x86_64-gcc make
- name: make
run: make clean && make -j
- name: make check
run: |
# Test output is too verbose, so just show last N lines.
testout="$(make check -j 2>&1)" &&
(printf '[...beginning of test output omitted...]\n' &&
printf '%s\n' "$testout" | tail -n100) ||
(printf '%s\n' "$testout" | tail -n500; exit 1)