Add GitHub Actions CI #1
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
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
# Using actions/checkout causes problems with git describe and tags, | |
# we want upstream tags. | |
run: | | |
git clone https://github.com/${{ github.repository }} test | |
cd test | |
git checkout ${{ github.ref_name }} | |
git remote add upstream https://github.com/nakamochi/ndg | |
git fetch upstream | |
git -C . describe --match 'v*.*.*' --tags --abbrev=8 | |
- name: Set up Zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: '0.12.0' | |
- name: Lint | |
run: | | |
cd test | |
./tools/fmt-check.sh | |
- name: Test | |
run: | | |
cd test | |
zig build test | |
- name: Build SDL2 | |
run: | | |
sudo apt-get -y install libsdl2-dev | |
cd test | |
zig build -Ddriver=sdl2 | |
- name: Build X11 | |
run: | | |
cd test | |
zig build -Ddriver=x11 | |
- name: Build Aarch64 | |
run: | | |
cd test | |
zig build -Ddriver=fbev -Dtarget=aarch64-linux-musl -Doptimize=ReleaseSafe -Dstrip | |
sha256sum zig-out/bin/nd zig-out/bin/ngui | |
- name: Playground | |
run: | | |
cd test | |
zig build guiplay btcrpc lndhc |