updated caching #3
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: Build and Publish Artifacts | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Cache VCPKG | |
uses: actions/cache@v3 | |
with: | |
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }} | |
path: | | |
build/x64-release/vcpkg_installed | |
build/x64-debug/vcpkg_installed | |
- name: Cache Externals | |
uses: actions/cache@v3 | |
with: | |
key: externals-${{ runner.os }}-${{ hashFiles('.gitmodules') }} | |
path: | | |
build/x64-release/externals | |
build/x64-debug/externals | |
- name: Configure CMake | |
run: | | |
cmake --preset x64-release | |
- name: Build project | |
run: | | |
cmake --build --preset x64-release --target install | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: install-artifacts | |
path: install/x64-release |