Skip to content

chore(ci): add CI workflow and pre-commit; fix header/debug#1

Open
quirinpa wants to merge 5 commits intomainfrom
chore/ci-precommit-ndx
Open

chore(ci): add CI workflow and pre-commit; fix header/debug#1
quirinpa wants to merge 5 commits intomainfrom
chore/ci-precommit-ndx

Conversation

@quirinpa
Copy link
Copy Markdown
Member

Summary

  • Define in .
  • Silence debug print (guarded by ).
  • Add GitHub Actions workflow (build + test).
  • Add lightweight pre-commit hook .

Testing

  • Local build: make: Nothing to be done for 'all'.
  • Local tests: cc -o tests/test_mod.so tests/test_mod.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -fPIC -shared -L/home/quirinpa/ndx/lib -L/usr/lib -lndx-mod
    cc -o tests/mods/mod_basic.so tests/mods/mod_basic.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -fPIC -shared -L/home/quirinpa/ndx/lib -L/usr/lib -lndx-mod
    cc -o tests/mods/mod_multi.so tests/mods/mod_multi.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -fPIC -shared -L/home/quirinpa/ndx/lib -L/usr/lib -lndx-mod
    cc -o tests/mods/mod_void.so tests/mods/mod_void.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -fPIC -shared -L/home/quirinpa/ndx/lib -L/usr/lib -lndx-mod
    cc -o tests/mods/mod_bare.so tests/mods/mod_bare.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -fPIC -shared -L/home/quirinpa/ndx/lib -L/usr/lib -lndx-mod
    cc -o tests/mods/mod_dep.so tests/mods/mod_dep.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -fPIC -shared -L/home/quirinpa/ndx/lib -L/usr/lib -lndx-mod
    cc -o tests/mods/mod_dep_b.so tests/mods/mod_dep_b.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -fPIC -shared -L/home/quirinpa/ndx/lib -L/usr/lib -lndx-mod
    cc -o tests/mods/mod_dep_c.so tests/mods/mod_dep_c.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -fPIC -shared -L/home/quirinpa/ndx/lib -L/usr/lib -lndx-mod
    cc -o tests/test_core tests/test_core.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -L/home/quirinpa/ndx/lib -L/usr/lib -lndx -lqsys -lqmap -pthread
    cc -o tests/test_errors tests/test_errors.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -L/home/quirinpa/ndx/lib -L/usr/lib -lndx -lqsys -lqmap -pthread
    cc -o tests/test_threads tests/test_threads.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -L/home/quirinpa/ndx/lib -L/usr/lib -lndx -lqsys -lqmap -pthread
    cc -o tests/test_macros tests/test_macros.c -I/home/quirinpa/ndx/include -I/usr/include -Wall -Wextra -Wpedantic -Iinclude -pthread
    -L/home/quirinpa/ndx/lib -L/usr/lib -lndx -lqsys -lqmap -pthread
    Running test_core...
    test_core:
    test_adapter_reg_sets_id: PASS
    test_call_no_mods: PASS
    test_strerror: PASS
    test_errno_after_call: PASS
    test_adapter_sizes: PASS
    all tests passed
    Running test_errors...
    test_errors:
    test_load_missing: PASS
    test_call_invalid_id: PASS
    test_last_no_call: PASS
    test_errno_persists: PASS
    all tests passed
    Running test_threads...
    test_threads:
    test_concurrent_load: PASS
    test_concurrent_call: PASS
    test_concurrent_areg: PASS
    test_concurrent_get: PASS
    all tests passed
    Running test_macros...
    test_macros:
    test_multi_args: PASS
    test_struct_return: PASS
    test_arg_counts: PASS
    test_adapter_name: PASS
    all tests passed
    Running test_deps...
    test_deps:
    debug: dep_hook_id(symbol) = 0, ndx_get('dep_hook') = 0
    test_dep_loads_basic: PASS
    test_missing_dep: PASS
    test_cycle_detect: PASS
    all tests passed
    Running test_main...
    ok
    All tests passed!
  • All tests passed locally before creating this PR.

Notes

  • gate available to re-enable diagnostics.
  • Pre-commit currently runs a fast make: Nothing to be done for 'all'. dry-run; we can tighten it later.

@quirinpa quirinpa force-pushed the main branch 2 times, most recently from 1da7e30 to 0a642f9 Compare February 28, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant