Merge pull request #280 from AnyDSL/refactor/mixin #3253
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: linux | |
on: | |
push: | |
pull_request: | |
branches: [master] | |
jobs: | |
build-and-test: | |
name: Build and test ${{matrix.build-type}} mode | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
build-type: [Debug, Release] | |
steps: | |
- name: Clone recursively | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Cache LLVM and Clang | |
id: cache-llvm | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./llvm | |
key: llvm-14.0.0-ubuntu | |
- name: Install LLVM and Clang | |
uses: KyleMayes/[email protected] | |
with: | |
version: "14.0.0" | |
cached: ${{ steps.cache-llvm.outputs.cache-hit }} | |
- name: Install FileCheck | |
uses: i3h/download-release-asset@v1 | |
with: | |
owner: fodinabor | |
repo: FileCheckBuild | |
tag: latest | |
file: FileCheck-x86_64-ubuntu | |
path: ${{github.workspace}}/bin | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install newest g++, valgrind, lit, and psutil | |
run: | | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install g++-13 valgrind | |
sudo ln -s ${{github.workspace}}/bin/FileCheck-x86_64-ubuntu /usr/bin/FileCheck | |
sudo chmod +x /usr/bin/FileCheck | |
# sudo python -m pip install --upgrade pip | |
sudo pip install lit psutil # --break-system-packages | |
- name: Setup ccache | |
uses: Chocobo1/setup-ccache-action@v1 | |
with: | |
update_packager_index: false | |
ccache_options: max_size=500M | |
override_cache_key: ubuntu-latest-ccache-${{matrix.build-type}} | |
- name: Configure Debug | |
if: matrix.build-type == 'Debug' | |
run: CXX=g++-13 cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DBUILD_TESTING=ON -DMIM_BUILD_EXAMPLES=ON -DMIM_LIT_TIMEOUT=300 | |
- name: Configure Release | |
if: matrix.build-type == 'Release' | |
run: CXX=g++-13 cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DBUILD_TESTING=ON -DMIM_BUILD_EXAMPLES=ON -DMIM_LIT_WITH_VALGRIND=ON -DMIM_LIT_TIMEOUT=300 | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build -v | |
- name: Run lit test suite | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build ${{github.workspace}}/build -v --target lit | |
- name: Test with Valgrind | |
working-directory: ${{github.workspace}}/build | |
run: ctest --verbose -C ${{matrix.build-type}} --output-on-failure -T memcheck |