Skip to content

Commit

Permalink
CI/CD - add MSVC build action using CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
gkv311 committed Oct 19, 2024
1 parent 5e5ab4b commit 35cc103
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build_msvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build (MSVC)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build-windows-msvc:
name: Build on Windows with MSVC
runs-on: windows-latest
steps:
- name: Clone source tree
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Clone 3rdparty libraries
uses: actions/checkout@v1
with:
repository: gkv311/sview-deps-wnt
ref: 'master'
path: sview-deps-wnt
fetch-depth: 1
- name: Setup MSVC
uses: ilammy/[email protected]
with:
arch: x64
- name: Install dependencies
run: |
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
sview-deps-wnt\unpack.bat
- name: Configure project
run: |
mkdir "build"
cmake -T host=x64 -D BUILD_TREAT_WARNINGS_AS_ERRORS=ON -S . -B "./build"
- name: Build project
run: |
cmake --build "./build" --config Release -- /m
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: sview-msvc
path: build/Release

0 comments on commit 35cc103

Please sign in to comment.