zba/.github/workflows/main.yml

43 lines
1.1 KiB
YAML
Raw Normal View History

on: [push, workflow_dispatch]
2022-10-31 09:42:43 +00:00
jobs:
build:
strategy:
matrix:
2022-10-31 10:36:47 +00:00
os: [ubuntu-latest, windows-latest, macos-latest]
2022-10-31 09:42:43 +00:00
runs-on: ${{matrix.os}}
steps:
- uses: goto-bus-stop/setup-zig@v1
2022-10-31 10:01:18 +00:00
with:
version: master
2022-10-31 09:42:43 +00:00
- 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
2022-10-31 10:39:54 +00:00
git config --global core.autocrlf false
2022-10-31 10:36:47 +00:00
- name: prepare-macos
if: runner.os == 'macOS'
run: |
brew install sdl2
2022-10-31 10:39:54 +00:00
- uses: actions/checkout@v2
with:
submodules: true
2022-10-31 09:42:43 +00:00
- name: build
run: zig build -Drelease-safe
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2022-10-31 10:01:18 +00:00
with:
submodules: true
2022-10-31 09:42:43 +00:00
- uses: goto-bus-stop/setup-zig@v1
2022-10-31 10:01:18 +00:00
with:
version: master
2022-10-31 09:42:43 +00:00
- run: zig fmt src/**/*.zig