Update CPM.cmake and cache dependencies in workflows (#70)
* update CPM.cmake to 0.28.0 * cache CPM.cmake dependencies * create modules directory if it doesn't exist on windows * experiment with env variable * experiment 2 * experiment 3 * use env for all workflows * make cache keys OS dependent * replace env.GITHUB_ with github.workspace * format workflow files * update cache key * use unique key for each workflow
This commit is contained in:
parent
8dc50e5294
commit
8ba41ae49c
8 changed files with 123 additions and 80 deletions
30
.github/workflows/macos.yml
vendored
30
.github/workflows/macos.yml
vendored
|
@ -13,19 +13,25 @@ env:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: macos-latest
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: configure
|
||||
run: cmake -Htest -Bbuild -DCMAKE_BUILD_TYPE=Debug
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: build
|
||||
run: cmake --build build -j4
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: "**/cpm_modules"
|
||||
key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
cd build
|
||||
ctest --build-config Debug
|
||||
- name: configure
|
||||
env:
|
||||
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
|
||||
run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
- name: build
|
||||
run: cmake --build build -j4
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
cd build
|
||||
ctest --build-config Debug
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue