summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiayu Liu <Jimexist@users.noreply.github.com>2022-05-22 04:01:43 +0800
committerGitHub <noreply@github.com>2022-05-21 16:01:43 -0400
commitc6f18a596e108f7913185a09c0c0f7d29893611b (patch)
tree9ad23b2c26d55626ca5f8d00860a7694cd657a22
parent162cbb4894548ac4d016f8e63a15f994b17c4dba (diff)
downloadthrift-c6f18a596e108f7913185a09c0c0f7d29893611b.tar.gz
THRIFT-5575: add a github workflow to invoke cmake (#2595)
-rw-r--r--.github/workflows/cmake.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
new file mode 100644
index 000000000..5ae7ba73a
--- /dev/null
+++ b/.github/workflows/cmake.yml
@@ -0,0 +1,37 @@
+name: 'Build with CMake'
+
+on:
+ push:
+ branches: [ '*' ]
+ pull_request:
+ branches: [ '*' ]
+
+env:
+ BUILD_DEPS: bison flex g++ libboost-all-dev libevent-dev libssl-dev make cmake
+
+jobs:
+ compiler:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update -yq
+ sudo apt-get install -y --no-install-recommends $BUILD_DEPS
+
+ - name: Generate makefile using CMake
+ run: |
+ mkdir cmake_build
+ cd cmake_build
+ cmake .. -DBUILD_LIBRARIES=OFF
+
+ - name: Run make
+ run: |
+ cd cmake_build
+ cmake --build .
+
+ - name: Run test
+ run: |
+ cd cmake_build
+ ctest -j$(nproc)