59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: Nightly
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "**.zig"
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
# os: [ubuntu-latest, windows-latest, macos-latest]
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{matrix.os}}
|
|
steps:
|
|
- uses: goto-bus-stop/setup-zig@v2
|
|
with:
|
|
version: 0.11.0-dev.3395+1e7dcaa3a
|
|
- 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: |
|
|
vcpkg integrate install
|
|
vcpkg install sdl2:x64-windows
|
|
git config --global core.autocrlf false
|
|
- name: prepare-macos
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
brew install sdl2
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: build
|
|
run: zig build -Doptimize=ReleaseSafe -Dcpu=baseline
|
|
- name: upload
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: zba-${{matrix.os}}
|
|
path: zig-out/bin
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- uses: goto-bus-stop/setup-zig@v2
|
|
with:
|
|
version: 0.11.0-dev.3395+1e7dcaa3a
|
|
- run: zig fmt src/**/*.zig
|
|
|