From 14478bdb4579559ebfe7b751dd546be5819166c7 Mon Sep 17 00:00:00 2001 From: vityaman Date: Wed, 24 Jul 2024 15:24:35 +0300 Subject: [PATCH] #132 Add GitHub Workflow Signed-off-by: vityaman --- .github/workflows/cmake.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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 0000000..8ba666d --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,33 @@ +name: CMake + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build: + strategy: + matrix: + cmake_build_type: [Asan, Release] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Configure + working-directory: ${{github.workspace}}/ports/cpp + run: | + mkdir build + cd build + cmake \ + -DANTLR4C3_DEVELOPER=ON \ + -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ + .. + - name: Build + working-directory: ${{github.workspace}}/ports/cpp/build + run: make + - name: Unit Test + working-directory: ${{github.workspace}}/ports/cpp/build/test + run: \ + ctest + cat test/Testing/Temporary/LastTest.log