From a0ec7c3f8a0ee7fc930a91739431cc8e9789a39b Mon Sep 17 00:00:00 2001 From: John McNamara Date: Sun, 13 Feb 2022 23:48:00 +0000 Subject: [PATCH] Add Cmake GitHub action. --- .github/workflows/cmake_actions.yml | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/cmake_actions.yml diff --git a/.github/workflows/cmake_actions.yml b/.github/workflows/cmake_actions.yml new file mode 100644 index 00000000..cdaf44e3 --- /dev/null +++ b/.github/workflows/cmake_actions.yml @@ -0,0 +1,43 @@ +name: Build with CMake + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +env: + BUILD_TYPE: Release + +jobs: + build: + name: + Build with cmake + + runs-on: ubuntu-latest + + strategy: + matrix: + tests: [ON, OFF] + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + sudo apt-get -y install zlib1g-dev + sudo apt-get -y install libminizip-dev + sudo apt-get -y install libssl-dev + + - name: Configure CMake + working-directory: ${{ github.workspace }}/cmake + run: cmake .. -DBUILD_TESTS=${{ matrix.tests }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} + + - name: Build + working-directory: ${{ github.workspace }}/cmake + run: cmake --build . --config Release --parallel + + - name: Test + working-directory: ${{ github.workspace }}/cmake + run: ctest -C Release -V