Commit a4f0cf5
authored
workflows: use dynamic core count (#566)
Improve parallelism in CI by dynamically determining the core count
with `getconf`. This replaces hardcoded job limits and allows the
builds to adapt to the runner size. Additionally, switch to calling
ctest directly, which is simpler.
- Add a "Set NUM_CORES" step in the CMake job using `getconf` and
print the detected core count to the workflow output.
- Use `${{ env.NUM_CORES }}` for CMake build parallelism.
- Run tests using `ctest --parallel ${{ env.NUM_CORES }}` directly
instead of `cmake --build . --target=test`.
- Remove explicit job counts from Bazel, allowing it to use its
native auto-detection.1 parent d55a2d6 commit a4f0cf5
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
51 | | - | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
0 commit comments