sudo for install #53
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: | |
branches: [ "main", "develop" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build_job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/cache@v3 | |
with: | |
path: build/vcpkg_installed | |
key: ${{ runner.os }}-vcpkg-${{ hashFiles('./vcpkg.json') }} | |
restore-keys: ${{ runner.os }}-vcpkg- | |
- name: installing | |
run: | | |
sudo apt install cmake make g++ clang-tidy | |
git clone https://github.com/microsoft/vcpkg | |
- name: configuring | |
run: cmake -DCMAKE_TOOLCHAIN_FILE=${PWD}/vcpkg/scripts/buildsystems/vcpkg.cmake -S . -B build -DBUILD_TESTING=ON | |
- name: building | |
run: | | |
cmake --build build -j $(nproc) | |
sudo cmake --install build | |
- name: testing | |
run: | | |
ctest -VV --test-dir build/tests | |
cd tests/install_test | |
cmake -S . -B build && cmake --build build && ./build/install_test | |
cd ../fetch_test | |
cmake -S . -B build && cmake --build build && ./build/fetch_test |