From 6996c51d498bc6875adb1b290f4850332d7a28a0 Mon Sep 17 00:00:00 2001 From: Pavel Punsky Date: Tue, 16 Aug 2022 22:49:01 -0700 Subject: [PATCH] Create github action to build PR using cmake --- .github/workflows/cmake.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/cmake.yaml diff --git a/.github/workflows/cmake.yaml b/.github/workflows/cmake.yaml new file mode 100644 index 0000000..33fd7c9 --- /dev/null +++ b/.github/workflows/cmake.yaml @@ -0,0 +1,35 @@ +name: CMake + +on: + push: + branches: [ $default-branch ] + pull_request: + types: [ opened, reopened, synchronize ] + +env: + BUILD_TYPE: Release + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libevent-dev \ + libssl-dev \ + libpq-dev libmariadb-dev libsqlite3-dev \ + libhiredis-dev \ + libmongoc-dev \ + libmicrohttpd-dev + - uses: actions/checkout@v3 + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: apps tests + run: cd examples && ./run_tests.sh +