@@ -14,25 +14,48 @@ jobs:
1414 steps :
1515 - uses : actions/checkout@v3
1616 - name : Install build utils
17- run : brew install coreutils automake libtool
17+ run : |
18+ brew install coreutils automake autoconf libtool cmake ninja pkg-config git curl
1819 - name : Checkout protobuf code
1920 run : |
2021 ./scripts/init_submodules.sh
21- cd ./third_party/protobuf
22- git fetch --tags
23- git checkout v27.1
24- cd ../..
22+ # We'll replace the protobuf submodule with a full clone at v27.1 below
2523 # Protobuf build instructions from:
2624 # https://github.com/protocolbuffers/protobuf/blob/master/src/README.md
27- - name : Build protobuf (configure & make )
25+ - name : Build Abseil and Protobuf (CMake )
2826 run : |
29- cd ./third_party/protobuf
30- ./autogen.sh
31- ./configure
32- make -j$(nproc)
33- sudo make install
34- - name : Remove dynamite dependencies (similar to `-static` on linux)
35- run : sudo rm /usr/local/lib/libproto*.dylib
27+ set -euxo pipefail
28+ # Work in third_party
29+ cd third_party
30+
31+ # Ensure a fresh abseil-cpp and protobuf
32+ rm -rf abseil-cpp protobuf
33+
34+ # Build and install Abseil
35+ git clone --depth 1 https://github.com/abseil/abseil-cpp.git
36+ cd abseil-cpp
37+ cmake -S . -B cmake/build \
38+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
39+ -DCMAKE_BUILD_TYPE=Release
40+ cmake --build cmake/build --config Release
41+ sudo cmake --install cmake/build
42+ cd ..
43+
44+ # Clone and build Protobuf v27.1
45+ git clone https://github.com/protocolbuffers/protobuf.git
46+ cd protobuf
47+ git checkout v27.1
48+ git submodule update --init --recursive
49+ cmake -S . -B build \
50+ -DCMAKE_BUILD_TYPE=Release \
51+ -Dprotobuf_BUILD_TESTS=OFF \
52+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
53+ -DCMAKE_CXX_STANDARD=17
54+ cmake --build build --config Release
55+ sudo cmake --install build
56+ cd ../..
57+ - name : " Remove dynamic proto dylibs (like -static on linux)"
58+ run : sudo rm -f /usr/local/lib/libproto*.dylib
3659 - name : make
3760 run : make clean && make plugin
3861 - name : move
0 commit comments