Skip to content

#132 Add a CMake build for C++ port #11

#132 Add a CMake build for C++ port

#132 Add a CMake build for C++ port #11

Workflow file for this run

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/[email protected]
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