zba/.github/workflows/main.yml

42 lines
1.0 KiB
YAML

on: [push, workflow_dispatch]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: goto-bus-stop/setup-zig@v1
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
- name: prepare-macos
if: runner.os == 'macOS'
run: |
brew install sdl2
- name: build
run: zig build -Drelease-safe
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: goto-bus-stop/setup-zig@v1
with:
version: master
- run: zig fmt src/**/*.zig