Only set policies CMP0144 and CMP0167 if cmake version is greater tha… #6
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install -y cmake g++ make libboost-all-dev | |
- name: Install Catch2 | |
run: | | |
mkdir -p external | |
cd external | |
git clone https://github.com/catchorg/Catch2.git | |
cd Catch2 | |
cmake -Bbuild -H. -DBUILD_TESTING=OFF | |
sudo cmake --build build/ --target install | |
- name: Build and run tests | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. | |
make | |
cd loc.tests | |
./loc.tests |