Basic CI for testing each merge #37
Workflow file for this run
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: Builds and runs simple window | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash -e {0} | |
jobs: | |
build-linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install zig 0.12 | |
run: | | |
wget https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz | |
tar xf zig-linux-x86_64-0.12.0.tar.xz | |
echo "$GITHUB_WORKSPACE/zig-linux-x86_64-0.12.0" >> $GITHUB_PATH | |
- name: Check zig version | |
run: | | |
[ "$(zig version)" != "0.12.0" ] && exit 1 || exit 0 | |
- name: Clone example project | |
run: git clone https://github.com/pwbh/sdl-window-test.git | |
- name: Fetch modified SDL | |
run: | | |
cd sdl-window-test | |
echo https://github.com/pwbh/SDL/archive/refs/heads/${{ github.ref_name }}.zip | |
zig fetch --save https://github.com/pwbh/SDL/archive/refs/heads/${{ github.ref_name }}.zip | |
- name: Build & Run | |
run: zig build run |