2022-10-31 10:30:43 +00:00
|
|
|
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: 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
|
|
|
- name: prepare-linux
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install libsdl2-dev
|
2022-10-31 10:14:44 +00:00
|
|
|
- name: prepare-windows
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
2022-10-31 10:30:43 +00:00
|
|
|
vcpkg integrate install
|
2022-10-31 10:14:44 +00:00
|
|
|
vcpkg install sdl2:x64-windows
|
2022-10-31 10:36:47 +00:00
|
|
|
- name: prepare-macos
|
|
|
|
if: runner.os == 'macOS'
|
|
|
|
run: |
|
|
|
|
brew install sdl2
|
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
|
|
|
|
|