Update: vcpkg for windows builds #263
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: windows | |
on: | |
pull_request: | |
push: | |
release: | |
types: published | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
buildtype: [Debug, Release] | |
architecture: [x86, x64] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Setup environment | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.architecture }} | |
- name: Install dependencies | |
uses: lukka/run-vcpkg@v11 | |
env: | |
VCPKG_DEFAULT_TRIPLET: '${{ matrix.architecture }}-windows' | |
VCPKG_INSTALLED_DIR: '${{ github.workspace }}/vcpkg/installed' | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | |
vcpkgGitCommitId: 'c8696863d371ab7f46e213d8f5ca923c4aef2a00' | |
runVcpkgInstall: true | |
vcpkgJsonGlob: '**/cmake/vcpkg.json' | |
appendedCacheKey: 'vcpkginstall-${{ matrix.architecture }}' | |
- name: Configure FreeSerf | |
run: | | |
cmake -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} | |
- name: Build FreeSerf | |
shell: bash | |
run: | | |
cd build | |
nmake | |
- name: Run Tests | |
shell: bash | |
run: | | |
cd build | |
nmake test | |
- name: Pack FreeSerf | |
shell: bash | |
run: | | |
cd build | |
nmake package | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: FreeSerf-${{ matrix.architecture }}-${{ matrix.buildtype }} | |
path: ./build/FreeSerf-${{ matrix.architecture }}-${{ matrix.buildtype }}.exe |