name: Test on: push: paths-ignore: - '**.md' schedule: # Weekly, at 00:30 UTC on Friday (somewhat randomly chosen). - cron: '30 00 * * 5' workflow_dispatch: permissions: {} jobs: lint: name: Linting runs-on: ubuntu-slim permissions: security-events: write steps: - name: Checkout uses: actions/checkout@v7 with: persist-credentials: false - name: Run zizmor uses: zizmorcore/zizmor-action@v0.7.1 test: strategy: # It's much easier to re-run as few jobs as possible: fail-fast: false matrix: platform: - x86 - x64 os: - ubuntu-22.04 - ubuntu-24.04 - ubuntu-26.04 - ubuntu-latest - windows-2022 - windows-2025 - windows-latest runs-on: ${{ matrix.os }} name: | Test: ${{ matrix.os }} / ${{ matrix.platform }} defaults: run: shell: pwsh steps: - name: Checkout uses: actions/checkout@v7 with: persist-credentials: false - name: Clean up PATH uses: egor-tensin/cleanup-path@v5 if: runner.os == 'Windows' - name: Set up MinGW id: setup uses: $/ with: platform: ${{ matrix.platform }} cc: 1 - name: Build threads.exe env: GXX: ${{ steps.setup.outputs.gxx }} run: | & $env:GXX -std=c++14 -o (Join-Path . test threads) (Join-Path . test threads.cpp) - name: Run threads.exe uses: $/.github/actions/run-threads if: runner.os == 'Windows' - name: Check cc/c++ uses: $/.github/actions/check-cc test_windows_versions: strategy: matrix: version: - 8.1.0 - 12.2.0 - 15.2.0 runs-on: windows-latest name: | Version: ${{ matrix.version }} defaults: run: shell: pwsh steps: - name: Checkout uses: actions/checkout@v7 with: persist-credentials: false - name: Clean up PATH uses: egor-tensin/cleanup-path@v5 - name: Set up MinGW id: setup uses: $/ with: version: ${{ matrix.version }} - name: Verify the version uses: $/.github/actions/check-cc with: version: ${{ matrix.version }} - name: Build threads.exe env: GXX: ${{ steps.setup.outputs.gxx }} run: | & $env:GXX -std=c++14 -o (Join-Path . test threads) (Join-Path . test threads.cpp) - name: Run threads.exe uses: $/.github/actions/run-threads release: if: github.ref_type == 'tag' name: Release runs-on: ubuntu-latest needs: - test - test_windows_versions permissions: contents: write steps: - name: Checkout uses: actions/checkout@v7 with: persist-credentials: false - name: Release uses: softprops/action-gh-release@v3