Skip to content

Same as previous

Same as previous #17

name: Windows Build MSVC
on:
push:
branches: [development]
pull_request:
branches: [development]
env:
build_type: "Release"
cc: "cl"
cxx: "cl"
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
run_tests: true
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows
cancel-in-progress: true
jobs:
build-windows:
if: github.repository == 'TorqueGameEngines/Torque3D'
name: Windows Latest MSVC
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Setup MSVC problem matcher
uses: ammaraskar/msvc-problem-matcher@master
- name: Install Windows MSVC Dependencies
run: |
cmake --version
cmd "${{env.environment_script}}"
- name: Configure Build & Install
uses: ashutoshvarma/action-cmake-build@v1
with:
build-dir: ${{github.workspace}}/build
# will set the CC & CXX for cmake
cc: ${{env.cc}}
cxx: ${{env.cxx}}
build-type: ${{env.build_type}}
# Extra options pass to cmake while configuring project
configure-options: -DTORQUE_APP_NAME=Torque3D -DTORQUE_TESTING=ON
# install the build using cmake --install
install-build: true
# run build using '-j [parallel]' to use multiple threads to build
parallel: 14
- name: Unit Tests
if: ${{env.run_tests}}
shell: bash
run: |
cd "${{github.workspace}}/My Projects/Torque3D/game"
./Torque3D.exe runTests.tscript
- name: Upload Artifact
uses: ./.github/actions/upload-artifact
with:
name: torque3dWindowsMSVCUnitTest