Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions CI (second attempt) #25

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: '0.12.1'
- name: Lint
run: ./tools/fmt-check.sh
- name: Test
run: zig build test
- name: Build SDL2
run: |
sudo apt-get install -y libsdl2-dev
zig build -Ddriver=sdl2
- name: Build X11
run: zig build -Ddriver=x11
- name: Build Aarch64
run: |
zig build -Ddriver=fbev -Dtarget=aarch64-linux-musl -Doptimize=ReleaseSafe -Dstrip
sha256sum zig-out/bin/nd zig-out/bin/ngui
- name: Playground
run: 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