Make sure that cached .ast
files are stored in temporary directory.
#42
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: Tests | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
clang_version: [13, 14, 15] | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa | |
- run: sudo apt-get update | |
- run: sudo apt-get install llvm-${{ matrix.clang_version }} | |
- run: sudo apt-get install llvm-${{ matrix.clang_version }}-dev | |
- run: sudo apt-get install llvm-${{ matrix.clang_version }}-runtime | |
- run: sudo apt-get install libclang-${{ matrix.clang_version }}-dev | |
- run: sudo apt-get install libclang-cpp${{ matrix.clang_version }} | |
- run: sudo apt-get install libclang-cpp${{ matrix.clang_version }}-dev | |
- name: Setup BATS | |
uses: mig4/setup-bats@v1 | |
with: | |
bats-version: 1.10.0 | |
- run: clang++-${{ matrix.clang_version }} --version | |
- run: clang-format --version | |
- run: cmake --version | |
- run: bats --version | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
env: | |
CXX: clang++-${{ matrix.clang_version }} | |
CXX_FLAGS: /usr/lib/llvm-${{ matrix.clang_version }}/lib/clang/${{ matrix.clang_version }}.0.0/include | |
run: cmake $GITHUB_WORKSPACE -DLLVM_ROOT=/usr/lib/llvm-${{ matrix.clang_version }}/cmake -DClang_DIR=/usr/lib/llvm-${{ matrix.clang_version }}/lib/cmake/clang | |
- name: Patch termcolor | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: sed -i 's/#include <iostream>/#include <iostream>\n#include <cstdint>/g' _deps/termcolor-src/include/termcolor/termcolor.hpp | |
- name: Build Instantiator | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: cmake --build . -- -j2 | |
- name: Install Instantiator | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: sudo cmake --build . --target install -- -j2 | |
- name: Test | |
working-directory: ${{runner.workspace}} | |
shell: bash | |
run: bats -r -T . |