mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2025-01-14 01:07:57 +08:00
build.yml: Add a "cmake-linux-latest" job
This job builds abseil-cpp and protobuf from source using Cmake and tries to build protobuf-c against those dependencies using Cmake. The "latest" build dependencies are being targeted, currently Ubuntu 22.04, abseil-cpp from the lts_2024_01_16 branch, protobuf from the 27.x branch. Update as newer versions become available. This uses Cmake's Ninja generator which should be equivalent to the legacy makefiles that it generates. The Cmake Ninja generator is useful primarily because it automatically compiles using the maximum amount of concurrency and it actually shows you the command that failed by default.
This commit is contained in:
parent
969aa0c99c
commit
9bdd24f975
66
.github/workflows/build.yml
vendored
66
.github/workflows/build.yml
vendored
@ -120,6 +120,72 @@ jobs:
|
||||
make test
|
||||
make install
|
||||
|
||||
cmake-linux-latest:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
env:
|
||||
LDFLAGS: "-Wl,-rpath=/opt/protobuf-c/lib -Wl,--disable-new-dtags"
|
||||
|
||||
steps:
|
||||
- name: Checkout protobuf-c
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout abseil/abseil-cpp
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: abseil/abseil-cpp
|
||||
ref: "lts_2024_01_16"
|
||||
path: abseil-cpp
|
||||
|
||||
- name: Checkout protocolbuffers/protobuf
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: protocolbuffers/protobuf
|
||||
ref: "27.x"
|
||||
path: protobuf
|
||||
|
||||
- name: Install ninja
|
||||
run: |
|
||||
sudo pip install ninja
|
||||
|
||||
- name: Build abseil-cpp
|
||||
working-directory: "./abseil-cpp"
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
--install-prefix /opt/protobuf-c \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DABSL_PROPAGATE_CXX_STD=ON \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
;
|
||||
ninja -C build
|
||||
sudo ninja -C build install
|
||||
|
||||
- name: Build protobuf
|
||||
working-directory: "./protobuf"
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
--install-prefix /opt/protobuf-c \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-Dprotobuf_ABSL_PROVIDER=package \
|
||||
-Dprotobuf_BUILD_TESTS=OFF \
|
||||
;
|
||||
ninja -C build
|
||||
sudo ninja -C build install
|
||||
|
||||
- name: Build protobuf-c
|
||||
run: |
|
||||
cd build-cmake
|
||||
cmake -B build -G Ninja \
|
||||
--install-prefix /opt/protobuf-c \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTS=ON \
|
||||
;
|
||||
ninja -C build
|
||||
ninja -C build test
|
||||
sudo ninja -C build install
|
||||
|
||||
cmake-msvc:
|
||||
strategy:
|
||||
matrix:
|
||||
|
Loading…
x
Reference in New Issue
Block a user