turbo/.github/workflows/main.yml

61 lines
1.4 KiB
YAML
Raw Normal View History

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:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- uses: goto-bus-stop/setup-zig@v2
with:
2024-03-07 00:36:34 +00:00
version: 0.12.0-dev.2063+804cee3b9
- 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-03-07 00:36:34 +00:00
version: 0.12.0-dev.2063+804cee3b9
- run: zig fmt --check {src,lib}/**/*.zig build.zig build.zig.zon