Skip to content

get a fucking usable CPM #15

get a fucking usable CPM

get a fucking usable CPM #15

Workflow file for this run

name: Windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
BUILD_TYPE: Release
INSTALL_LOCATION: ".local"
jobs:
build:
runs-on: windows-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v2
- name: cache dependencies
uses: actions/cache@v2
id: cache
with:
path: ${{env.INSTALL_LOCATION}}
key: ${{runner.os}}-dependencies
# - name: install GoogleTest
# if: ${{steps.cache.output.cache-hit != 'true'}}
# run: |
# cd ..
# git clone https://github.com/google/googletest.git --branch release-1.10.0
# cd googletest
# cmake -Bbuild -DCMAKE_INSTALL_PREFIX="$HOME/$env:INSTALL_LOCATION" -Dgtest_force_shared_crt=1
# cmake --build build --config Release
# cmake --build build --target install --config Release
# cd ../modern-cpp-template
- name: configure
run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX="$HOME/$env:INSTALL_LOCATION"
- name: build
run: cmake --build build --config "$env:BUILD_TYPE" -j4
- name: run tests
run: |
cd build
ctest -C "$env:BUILD_TYPE" -VV
- name: install project
run: cmake --build build --target install --config Release