From 47c8a4842b943b5896953b5f6986fe9cfc8231c3 Mon Sep 17 00:00:00 2001 From: Kirill Gavrilov Date: Sat, 19 Oct 2024 16:55:26 +0300 Subject: [PATCH] CI/CD - add MSVC build action using CMake --- .github/workflows/build_msvc.yml | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build_msvc.yml diff --git a/.github/workflows/build_msvc.yml b/.github/workflows/build_msvc.yml new file mode 100644 index 00000000..e1e3b771 --- /dev/null +++ b/.github/workflows/build_msvc.yml @@ -0,0 +1,46 @@ +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: 3rdparty/wnt + fetch-depth: 1 + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: x64 + - name: Install dependencies + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + #./continuousIntegration/prebuild_sview_wnt.bat + call "3rdparty\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