Repository navigation
Upgrade to SDL 3.4.18 #76
Workflow file for this run
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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zig-version: [0.16.0, 0.17.0, master] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: ${{ matrix.zig-version == 'master' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: ${{ matrix.zig-version }} | |
| - name: Workaround Zig 0.16.0 ZIP unpack failure | |
| # https://codeberg.org/ziglang/zig/issues/31964 | |
| shell: bash | |
| run: mkdir -p "${ZIG_GLOBAL_CACHE_DIR}/tmp" | |
| - name: Check Formatting | |
| if: runner.os != 'Windows' # zig fmt failing on Windows CI, unclear why | |
| run: zig fmt --ast-check --check . | |
| - name: Build for Windows | |
| # See issue #40 | |
| if: matrix.zig-version != 'master' | |
| run: zig build example -Dtarget=x86_64-windows-gnu --summary all | |
| - name: Build for Linux | |
| run: zig build example -Dtarget=x86_64-linux-gnu --summary all | |
| - name: Build for macOS | |
| if: runner.os == 'macOS' | |
| # We don't support cross compiling for macOS, so don't set a target just build | |
| # the native target | |
| run: zig build example --summary all | |
| - name: Build for iOS | |
| if: runner.os == 'macOS' | |
| # The iOS SDK is not bundled with Zig, so point the build at Xcode's iPhoneOS SDK. | |
| run: | | |
| SDK="$(xcrun --sdk iphoneos --show-sdk-path)" | |
| zig build -Dtarget=aarch64-ios -Dinclude_path="$SDK/usr/include" -Dframework_path="$SDK/System/Library/Frameworks" --summary all |