Skip to content

CI/CD - add MSVC build action using CMake #17

CI/CD - add MSVC build action using CMake

CI/CD - add MSVC build action using CMake #17

Workflow file for this run

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: Unpacking dependencies
id: unpack-step
shell: cmd
run: |
dir
cd
call ..\sview-deps-wnt\unpack.bat
echo "ST_FFMPEG=%ST_FFMPEG%" >> %GITHUB_ENV%
echo "ST_FREETYPE=%ST_FREETYPE%" >> %GITHUB_ENV%
echo "ST_OPENAL=%ST_OPENAL%" >> %GITHUB_ENV%
echo "ST_OPENVR=%ST_OPENVR%" >> %GITHUB_ENV%
echo "ST_NVAPI=%ST_NVAPI%" >> %GITHUB_ENV%
- name: Setup MSVC
uses: ilammy/[email protected]
with:
arch: x64
- name: Install dependencies
run: |
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
- name: Configure project
env:
ST_FFMPEG: ${{ steps.unpack-step.outputs.ST_FFMPEG }}
ST_FREETYPE: ${{ steps.unpack-step.outputs.ST_FREETYPE }}
ST_OPENAL: ${{ steps.unpack-step.outputs.ST_OPENAL }}
ST_OPENVR: ${{ steps.unpack-step.outputs.ST_OPENVR }}
ST_NVAPI: ${{ steps.unpack-step.outputs.ST_NVAPI }}
run: |
mkdir "build"
cmake -T host=x64 -D BUILD_TREAT_WARNINGS_AS_ERRORS=ON -D FREETYPE_DIR=../sview-deps-wnt/${{ steps.unpack-step.outputs.ST_FREETYPE }} -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