diff --git a/.github/workflows/runner.yml b/.github/workflows/runner.yml index d2d0e3571fda..19aa75c1fe0a 100644 --- a/.github/workflows/runner.yml +++ b/.github/workflows/runner.yml @@ -6,53 +6,57 @@ concurrency: cancel-in-progress: true jobs: - # First stage: Only static checks, fast and prevent expensive builds from running. - - static-checks: - if: '!vars.DISABLE_GODOT_CI' - name: 📊 Static checks - uses: ./.github/workflows/static_checks.yml - - # Second stage: Run all the builds and some of the tests. - - android-build: - name: 🤖 Android - needs: static-checks - uses: ./.github/workflows/android_builds.yml - - ios-build: - name: 🍏 iOS - needs: static-checks - uses: ./.github/workflows/ios_builds.yml - - linux-build: - name: 🐧 Linux - needs: static-checks - uses: ./.github/workflows/linux_builds.yml - - macos-build: - name: 🍎 macOS - needs: static-checks - uses: ./.github/workflows/macos_builds.yml - windows-build: name: 🏁 Windows - needs: static-checks uses: ./.github/workflows/windows_builds.yml - web-build: - name: 🌐 Web - needs: static-checks - uses: ./.github/workflows/web_builds.yml - - # Third stage: Run auxiliary tests using build artifacts from previous jobs. - - # Can be turned off for PRs that intentionally break compat with godot-cpp, - # until both the upstream PR and the matching godot-cpp changes are merged. - godot-cpp-test: - name: 🪲 Godot CPP - # This can be changed to depend on another platform, if we decide to use it for - # godot-cpp instead. Make sure to move the .github/actions/godot-api-dump step - # appropriately. - needs: linux-build - uses: ./.github/workflows/godot_cpp_test.yml + # # First stage: Only static checks, fast and prevent expensive builds from running. + + # static-checks: + # if: '!vars.DISABLE_GODOT_CI' + # name: 📊 Static checks + # uses: ./.github/workflows/static_checks.yml + + # # Second stage: Run all the builds and some of the tests. + + # android-build: + # name: 🤖 Android + # needs: static-checks + # uses: ./.github/workflows/android_builds.yml + + # ios-build: + # name: 🍏 iOS + # needs: static-checks + # uses: ./.github/workflows/ios_builds.yml + + # linux-build: + # name: 🐧 Linux + # needs: static-checks + # uses: ./.github/workflows/linux_builds.yml + + # macos-build: + # name: 🍎 macOS + # needs: static-checks + # uses: ./.github/workflows/macos_builds.yml + + # windows-build: + # name: 🏁 Windows + # needs: static-checks + # uses: ./.github/workflows/windows_builds.yml + + # web-build: + # name: 🌐 Web + # needs: static-checks + # uses: ./.github/workflows/web_builds.yml + + # # Third stage: Run auxiliary tests using build artifacts from previous jobs. + + # # Can be turned off for PRs that intentionally break compat with godot-cpp, + # # until both the upstream PR and the matching godot-cpp changes are merged. + # godot-cpp-test: + # name: 🪲 Godot CPP + # # This can be changed to depend on another platform, if we decide to use it for + # # godot-cpp instead. Make sure to move the .github/actions/godot-api-dump step + # # appropriately. + # needs: linux-build + # uses: ./.github/workflows/godot_cpp_test.yml diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 95e3d4a553d1..adf0b5687c3a 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -7,7 +7,7 @@ on: env: # Used for the cache key. Add version suffix to force clean build. GODOT_BASE_BRANCH: master - SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes d3d12=yes strict_checks=yes "angle_libs=${{ github.workspace }}/" + SCONSFLAGS: dev_mode=yes module_text_server_fb_enabled=yes d3d12=yes "angle_libs=${{ github.workspace }}/" debug_symbols=no vsproj_gen_only=no windows_subsystem=console SCONS_CACHE_MSVC_CONFIG: true concurrency: @@ -18,34 +18,12 @@ jobs: build-windows: # Windows 10 with latest image runs-on: windows-latest - name: ${{ matrix.name }} + name: ${{ matrix.target }}-${{ matrix.compiler }} strategy: fail-fast: false matrix: - include: - - name: Editor (target=editor, tests=yes) - cache-name: windows-editor - target: editor - tests: true - # Skip debug symbols, they're way too big with MSVC. - sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console - bin: ./bin/godot.windows.editor.x86_64.exe - artifact: true - - - name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes) - cache-name: windows-editor-clang - target: editor - tests: true - sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes - bin: ./bin/godot.windows.editor.x86_64.llvm.exe - - - name: Template (target=template_release, tests=yes) - cache-name: windows-template - target: template_release - tests: true - sconsflags: debug_symbols=no - bin: ./bin/godot.windows.template_release.x86_64.console.exe - artifact: true + target: [editor, template_release] + compiler: [msvc, gcc, clang] steps: - name: Checkout @@ -53,10 +31,16 @@ jobs: with: submodules: recursive + - name: Create Environment Variables + run: | + echo "CACHE_NAME=windows-${{ matrix.target }}-${{ matrix.compiler }}" >> $env:GITHUB_ENV + # TODO: concatenate variable beforehand + echo "BIN=./bin/godot.windows.${{ matrix.target }}.x86_64${{ matrix.compiler == 'clang' && '.llvm' || '' }}.exe" >> $env:GITHUB_ENV + - name: Restore Godot build cache uses: ./.github/actions/godot-cache-restore with: - cache-name: ${{ matrix.cache-name }} + cache-name: ${{ env.CACHE_NAME }} continue-on-error: true - name: Setup Python and SCons @@ -77,12 +61,22 @@ jobs: run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/ - name: Setup MSVC problem matcher + if: matrix.compiler == 'msvc' uses: ammaraskar/msvc-problem-matcher@master + - name: Setup GCC problem matcher + if: matrix.compiler != 'msvc' + uses: ammaraskar/gcc-problem-matcher@master + - name: Compilation uses: ./.github/actions/godot-build with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} + sconsflags: >- + ${{ env.SCONSFLAGS }} + ${{ matrix.sconsflags }} + vsproj=${{ matrix.compiler == 'msvc' && matrix.target == 'editor' }} + use_mingw=${{ matrix.compiler == 'gcc' }} + use_llvm=${{ matrix.compiler == 'clang' }} platform: windows target: ${{ matrix.target }} tests: ${{ matrix.tests }} @@ -90,23 +84,21 @@ jobs: - name: Save Godot build cache uses: ./.github/actions/godot-cache-save with: - cache-name: ${{ matrix.cache-name }} + cache-name: ${{ env.CACHE_NAME }} continue-on-error: true - name: Prepare artifact - if: ${{ matrix.artifact }} run: | Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force - name: Upload artifact - if: ${{ matrix.artifact }} uses: ./.github/actions/upload-artifact with: - name: ${{ matrix.cache-name }} + name: ${{ env.CACHE_NAME }} - name: Unit tests if: matrix.tests run: | - ${{ matrix.bin }} --version - ${{ matrix.bin }} --help - ${{ matrix.bin }} --test --force-colors + ${{ env.BIN }} --version + ${{ env.BIN }} --help + ${{ env.BIN }} --test --force-colors diff --git a/SConstruct b/SConstruct index 0245531b45e2..1a05a408bb7b 100644 --- a/SConstruct +++ b/SConstruct @@ -858,6 +858,8 @@ else: # GCC, Clang common_warnings += ["-Wno-type-limits"] if cc_version_major >= 12: # False positives in our error macros, see GH-58747. common_warnings += ["-Wno-return-type"] + if cc_version_major < 13: # `region` & `endregion` not recognized as valid pragmas. + common_warnings += ["-Wno-unknown-pragmas"] elif methods.using_clang(env) or methods.using_emcc(env): common_warnings += ["-Wshadow-field-in-constructor", "-Wshadow-uncaptured-local"] # We often implement `operator<` for structs of pointers as a requirement diff --git a/platform/windows/detect.py b/platform/windows/detect.py index db4c7435954e..f4cdf1666053 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -390,7 +390,7 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config): env.AppendUnique(CPPDEFINES=["R128_STDC_ONLY"]) env.extra_suffix = ".llvm" + env.extra_suffix - env["MAXLINELENGTH"] = 8192 # Windows Vista and beyond, so always applicable. + # env["MAXLINELENGTH"] = 8192 # Windows Vista and beyond, so always applicable. if env["silence_msvc"] and not env.GetOption("clean"): from tempfile import mkstemp