-
-
Notifications
You must be signed in to change notification settings - Fork 232
42 lines (39 loc) · 1.62 KB
/
Copy pathci.yml
File metadata and controls
42 lines (39 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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
- run: echo "VERSION=$(cat .zigversion)" >> $GITHUB_ENV
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.VERSION }}
- run: sudo apt install glslang-tools
- run: wget -O ./Cubyz-fmt https://github.com/PixelGuys/Cubyz-formatter/releases/download/0.16.0+0/Cubyz-fmt-x86_64-linux
- run: chmod +x ./Cubyz-fmt
- run: |
shopt -s nullglob
for file in *.zon assets/*.zon assets/*/*.zon assets/*/*/*.zon assets/*/*/*/*.zon assets/*/*/*/*/*.zon assets/*/*/*/*/*/*.zon assets/*/*/*/*/*/*/*.zon assets/*/*/*/*/*/*/*/*.zon assets/*/*/*/*/*/*/*/*/*.zon assets/*/*/*/*/*/*/*/*/*/*.zon ; do
zig ast-check $file
done
- run: |
if ./Cubyz-fmt assets/ mods/ src/ *.zig *.zon | grep -q . ; then
git diff --color=always;
exit 1;
fi
- run: wget -O ./Cubyz-linter https://github.com/PixelGuys/Cubyz-linter/releases/download/0.16.0%2B1/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 | xargs -L1 glslangValidator -G100