-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc5e216
commit 2048648
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: msvc | ||
|
||
on: | ||
push: | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
cmake_win64: | ||
runs-on: windows-2019 | ||
steps: | ||
- name: Set environment | ||
run: | | ||
echo "release_arch=x64" >> "${Env:GITHUB_ENV}" | ||
echo "vcpkg_triplet=x64-windows-static" >> "${Env:GITHUB_ENV}" | ||
echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}" | ||
- name: Restore from cache and install vcpkg | ||
uses: lukka/run-vcpkg@v6 | ||
with: | ||
setupOnly: true | ||
vcpkgTriplet: ${{env.vcpkg_triplet}} | ||
vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}} | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Create Build Environment | ||
working-directory: ${{runner.workspace}} | ||
run: cmake -E make_directory build | ||
- name: Configure CMake | ||
working-directory: ${{runner.workspace}}/build | ||
run: | | ||
cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" | ||
- name: Build all | ||
working-directory: ${{runner.workspace}}/build | ||
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2 | ||
- name: Show built files | ||
working-directory: ${{runner.workspace}}/build/bin | ||
run: tree | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: Win64 artifacts | ||
path: ${{runner.workspace}}/build/bin/ |