Skip to content

Commit

Permalink
Add cache to windows job
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin committed Dec 8, 2020
1 parent 600e803 commit d308690
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,18 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/cache@v2
id: cache
with:
path: ./build/release/third_party/install
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}
- name: disable superbuild on cache hit
if: steps.cache.outputs.cache-hit == 'true'
run: |
echo "superbuild=-DSUPERBUILD=OFF" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "cmake_prefix_path=-DCMAKE_PREFIX_PATH=$(pwd)/build/release/third_party/install" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: configure
run: cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/release/install -DBUILD_MAVSDK_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DWERROR=OFF -j 2 -Bbuild/release -S.
run: cmake -G "Visual Studio 16 2019" $env:superbuild $env:cmake_prefix_path -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/release/install -DBUILD_MAVSDK_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DWERROR=OFF -j 2 -Bbuild/release -S.
- name: build
run: cmake --build build/release -j 2 --config Release --target install
- name: Publish artefacts
Expand Down

0 comments on commit d308690

Please sign in to comment.