ci: add GitHub Actions workflow for CI testing#132
Open
rustyrussell wants to merge 6 commits into
Open
Conversation
Runs ccanlint fastcheck (no valgrind) on ubuntu and macos for every push/PR, plus a full valgrind check on master-only pushes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Apple clang doesn't recognise -Wshadow=local, and configurator.c treats any warning output as a compile failure, causing config.h generation to abort. Probe the compiler at parse time and only add the flag when it is accepted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
run_with_timeout() captures both stdout and stderr from the child. The test command is "echo 'input' | program args"; if the program exits without consuming stdin, dash's built-in echo gets EPIPE and writes "echo: I/O error" to stderr, which pollutes the captured output and causes the comparison to fail spuriously. Wrap the echo in a group command with 2>/dev/null so that stderr from the feed side of the pipe is discarded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On macOS ARM64, ucontext (makecontext/swapcontext) does not work, so HAVE_UCONTEXT=0 in config.h. Building generator.c then fails because generator.h fires #error when COROUTINE_AVAILABLE=0. Read config.h at Makefile parse time and add coroutine/generator to EXCLUDE when HAVE_UCONTEXT is not set, so the build and fastcheck skip them gracefully on platforms where ucontext is unavailable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cpuid is x86/x86_64 only; on macOS ARM64 (Apple Silicon) the compiler rejects the x86 cpuid.h with "this header is for x86 only". Probe the compiler's predefined macros at parse time and exclude the cpuid module when neither __x86_64__ nor __i386__ is defined. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
It has several Linux-isms. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs ccanlint fastcheck (no valgrind) on ubuntu and macos for every push/PR, plus a full valgrind check on master-only pushes.