Update: vcpkg for windows builds #257
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: '64e15f6669480b2d2bff1e5e815c571a8213421e' | |
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 |