Skip to content

FOV-effects improvements #525

FOV-effects improvements

FOV-effects improvements #525

Workflow file for this run

name: Continuous Integration (MSVC)
on:
push:
branches: [ master ]
tags: ['*']
paths-ignore: ['**.md']
pull_request:
branches: [ master ]
paths-ignore: ['**.md']
workflow_dispatch:
env:
VCPKG_DIR: C:\vcpkg
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
jobs:
build:
if: ${{ github.repository == 'MrAlaux/Nugget-Doom' }}
name: MSVC ${{ matrix.config.arch }}
runs-on: windows-latest
strategy:
matrix:
config:
- name: x64
arch: x64
- name: Win32
arch: x86
steps:
- uses: actions/checkout@v4
- name: Latest CMake and Ninja
uses: lukka/get-cmake@latest
- name: Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.config.arch }}
- name: Setup vcpkg and NuGet
shell: bash
run: |
set -euo pipefail
cd "${{ env.VCPKG_DIR }}"
NUGET=$(vcpkg fetch nuget | tail -n 1)
GH_PACKAGES_URL="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
"$NUGET" sources add \
-source "$GH_PACKAGES_URL" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
"$NUGET" setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "$GH_PACKAGES_URL"
- name: Configure
run: |
cmake -B build -G Ninja `
-DCMAKE_BUILD_TYPE=Release -DENABLE_WERROR=ON -DENABLE_LTO=ON `
-DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_DIR }}/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET="${{ matrix.config.arch }}-windows-static-release" `
-DVCPKG_OVERLAY_TRIPLETS="cmake/triplets" `
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
-DCMAKE_IGNORE_PATH="C:/Strawberry/perl/bin;C:/Strawberry/c/lib"
- name: Build
run: cmake --build build --config "Release"
- name: Test
if: github.event_name == 'workflow_dispatch'
run: |
cd demotest
pip install pyyaml joblib
python demotest --jobs 4 --port ../build/src/nugget-doom
- name: Package
run: |
cd build
cpack
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Win-${{ matrix.config.arch }}
path: build/*.zip
- name: Extract Version Number
shell: bash
run: echo "VERSION=${GITHUB_REF##*_}" >> $GITHUB_ENV