Skip to content
Open
Changes from 4 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
28 changes: 21 additions & 7 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,23 @@ 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: zig build
- run: zig build -Dtarget=x86_64-windows-gnu
- run: zig build -Dtarget=aarch64-linux-gnu
- run: zig build -Dtarget=aarch64-windows-gnu
- 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'

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 -Dtarget=x86_64-native
- 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.

gnu shouldn't be needed here. It also would be incorrect when we want to extend this for macos.

- run: zig build test
Loading