name: OS Continuous Integration

on:
  workflow_dispatch:
  pull_request:
    branches: [master]

jobs:
  cross:
    name: DragonBox ${{matrix.platform}}
    strategy:
      matrix:
        platform: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.platform }}

    steps:
    - uses: actions/checkout@v4
    - name: Configure
      run: cmake -Ssubproject/test -Bbuild/test -DCMAKE_BUILD_TYPE:STRING=Debug

    - name: Build
      run: cmake --build build/test --config Debug

    - name: Test
      run: |
        cd build/test
        ctest -C Debug --output-on-failure
