Skip to content

Commit

Permalink
Add GitHub Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapsk committed Jul 18, 2024
1 parent 538ecd9 commit f1ab7e9
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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 }}
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ the CI runs code format checks, tests and builds for fbdev+evdev on aarch64
and SDL2. it requires a container image with zig and clang tools such as
clang-format.

there is now support for GitHub Actions, it's described in the
[.github/workflows/ci.yml](.github/workflows/ci.yml) file.

below are description for the original CI setup.

to make a new image and switch the CI to use it, first modify the
[ci-containerfile](tools/ci-containerfile) and produce the image locally:

Expand Down

0 comments on commit f1ab7e9

Please sign in to comment.