Skip to content

Commit 13194dc

Browse files
committed
Tune the CI builds of protobuf
Build the explicit targets need instead of the default target (usually "all") Add -j CPU count to the builds to build some things in parallel. Make doesn't have a way to say scale to the CPU count, so look up the CPU count and explicitly pass it. The agents on github seem to all be dual core, so this should help a little.
1 parent cf4e074 commit 13194dc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ jobs:
7777
run: |
7878
./autogen.sh
7979
./configure
80-
make -C ./src
81-
make -C ./conformance
80+
NUM_CPUS=$(getconf _NPROCESSORS_ONLN)
81+
make -C ./src -j "${NUM_CPUS}" protoc
82+
make -C ./conformance -j "${NUM_CPUS}" conformance-test-runner
8283
- name: Test plugin
8384
working-directory: main
8485
run: make test-plugin PROTOC=../protobuf/src/protoc

.github/workflows/regular_conformance.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ jobs:
7373
run: |
7474
./autogen.sh
7575
./configure
76-
make -C ./src
77-
make -C ./conformance
76+
NUM_CPUS=$(getconf _NPROCESSORS_ONLN)
77+
make -C ./src -j "${NUM_CPUS}" protoc
78+
make -C ./conformance -j "${NUM_CPUS}" conformance-test-runner
7879
- name: Test conformance
7980
working-directory: main
8081
run: make test-conformance

0 commit comments

Comments
 (0)