#132 Add a CMake build for C++ port #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Install Build Essential | |
run: sudo apt update && sudo apt install build-essential | |
- name: Setup ccache | |
uses: hendrikmuhs/ccache-action@v1.2 | |
with: | |
create-symlink: true | |
key: ${{ github.job }}-${{ matrix.os }} | |
- 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 Testing/Temporary/LastTest.log |