Skip to content

Commit 0126995

Browse files
authored
Tweak the CI setup some now that protoc is built by SwiftPM (apple#1891)
- Don't override the `PROTOC` value when running tests, let the in tree one be used. - For conformance tests, only build the runner in the protobuf checkout (no need to force a `protoc` build also) - Move the protobuf conformance runner build and the conformance tests to be after all the other steps, might as well let everything else finish first to catch issues before waiting on another protobuf to build. - Turn off the tests on 5.10 that need protoc – `[email protected]` doesn't include the `protoc` target, so skip the tests there that need it.
1 parent 64dae41 commit 0126995

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ jobs:
4848
run: make build ${{ matrix.swift.hook }}
4949
- name: Test runtime
5050
run: make test-runtime ${{ matrix.swift.hook }}
51+
- name: Test plugin
52+
# The protoc build isn't part of [email protected]
53+
if: ${{ matrix.swift.version != '5.10' }}
54+
run: make test-plugin
55+
- name: Test SPM plugin
56+
# The protoc build isn't part of [email protected]
57+
if: ${{ matrix.swift.version != '5.10' }}
58+
run: make test-spm-plugin
59+
- name: Compilation Tests
60+
# The protoc build isn't part of [email protected]
61+
if: ${{ matrix.swift.version != '5.10' }}
62+
run: make compile-tests
5163
- name: Build protobuf
5264
working-directory: Sources/protobuf/protobuf
5365
# https://github.com/protocolbuffers/protobuf/blob/main/cmake/README.md#c-version
@@ -62,15 +74,9 @@ jobs:
6274
-Dprotobuf_BUILD_CONFORMANCE=ON \
6375
-S ..
6476
NUM_CPUS=$(getconf _NPROCESSORS_ONLN)
65-
make -j "${NUM_CPUS}" protoc conformance_test_runner
66-
- name: Test plugin
67-
run: make test-plugin PROTOC=Sources/protobuf/protobuf/cmake_build/protoc
77+
make -j "${NUM_CPUS}" conformance_test_runner
6878
- name: Test conformance
6979
run: make test-conformance CONFORMANCE_TEST_RUNNER=Sources/protobuf/protobuf/cmake_build/conformance_test_runner
70-
- name: Test SPM plugin
71-
run: make test-spm-plugin PROTOC=Sources/protobuf/protobuf/cmake_build/protoc
72-
- name: Compilation Tests
73-
run: make compile-tests PROTOC=Sources/protobuf/protobuf/cmake_build/protoc
7480

7581
api-breakage:
7682
name: Api Breakage Compared to main branch
@@ -139,7 +145,7 @@ jobs:
139145
- uses: actions/checkout@v4
140146
with:
141147
submodules: true
142-
148+
143149
- name: Test
144150
run: |
145151
set -eu

.github/workflows/regular_conformance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ jobs:
6060
-Dprotobuf_BUILD_CONFORMANCE=ON \
6161
-S ..
6262
NUM_CPUS=$(getconf _NPROCESSORS_ONLN)
63-
make -j "${NUM_CPUS}" protoc conformance_test_runner
63+
make -j "${NUM_CPUS}" conformance_test_runner
6464
- name: Test conformance
6565
run: make test-conformance CONFORMANCE_TEST_RUNNER=Sources/protobuf/protobuf/cmake_build/conformance_test_runner

0 commit comments

Comments
 (0)