fix(Makefile): use PROJECT_NAME and keep coverage output in build dir #197
Workflow file for this run
This file contains hidden or 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: MacOS | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| env: | |
| BUILD_TYPE: Release | |
| INSTALL_LOCATION: .local | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: cache dependencies | |
| uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| path: ${{ github.workspace }}/${{ env.INSTALL_LOCATION }} | |
| key: ${{ runner.os }}-dependencies-${{ hashFiles('CMakeLists.txt') }} | |
| - name: install GoogleTest | |
| if: ${{ steps.cache.outputs.cache-hit != 'true' }} | |
| run: | | |
| cd .. | |
| git clone https://github.com/google/googletest.git --branch v1.17.0 | |
| cd googletest | |
| cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/$INSTALL_LOCATION | |
| cmake --build build --config Release | |
| cmake --build build --target install --config Release | |
| cd ../modern-cpp-template | |
| - name: configure | |
| run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/$INSTALL_LOCATION | |
| - name: build | |
| run: cmake --build build --config $BUILD_TYPE -j4 | |
| - name: run tests | |
| run: | | |
| cd build | |
| ctest -C $BUILD_TYPE -VV | |
| - name: install project | |
| run: cmake --build build --target install --config Release | |