mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-06 04:04:32 +00:00
Removed intel runner from mac, it never run Removed arm from windows as it will always fail as git ci runners are not arm removed gcc12 kept gcc13 Added convenience function for checking if a package is active
114 lines
No EOL
4.2 KiB
YAML
114 lines
No EOL
4.2 KiB
YAML
name: Windows Build
|
|
on:
|
|
push:
|
|
branches: [development]
|
|
pull_request:
|
|
branches: [development]
|
|
|
|
concurrency:
|
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
checks: write
|
|
|
|
jobs:
|
|
build-windows:
|
|
if: github.repository == 'TorqueGameEngines/Torque3D'
|
|
name: ${{matrix.config.name}}
|
|
runs-on: ${{matrix.config.os}}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config:
|
|
- {
|
|
name: "Windows MSVC Ninja",
|
|
os: "windows-latest",
|
|
build_type: "Release",
|
|
cc: "cl",
|
|
cxx: "cl",
|
|
generator: "Ninja",
|
|
cmake_args: "",
|
|
compiler_family: "msvc",
|
|
msvc_arch: "amd64",
|
|
can_test: false,
|
|
}
|
|
- {
|
|
name: "Windows MSVC Visual Studio 2022",
|
|
os: "windows-2022",
|
|
build_type: "Release",
|
|
cc: "cl",
|
|
cxx: "cl",
|
|
generator: "Visual Studio 17 2022",
|
|
cmake_args: "",
|
|
compiler_family: "msvc",
|
|
msvc_arch: "amd64",
|
|
can_test: false,
|
|
}
|
|
- {
|
|
name: "Windows MSVC Visual Studio 2026",
|
|
os: "windows-latest",
|
|
build_type: "Release",
|
|
cc: "cl",
|
|
cxx: "cl",
|
|
generator: "Visual Studio 18 2026",
|
|
cmake_args: "",
|
|
compiler_family: "msvc",
|
|
msvc_arch: "amd64",
|
|
can_test: true,
|
|
}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: ilammy/msvc-dev-cmd@v1.13.0
|
|
with:
|
|
arch: ${{matrix.config.msvc_arch}}
|
|
|
|
- name: Print env
|
|
run: |
|
|
echo github.event.action: ${{ github.event.action }}
|
|
echo github.event_name: ${{ github.event_name }}
|
|
|
|
- name: Run GIT Init
|
|
run: git init
|
|
|
|
- name: Setup MSVC problem matcher
|
|
uses: ammaraskar/msvc-problem-matcher@master
|
|
|
|
- name: Add Clang to PATH
|
|
if: matrix.config.compiler_family == 'clang-cl'
|
|
run: |
|
|
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
|
|
- name: Verify toolchain
|
|
run: cmake --version
|
|
|
|
- name: Configure, Build & Install
|
|
uses: threeal/cmake-action@v1.3.0
|
|
with:
|
|
source-dir: ${{github.workspace}}
|
|
build-dir: ${{github.workspace}}/build
|
|
c-compiler: ${{matrix.config.cc}}
|
|
cxx-compiler: ${{matrix.config.cxx}}
|
|
generator: ${{matrix.config.generator}}
|
|
args: ${{matrix.config.cmake_args}}
|
|
options: CMAKE_BUILD_TYPE=${{matrix.config.build_type}} TORQUE_APP_NAME=Torque3D TORQUE_TESTING=ON
|
|
run-build: true
|
|
build-args: --config ${{matrix.config.build_type}} --target install
|
|
|
|
# Skipped for ARM64 — binary cannot run on the x64 host runner.
|
|
- name: Unit Tests
|
|
if: matrix.config.can_test
|
|
run: |
|
|
cd "${{github.workspace}}/My Projects/Torque3D/game"
|
|
./Torque3D.exe runTests.tscript
|
|
|
|
- name: Test Reporter
|
|
uses: phoenix-actions/test-reporting@v14
|
|
with:
|
|
name: ${{matrix.config.name}} test results
|
|
path: "**/My Projects/Torque3D/game/test_detail.xml"
|
|
reporter: java-junit
|
|
fail-on-error: true
|
|
if: github.event_name != 'pull_request' && matrix.config.can_test |