[PATCH v1 0/1] top-level: Add forgejo sanity checks workflow

Claudio Bantaloukas via Sourceware Forge forge-bot+rdfm@forge-stage.sourceware.org
Wed Apr 22 18:46:43 GMT 2026


Claudio Bantaloukas (rdfm) <rdfm@sourceware.org> requested changes to the code:


> +++ .forgejo/workflows/sanity-checks.yaml
> @@ -0,0 +17,4 @@
> +        with:
> +          fetch-depth: 100
> +
> +      - name: Sanity checks
I would strongly prefer naming the checks specifically, and separately, "Running check_GNU_style.py" and "Running git_check_commit.py".
People should not have to guess what "sanity" means. ;)
A way to make this happen is to split into a 
```
      - name: check_GNU_style.py
        id: gnustyle
        continue-on-error: true
```
step and a 
```
      - name: git_check_commit.py
        id: gitcheckcommit
        continue-on-error: true
        if: ${{ always() }}
```
the if specification should make that step run regardless of the failure in the first step

A neat example of how we could make the result of this job "richer" is here: https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-if/.forgejo/workflows/test.yml
We could output specific values and check for them in a final step that "needs" the previous ones. Needs is the equivalent of a thread join operation apparently: https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-needs/.forgejo/workflows/test.yml

> +++ .forgejo/workflows/sanity-checks.yaml
> @@ -0,0 +17,4 @@
> +        with:
> +          fetch-depth: 100
> +
> +      - name: Sanity checks
I think what you mean is what I had implemented in https://forge.sourceware.org/gcc/gcc-TEST/pulls/71  ?

The problem I had is that because of `"continue-on-error: true"`,  I had to make 2 jobs:
- "testjob" which actually run the check scripts, and has a successful "completejob" step
- "resultjob" which fails if any of the sanity checks failed
I couldn't find how to make "completejob" from "testjob" fail without the additional "resultjob", and I find it counter-intuitive to have green/successful testjob, and a red/failed resultjob

See https://forge.sourceware.org/gcc/gcc-TEST/actions/runs/4



--
https://forge.sourceware.org/gcc/gcc-TEST/pulls/79#issuecomment-2204


More information about the Gcc-patches mailing list