mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00

For reference: https://github.com/ziglang/zig/pull/24329 some commits have been extracted from #1583, but the x86_64 backend has been disabled due to its horrible performance. Remaining work: - [x] Wait for official builds on ziglang.org and upload them to our repository - [x] Add workaround for https://github.com/ziglang/zig/pull/24466 - [x] Fix TODO comment about ANSI support in stdout - [x] Check for compile-time performance changes → it went from 13.1 to 11.9 seconds 🎉
38 lines
1.6 KiB
YAML
38 lines
1.6 KiB
YAML
# This is a basic workflow that is manually triggered
|
|
|
|
name: Compilation and Format Check
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
compile:
|
|
runs-on: ubuntu-latest
|
|
name: Compilation Check
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: mlugg/setup-zig@v2
|
|
with:
|
|
version: 0.15.0-dev.1034+bd97b6618
|
|
- run: sudo apt install libgl-dev libasound2-dev libx11-dev glslang-tools
|
|
- run: echo "zigPath=$(command -v zig | sed 's/.\{3\}$//')" >> $GITHUB_ENV
|
|
- run: wget -O $zigPath/lib/std/zig/render.zig https://github.com/PixelGuys/Cubyz-std-lib/releases/download/0.15.0-dev.1034+bd97b6618/render.zig
|
|
- run: zig build
|
|
- run: zig build -Dtarget=x86_64-windows-gnu
|
|
- run: zig build test
|
|
- run: zig build format --summary none
|
|
- run: find assets/cubyz/shaders -type f | xargs -L1 glslangValidator -G100
|
|
- run: |
|
|
if zig build fmt -- *.zig src/*.zig src/*/*.zig src/*/*/*.zig src/*/*/*/*.zig src/*/*/*/*/*.zig src/*/*/*/*/*/*.zig src/*/*/*/*/*/*/*.zig src/*/*/*/*/*/*/*/*.zig src/*/*/*/*/*/*/*/*/*.zig src/*/*/*/*/*/*/*/*/*/*.zig | grep -q . ; then
|
|
git diff --color=always;
|
|
exit 1;
|
|
fi
|
|
- run: |
|
|
if zig build fmt -- --zon *.zon assets/*.zon assets/*/*.zon assets/*/*/*.zon assets/*/*/*/*.zon assets/*/*/*/*/*.zon assets/*/*/*/*/*/*.zon assets/*/*/*/*/*/*/*.zon assets/*/*/*/*/*/*/*/*.zon assets/*/*/*/*/*/*/*/*/*.zon assets/*/*/*/*/*/*/*/*/*/*.zon | grep -q . ; then
|
|
git diff --color=always;
|
|
exit 1;
|
|
fi
|