ci(cross-platform): gate on Linux, make macOS/Windows non-blocking #89
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: MPL-2.0 | |
| # Cross-platform CI for Game Server Admin | |
| # Linux gates (build + integration tests). macOS and Windows are | |
| # non-blocking build legs until full cross-platform support lands — | |
| # the FFI is currently POSIX-only (fcntl sockets, posix.getenv). | |
| name: Cross-Platform Build & Test | |
| on: | |
| push: | |
| branches: [main, 'claude/**'] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux is the gating target. macOS/Windows still build for early | |
| # signal but do not gate (continue-on-error) — full cross-platform | |
| # support is deferred to a later effort. | |
| - os: ubuntu-latest | |
| name: Linux | |
| run-integration: true | |
| continue-on-error: false | |
| - os: macos-latest | |
| name: macOS | |
| run-integration: false | |
| continue-on-error: true | |
| - os: windows-latest | |
| name: Windows | |
| run-integration: false | |
| continue-on-error: true | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| # Linux gates; macOS/Windows are non-blocking (see matrix include). | |
| continue-on-error: ${{ matrix.continue-on-error }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Install Zig 0.15.2 | |
| uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1 | |
| with: | |
| version: 0.15.2 | |
| - name: Cache Zig | |
| uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
| with: | |
| path: | | |
| ~/.cache/zig | |
| ~/AppData/Local/zig | |
| key: zig-${{ matrix.os }}-${{ hashFiles('src/interface/ffi/build.zig') }} | |
| - name: Build | |
| working-directory: src/interface/ffi | |
| run: zig build | |
| - name: Unit Tests | |
| working-directory: src/interface/ffi | |
| run: zig build test | |
| - name: Integration Tests (Linux only) | |
| if: matrix.run-integration | |
| working-directory: src/interface/ffi | |
| run: zig build test-integration |