Fix build on zig master #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- '*' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [ x86_64-linux ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Zig | |
uses: goto-bus-stop/setup-zig@v1.3.0 | |
with: | |
version: master | |
- name: Init submodules | |
run: | | |
git submodule init | |
git submodule update | |
- name: Install OS dependencies | |
run: | | |
set -ex | |
sudo apt-get update | |
sudo apt-get install -y libsdl2-dev | |
- name: Build | |
# Need to find a way to specify where to find the correct SDL when cross building | |
# https://github.com/ziglang/zig/issues/17384 | |
# run: zig build -Doptimize=ReleaseSafe -Dtarget=${{ matrix.target }} | |
run: zig build -Doptimize=ReleaseSafe | |
- name: Archive executable | |
uses: actions/upload-artifact@v3 | |
with: | |
name: zpz | |
path: zig-out/bin/* |