From 9e2ab7d08ef149b524477243d68be8f583e03381 Mon Sep 17 00:00:00 2001 From: Pavel Medvedev Date: Sun, 12 Sep 2021 19:45:29 +0200 Subject: [PATCH] initial CMake workflow see #171 --- .github/workflows/cmake.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 00000000..dfee6910 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,39 @@ +name: CMake + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally + # well on Windows or Mac. You can convert this to a matrix build if you need + # cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ${{ matrix.os }} #ubuntu-latest + strategy: + matrix: + os: [macos-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Install V8 + if: runner.os == 'macOS' + run: brew install v8 + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTING=1 + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + run: ctest -C ${{env.BUILD_TYPE}}