Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Use GitHub workflow for running CI #132

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/cpp-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: C++ Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
cpp-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install dependencies
run: sudo apt install -y cmake clang libclang-dev llvm llvm-dev libssl-dev

- name: Cache Poco
id: cache-poco
uses: actions/cache@v3
with:
path: ~/pocoinstall/v1_12_4
key: ${{ runner.os }}-Poco-v_1_12_4-t0
- name: Install Poco
if: steps.cache-poco.outputs.cache-hit != 'true'
run: |
export POCO_INSTALL_PATH=~/pocoinstall/v1_12_4 && mkdir -p ${POCO_INSTALL_PATH}
git clone https://github.com/pocoproject/poco.git
pushd poco && git checkout poco-1.12.4-release && git submodule update --init
mkdir poco_build && pushd poco_build \
&& cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$POCO_INSTALL_PATH \
&& make install && popd

- name: Cache gRPC
id: cache-grpc
uses: actions/cache@v3
with:
path: ~/grpcinstall/v1_44_0
key: ${{ runner.os }}-gRPC-v1_44_0-t0
- name: Install gRPC
if: steps.cache-grpc.outputs.cache-hit != 'true'
run: |
export GRPC_INSTALL_PATH=~/grpcinstall/v1_44_0 && mkdir -p $GRPC_INSTALL_PATH
git clone https://github.com/grpc/grpc.git
pushd grpc && git checkout v1.44.0 && git submodule update --init
mkdir -p grpcbuild && pushd grpcbuild \
&& cmake .. -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_PATH \
&& make install && popd
rm -rf grpcbuild && mkdir -p grpcbuild && pushd grpcbuild \
&& cmake .. -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package -DgRPC_CARES_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_PATH \
&& make install && popd
popd

- name: Test C++
run: |
export POCO_INSTALL_PATH=~/pocoinstall/v1_12_4
export GRPC_INSTALL_PATH=~/grpcinstall/v1_44_0
export PATH="$GRPC_INSTALL_PATH/bin:$PATH"
rm -rf build && mkdir build && pushd build \
&& cmake .. -DCMAKE_PREFIX_PATH="$GRPC_INSTALL_PATH;$POCO_INSTALL_PATH" && make \
&& popd && rm -rf build
4 changes: 0 additions & 4 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@

if (NOT ABSL_ROOT_DIR)
add_subdirectory(abseil-cpp-cmake)
endif()

if (NOT KVPROTO_FOUND)
add_subdirectory (kvproto/cpp)
endif()
Expand Down
1 change: 0 additions & 1 deletion third_party/abseil-cpp
Submodule abseil-cpp deleted from 215105
25 changes: 0 additions & 25 deletions third_party/abseil-cpp-cmake/CMakeLists.txt

This file was deleted.