Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
branches: [ "master" ]

jobs:
compile:
checks:
runs-on: ubuntu-latest
name: Compilation Check
name: Format & Shader Checks
steps:
- uses: actions/checkout@v3
- run: echo "VERSION=$(cat .zigversion)" >> $GITHUB_ENV
Expand All @@ -34,9 +34,26 @@ jobs:
- run: wget -O ./Cubyz-linter https://github.com/PixelGuys/Cubyz-linter/releases/download/0.16.0+4/Cubyz-linter-x86_64-linux
- run: chmod +x ./Cubyz-linter
- run: ./Cubyz-linter assets/ mods/ src/ *.zon
- run: 'find assets/cubyz/shaders -type f ! -name "*.glsl" | xargs -L1 glslangValidator -G100 -P"#extension GL_GOOGLE_include_directive : enable" -Iassets/cubyz/shaders/include -Dgl_VertexIndex=gl_VertexID -DOPEN_GL'

test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Build & Test (${{ matrix.os }})
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- run: echo "VERSION=$(cat .zigversion)" >> $GITHUB_ENV
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.VERSION }}
- run: zig build
- run: zig build -Dtarget=x86_64-windows-gnu
- run: zig build -Dtarget=aarch64-linux-gnu
- run: zig build -Dtarget=aarch64-windows-gnu
- if: matrix.os == 'ubuntu-latest'
run: zig build -Dtarget=aarch64-linux-gnu
- if: matrix.os == 'windows-latest'
run: zig build -Dtarget=aarch64-windows-gnu

@Wunka Wunka Aug 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you not just use:

Suggested change
- if: matrix.os == 'ubuntu-latest'
run: zig build -Dtarget=aarch64-linux-gnu
- if: matrix.os == 'windows-latest'
run: zig build -Dtarget=aarch64-windows-gnu
run: zig build -Dtarget=aarch64-native-gnu

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's possible we should also change the default one to -Dtarget=x86_64-native

- run: zig build test
- run: 'find assets/cubyz/shaders -type f ! -name "*.glsl" | xargs -L1 glslangValidator -G100 -P"#extension GL_GOOGLE_include_directive : enable" -Iassets/cubyz/shaders/include -Dgl_VertexIndex=gl_VertexID -DOPEN_GL'
Loading