Skip to content

build: add GitHub Actions CI workflows - #113

Open
icosta-sifive wants to merge 2 commits into
riscv-software-src:mainfrom
icosta-sifive:dev/icosta/github_actions
Open

icosta-sifive wants to merge 2 commits into
riscv-software-src:mainfrom
icosta-sifive:dev/icosta/github_actions

Conversation

@icosta-sifive

@icosta-sifive icosta-sifive commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add unit.yml: runs make check on ubuntu-24.04 and macos-15 on push/PR to main.
    Runners are pinned (not *-latest) to avoid silent breakage when GitHub shifts a runner OS.
  • Add pr-checks.yml: three PR-only jobs:
    • checkpatch — runs checkpatch.pl --no-tree over all non-merge commits; covers DCO
      (Signed-off-by presence/correctness) and kernel-style code hygiene. Replaces a hand-rolled
      grep-based DCO check. FILE_PATH_CHANGES is suppressed (kernel MAINTAINERS convention,
      not applicable here).
    • commit-format — validates that commit subjects start with one of the project's required
      prefixes: lib: include: test: docs: debian: build:. checkpatch.pl has no
      concept of project-specific prefixes so this check is kept separate.
    • docs — runs make docs only when docs/** or include/** files change, gated via
      dorny/paths-filter.
  • Add htmldocs Makefile target: runs doxygen without the LaTeX/PDF step. The existing docs
    target depends on htmldocs so the full PDF build is preserved for local use. CI uses
    htmldocs to avoid requiring pdflatex on the runner.

Notes

  • The project uses Linux kernel commit style, not Conventional Commits — off-the-shelf
    commitlint would reject valid commits, hence the custom prefix check.
  • checkpatch.pl is downloaded fresh from torvalds/linux at CI runtime (no vendored copy).

Test plan

  • Push a commit missing Signed-off-by: — checkpatch job should fail
image
  • Push a commit with a subject that lacks a required prefix — commit-format job should fail
image
  • Push a docs change — docs job should run and pass
image
  • Push a non-docs change — docs job should be skipped
image
  • All jobs green on a well-formed PR
image

@icosta-sifive icosta-sifive changed the title build: add github action build: add GitHub Actions CI workflows Aug 18, 2026
@icosta-sifive
icosta-sifive force-pushed the dev/icosta/github_actions branch from 88e238b to 442cc6f Compare August 18, 2026 14:00
Add CI workflow for unit testing anf PR checks. Unit tests run on
Ubuntu-24.04 and macos-15. PR checks validate commit format, DCO
sign-0ff, and code style via checkpatch.pl, and builds dosc when
docs/** or include/** files change.

Signed-off-by: Ivo Costa <ivo.costa@sifive.com>
Add htmldocs target that runs doxygen without the LaTeX/PDF step.
Make docs depend on htmldocs so the full PDF build is preserved for
local use while CI can use htmldocs to avoid requiring pdflatex.

Signed-off-by: Ivo Costa <ivo.costa@sifive.com>
@icosta-sifive
icosta-sifive force-pushed the dev/icosta/github_actions branch from 442cc6f to f422a56 Compare August 18, 2026 14:21
@icosta-sifive
icosta-sifive marked this pull request as ready for review August 19, 2026 08:24
@icosta-sifive

Copy link
Copy Markdown
Contributor Author

@pathakraul in order to make this work, some settings need to be done on the repo:

  1. Go to https://github.com/icosta-sifive/librpmi/settings/branches
  2. Click Add branch protection rule
  3. Branch name pattern: main
  4. Check Require status checks to pass before merging
  5. Search for and add the job names:
  • unit-test
  • checkpatch
  • commit-format
  • docs
  1. Optionally check Require branches to be up to date before merging
  2. Click Save changes

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