2022-11-10 15:58:47 +00:00
|
|
|
name: Nightly
|
2022-11-03 11:56:14 +00:00
|
|
|
|
2022-10-31 09:42:43 +00:00
|
|
|
on:
|
|
|
|
push:
|
2022-11-03 11:56:14 +00:00
|
|
|
paths:
|
|
|
|
- "**.zig"
|
2024-02-10 21:08:27 +00:00
|
|
|
- "dl_sdl2.ps1"
|
2022-10-31 09:42:43 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
2022-11-03 11:56:14 +00:00
|
|
|
workflow_dispatch:
|
2022-10-31 09:42:43 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-06-19 17:27:41 +00:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2022-10-31 09:42:43 +00:00
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
steps:
|
2022-11-11 17:25:56 +00:00
|
|
|
- uses: goto-bus-stop/setup-zig@v2
|
2022-10-31 09:42:43 +00:00
|
|
|
with:
|
2024-02-10 21:08:27 +00:00
|
|
|
version: 0.12.0-dev.2063+804cee3b9
|
|
|
|
- run: |
|
|
|
|
git config --global core.autocrlf false
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-10-31 09:42:43 +00:00
|
|
|
- name: prepare-linux
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
2023-03-11 03:28:01 +00:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install libgtk-3-dev libsdl2-dev
|
2022-10-31 09:42:43 +00:00
|
|
|
- name: prepare-windows
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
2024-02-10 21:08:27 +00:00
|
|
|
.\dl_sdl2.ps1
|
2022-10-31 09:42:43 +00:00
|
|
|
- name: prepare-macos
|
|
|
|
if: runner.os == 'macOS'
|
|
|
|
run: |
|
|
|
|
brew install sdl2
|
|
|
|
- name: build
|
2023-02-19 05:52:51 +00:00
|
|
|
run: zig build -Doptimize=ReleaseSafe -Dcpu=baseline
|
2022-10-31 09:42:43 +00:00
|
|
|
- name: upload
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: zba-${{matrix.os}}
|
2024-03-06 23:59:08 +00:00
|
|
|
path: zig-out
|
|
|
|
|
2022-10-31 09:42:43 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-31 11:16:45 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-31 09:42:43 +00:00
|
|
|
with:
|
2023-02-23 23:26:59 +00:00
|
|
|
submodules: recursive
|
2022-11-11 17:25:56 +00:00
|
|
|
- uses: goto-bus-stop/setup-zig@v2
|
2022-10-31 09:42:43 +00:00
|
|
|
with:
|
2024-02-10 21:08:27 +00:00
|
|
|
version: 0.12.0-dev.2063+804cee3b9
|
|
|
|
- run: zig fmt --check {src,lib}/**/*.zig build.zig build.zig.zon
|