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

* Format all the zon assets to prepare for running the the format check with our zig fmt * Update ci.yml * Remove zon files from the old formatter * Add a formatting violation to test the CI * Undo the check
35 lines
1.4 KiB
YAML
35 lines
1.4 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@v1
|
|
with:
|
|
version: 0.14.0
|
|
- run: sudo apt install libgl-dev libasound2-dev libx11-dev
|
|
- run: wget -O /opt/hostedtoolcache/zig/0.14.0/x64/lib/std/zig/render.zig https://github.com/PixelGuys/Cubyz-std-lib/releases/download/0.14.0/render.zig
|
|
- run: zig build
|
|
- run: zig build -Dtarget=x86_64-windows-gnu
|
|
- run: zig build format --summary none
|
|
- 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
|