diff --git a/.github/workflows/build-linux-gcc.yml b/.github/workflows/build-linux-gcc.yml index 3e11f98ad..c938c1325 100644 --- a/.github/workflows/build-linux-gcc.yml +++ b/.github/workflows/build-linux-gcc.yml @@ -4,17 +4,13 @@ on: branches: [development] pull_request: branches: [development] -env: - build_type: "Release" - cc: "gcc" - cxx: "g++" concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux cancel-in-progress: true permissions: - checks: write + checks: write jobs: build-linux: @@ -24,21 +20,29 @@ jobs: strategy: fail-fast: false matrix: - config: - - { - name: "Ubuntu Latest GCC", - build_type: "Release", - cc: "gcc", - cxx: "g++", - generator: "Ninja" - } + config: + - { + name: "Ubuntu GCC 13", + build_type: "Release", + cc: "gcc-13", + cxx: "g++-13", + generator: "Ninja", + } + - { + name: "Ubuntu GCC Latest", + build_type: "Release", + cc: "gcc", + cxx: "g++", + generator: "Ninja", + } steps: - uses: actions/checkout@v4 + - name: Print env run: | - echo github.event.action: ${{ github.event.action }} - echo github.event_name: ${{ github.event_name }} + echo github.event.action: ${{ github.event.action }} + echo github.event_name: ${{ github.event_name }} - name: Run GIT Init run: git init @@ -48,62 +52,63 @@ jobs: - name: Install Linux Dependencies run: | - sudo apt-get install ninja-build - ninja --version - cmake --version - gcc --version - sudo apt-get update && \ - sudo apt-get install -y \ - build-essential \ - nasm \ - libogg-dev \ - libxft-dev \ - libx11-dev \ - libxxf86vm-dev \ - libopenal-dev \ - libasound2-dev \ - libpipewire-0.3-dev \ - portaudio19-dev \ - oss4-dev \ - libjack-dev \ - libpulse-dev \ - libdbus-1-dev \ - libfreetype6-dev \ - libxcursor-dev \ - libxinerama-dev \ - libxi-dev \ - libxrandr-dev \ - libxss-dev \ - libglu1-mesa-dev \ - libgtk-3-dev - - sudo apt-get install -y \ - python3 - - pip install jinja2 + sudo apt-get update && \ + sudo apt-get install -y \ + ninja-build \ + build-essential \ + nasm \ + python3 \ + python3-pip \ + gcc-12 g++-12 \ + gcc-13 g++-13 \ + clang \ + libogg-dev \ + libxft-dev \ + libx11-dev \ + libxxf86vm-dev \ + libopenal-dev \ + libasound2-dev \ + libpipewire-0.3-dev \ + portaudio19-dev \ + oss4-dev \ + libjack-dev \ + libpulse-dev \ + libdbus-1-dev \ + libfreetype6-dev \ + libxcursor-dev \ + libxinerama-dev \ + libxi-dev \ + libxrandr-dev \ + libxss-dev \ + libglu1-mesa-dev \ + libgtk-3-dev + ninja --version + cmake --version + ${{matrix.config.cc}} --version + python3 -m pip install --break-system-packages jinja2 - 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}} - 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 + source-dir: ${{github.workspace}} + build-dir: ${{github.workspace}}/build + c-compiler: ${{matrix.config.cc}} + cxx-compiler: ${{matrix.config.cxx}} + generator: ${{matrix.config.generator}} + 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 - name: Unit Tests run: | - cd "${{github.workspace}}/My Projects/Torque3D/game" - ./Torque3D runTests.tscript + cd "${{github.workspace}}/My Projects/Torque3D/game" + ./Torque3D runTests.tscript - name: Test Reporter uses: phoenix-actions/test-reporting@v14 with: - name: Linux test results - path: "**/My Projects/Torque3D/game/test_detail.xml" - reporter: java-junit - fail-on-error: true - if: github.event_name != 'pull_request' + 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' \ No newline at end of file diff --git a/.github/workflows/build-macos-clang.yml b/.github/workflows/build-macos-clang.yml index 4b9d61f9f..796e2bd96 100644 --- a/.github/workflows/build-macos-clang.yml +++ b/.github/workflows/build-macos-clang.yml @@ -4,41 +4,47 @@ on: branches: [development] pull_request: branches: [development] -env: - build_type: "Release" - cc: "clang" - cxx: "clang++" concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macosx cancel-in-progress: true permissions: - checks: write + checks: write jobs: - build-linux: + build-macos: if: github.repository == 'TorqueGameEngines/Torque3D' name: ${{matrix.config.name}} - runs-on: macos-latest + runs-on: ${{matrix.config.os}} strategy: fail-fast: false matrix: - config: - - { - name: "MacOSX Latest Clang", - build_type: "Release", - cc: "clang", - cxx: "clang++", - generator: "Ninja" - } + config: + - { + name: "macOS ARM Clang Ninja", + os: "macos-latest", + build_type: "Release", + cc: "clang", + cxx: "clang++", + generator: "Ninja", + } + - { + name: "macOS ARM Xcode", + os: "macos-latest", + build_type: "Release", + cc: "clang", + cxx: "clang++", + generator: "Xcode", + } steps: - uses: actions/checkout@v4 + - name: Print env run: | - echo github.event.action: ${{ github.event.action }} - echo github.event_name: ${{ github.event_name }} + echo github.event.action: ${{ github.event.action }} + echo github.event_name: ${{ github.event_name }} - name: Run GIT Init run: git init @@ -48,32 +54,33 @@ jobs: - name: Install MacOSX Dependencies run: | - brew install ninja zip unzip curl pkgconfig - ninja --version - cmake --version + brew install ninja zip unzip curl pkgconfig + ninja --version + cmake --version + clang --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}} - 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 + source-dir: ${{github.workspace}} + build-dir: ${{github.workspace}}/build + c-compiler: ${{matrix.config.cc}} + cxx-compiler: ${{matrix.config.cxx}} + generator: ${{matrix.config.generator}} + 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 - name: Unit Tests run: | - cd "${{github.workspace}}/My Projects/Torque3D/game" - ./Torque3D.app/Contents/MacOS/Torque3D runTests.tscript + cd "${{github.workspace}}/My Projects/Torque3D/game" + ./Torque3D.app/Contents/MacOS/Torque3D runTests.tscript - name: Test Reporter uses: phoenix-actions/test-reporting@v14 with: - name: MacOS Test results - path: "**/My Projects/Torque3D/game/test_detail.xml" - reporter: java-junit - fail-on-error: true - if: github.event_name != 'pull_request' + 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' \ No newline at end of file diff --git a/.github/workflows/build-windows-msvc.yml b/.github/workflows/build-windows-msvc.yml index a8ddaad55..d62b0690f 100644 --- a/.github/workflows/build-windows-msvc.yml +++ b/.github/workflows/build-windows-msvc.yml @@ -4,38 +4,71 @@ on: 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 + checks: write jobs: build-windows: if: github.repository == 'TorqueGameEngines/Torque3D' name: ${{matrix.config.name}} - runs-on: windows-latest + runs-on: ${{matrix.config.os}} strategy: fail-fast: false matrix: - config: - - { - name: "Windows Latest MSVC", - build_type: "Release", - cc: "cl", - cxx: "cl", - environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", - generator: "Visual Studio 17 2022" - } - + 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 }} + echo github.event.action: ${{ github.event.action }} + echo github.event_name: ${{ github.event_name }} - name: Run GIT Init run: git init @@ -43,33 +76,39 @@ jobs: - name: Setup MSVC problem matcher uses: ammaraskar/msvc-problem-matcher@master - - name: Install Dependencies For ${{matrix.config.name}} + - name: Add Clang to PATH + if: matrix.config.compiler_family == 'clang-cl' run: | - cmake --version - cmd "${{matrix.config.environment_script}}" + 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}} - 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 + 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 + cd "${{github.workspace}}/My Projects/Torque3D/game" + ./Torque3D.exe runTests.tscript - name: Test Reporter uses: phoenix-actions/test-reporting@v14 with: - name: Windows test results - path: "**/My Projects/Torque3D/game/test_detail.xml" - reporter: java-junit - fail-on-error: true - if: github.event_name != 'pull_request' + 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 \ No newline at end of file diff --git a/Engine/source/CMakeLists.txt b/Engine/source/CMakeLists.txt index d19ad8dfa..876057c26 100644 --- a/Engine/source/CMakeLists.txt +++ b/Engine/source/CMakeLists.txt @@ -575,7 +575,6 @@ if (MSVC) /fp:except- # No FP exception overhead /bigobj # >64k sections - consoleObject.h template depth needs this /Qpar- # Disable auto-paralleliser (causes subtle correctness bugs) - /NODEFAULTLIB ${_TORQUE_MSVC_WARNINGS} ) @@ -621,8 +620,8 @@ if (MSVC) ) target_link_options(${TORQUE_APP_NAME} PRIVATE - $<$:/DEBUG:FASTLINK /INCREMENTAL> - $<$:/INCREMENTAL /DEBUG:FASTLINK /OPT:REF /OPT:ICF> + $<$:/DEBUG:FULL /INCREMENTAL> + $<$:/INCREMENTAL /DEBUG:FULL /OPT:REF /OPT:ICF> $<$:/INCREMENTAL> ) @@ -768,21 +767,21 @@ if (TORQUE_TARGET_PROPERTIES) endif (TORQUE_TARGET_PROPERTIES) target_include_directories(${TORQUE_APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_BINARY_DIR}/temp" ${TORQUE_INCLUDE_DIRECTORIES}) -target_precompile_headers(${TORQUE_APP_NAME} PRIVATE - - - - - - - - - - - - - "console/engineObject.h" -) +# target_precompile_headers(${TORQUE_APP_NAME} PRIVATE +# +# +# +# +# +# +# +# +# +# +# +# +# "console/engineObject.h" +# ) if(TORQUE_TESTING) if(WIN32) diff --git a/Engine/source/console/consoleInternal.cpp b/Engine/source/console/consoleInternal.cpp index fbbd28193..4e97a88d2 100644 --- a/Engine/source/console/consoleInternal.cpp +++ b/Engine/source/console/consoleInternal.cpp @@ -1748,6 +1748,28 @@ void Namespace::relinkPackages() activatePackage(mActivePackages[i]); } +bool Namespace::isPackageActive(StringTableEntry name) +{ + S32 x; + + for (x = 0; x < mNumActivePackages; x++) + { + if (mActivePackages[x] == name) + { + return true; + } + } + + return false; +} + +DefineEngineFunction(isPackageActive, bool, (String identifier), , + "@brief Returns true if the identifier is a package and is active, otherwise false.\n\n" + "@ingroup Packages\n") +{ + StringTableEntry name = StringTable->insert(identifier.c_str()); + return Namespace::isPackageActive(name); +} DefineEngineFunction(isPackage, bool, (String identifier), , "@brief Returns true if the identifier is the name of a declared package.\n\n" diff --git a/Engine/source/console/consoleInternal.h b/Engine/source/console/consoleInternal.h index 735e9da58..93507d7ed 100644 --- a/Engine/source/console/consoleInternal.h +++ b/Engine/source/console/consoleInternal.h @@ -275,6 +275,7 @@ public: static void printNamespaceEntries(Namespace * g, bool dumpScript = true, bool dumpEngine = true); static void unlinkPackages(); static void relinkPackages(); + static bool isPackageActive(StringTableEntry name); static bool isPackage(StringTableEntry name); static U32 getActivePackagesCount(); static StringTableEntry getActivePackage(U32 index);