2023-08-06 22:13:11 +00:00
|
|
|
name: Nightly
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- "**.zig"
|
2024-03-07 00:36:34 +00:00
|
|
|
- "dl_sdl2.ps1"
|
|
|
|
- "build.zig.zon"
|
2023-08-06 22:13:11 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-09 09:13:16 +00:00
|
|
|
os: [ubuntu-latest, windows-latest] # TODO: Figure out Apple Silicon macOS
|
2023-08-06 22:13:11 +00:00
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
steps:
|
|
|
|
- uses: goto-bus-stop/setup-zig@v2
|
|
|
|
with:
|
2024-09-09 07:42:18 +00:00
|
|
|
version: 0.13.0
|
2024-03-07 00:36:34 +00:00
|
|
|
- run: |
|
|
|
|
git config --global core.autocrlf false
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-08-06 22:13:11 +00:00
|
|
|
- name: prepare-linux
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install libgtk-3-dev libsdl2-dev
|
|
|
|
- name: prepare-windows
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
2024-03-07 00:36:34 +00:00
|
|
|
.\dl_sdl2.ps1
|
2023-08-06 22:13:11 +00:00
|
|
|
- name: prepare-macos
|
|
|
|
if: runner.os == 'macOS'
|
|
|
|
run: |
|
|
|
|
brew install sdl2
|
|
|
|
- name: build
|
|
|
|
run: zig build -Doptimize=ReleaseSafe -Dcpu=baseline
|
|
|
|
- name: upload
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: zba-${{matrix.os}}
|
2024-03-07 00:36:34 +00:00
|
|
|
path: zig-out
|
|
|
|
|
2023-08-06 22:13:11 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- uses: goto-bus-stop/setup-zig@v2
|
|
|
|
with:
|
2024-09-09 07:42:18 +00:00
|
|
|
version: 0.13.0
|
2024-03-07 00:36:34 +00:00
|
|
|
- run: zig fmt --check {src,lib}/**/*.zig build.zig build.zig.zon
|