Skip to content

Commit

Permalink
ci: check-c: run all checks in parallel mode
Browse files Browse the repository at this point in the history
This considerably speeds up the execution of the relevant steps, most
noticeably on scan-build:

* scan-build:  121s to 55s (-54.5%)
* cppcheck:     51s to 30s (-41.2%)
* cppcheck-old: 21s to 11s (-47.6%)

Note: The above uses the average time of 3 runs on master (commit
bd946e3 ("Merge pull request netblue30#6624 from
powerjungle/chore/update-security-md", 2025-01-21)) [1] [2] [3] and 3
runs on this branch[4] [5] [6].

Note: This considers only the steps themselves, as the total time of
each job varies a lot between runs, mostly due to the apt-get
update/install steps.  For example, the same `apt-get install` command
took 3 seconds on [7] and 132 seconds on [8].

Related commits:

* 500d8f2 ("ci: run make in parallel where applicable", 2023-08-14) /
  PR netblue30#5960
* 5b1bd33 ("build: use full paths on compile/link targets",
  2023-07-02) /
  PR netblue30#6158

[1] https://github.com/netblue30/firejail/actions/runs/12928036246
[2] https://github.com/netblue30/firejail/actions/runs/12928180264
[3] https://github.com/netblue30/firejail/actions/runs/12928238010
[4] https://github.com/netblue30/firejail/actions/runs/12927984482/attempts/2
[5] https://github.com/netblue30/firejail/actions/runs/12927984482/attempts/3
[6] https://github.com/netblue30/firejail/actions/runs/12927984482/attempts/4
[7] https://github.com/netblue30/firejail/actions/runs/12928180264/job/36054893393
[8] https://github.com/netblue30/firejail/actions/runs/12881736117/job/35912783635
  • Loading branch information
kmk3 committed Jan 23, 2025
1 parent bd946e3 commit fff7865
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
--enable-apparmor --enable-selinux
|| (cat config.log; exit 1)
- name: scan-build
run: make scan-build
run: make -j "$(nproc)" scan-build

cppcheck:
runs-on: ubuntu-22.04
Expand All @@ -96,7 +96,7 @@ jobs:
run: sudo apt-get install -qy cppcheck
- name: configure
run: >
./configure CPPCHECK='cppcheck -q'
./configure CPPCHECK="cppcheck -q -j'$(nproc)'"
|| (cat config.log; exit 1)
- run: cppcheck --version
- name: cppcheck
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
run: sudo apt-get install -qy cppcheck
- name: configure
run: >
./configure CPPCHECK='cppcheck -q'
./configure CPPCHECK="cppcheck -q -j'$(nproc)'"
|| (cat config.log; exit 1)
- run: cppcheck --version
- name: cppcheck-old
Expand Down

0 comments on commit fff7865

Please sign in to comment.