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"
|
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:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
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:
|
|
|
|
version: master
|
|
|
|
- name: prepare-linux
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install 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
|
2022-10-31 11:16:45 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-31 09:42:43 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: build
|
|
|
|
run: zig build -Drelease-safe
|
|
|
|
- name: upload
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: zba-${{matrix.os}}
|
|
|
|
path: zig-out/bin
|
|
|
|
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:
|
|
|
|
submodules: true
|
2022-11-11 17:25:56 +00:00
|
|
|
- uses: goto-bus-stop/setup-zig@v2
|
2022-10-31 09:42:43 +00:00
|
|
|
with:
|
|
|
|
version: master
|
|
|
|
- run: zig fmt src/**/*.zig
|
|
|
|
|