From db77fa5996d4174f2bf467743e7984fcd9aa0405 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Mon, 22 Jun 2026 17:57:16 -0400 Subject: [PATCH] Downgrade to Godot 4.6.3 Stable Release Add api_version selection to CI builds --- .github/actions/godot-env/action.yml | 27 +++++++++++++++++++++++- .github/actions/openvic-build/action.yml | 5 ++++- .github/workflows/build-matrix.yml | 10 ++++++++- .github/workflows/builds.yml | 3 +++ .github/workflows/nightly-releases.yml | 2 ++ .github/workflows/releases.yml | 2 ++ game/project.godot | 2 +- 7 files changed, 47 insertions(+), 4 deletions(-) diff --git a/.github/actions/godot-env/action.yml b/.github/actions/godot-env/action.yml index 3ccebd1a..1c3348b6 100644 --- a/.github/actions/godot-env/action.yml +++ b/.github/actions/godot-env/action.yml @@ -7,7 +7,7 @@ inputs: default: https://github.com/godotengine/godot godot-version: description: Version of Godot - default: "4.7" + default: "4.6.3" godot-version-type: description: Type of Version of Godot default: stable @@ -19,6 +19,9 @@ outputs: godot-template-url: description: The link to the `.tpz` archive of export templates that was generated. value: ${{ steps.variables.outputs.godot-template-url }} + godot-api-version: + description: The api_version to send to godot-cpp + value: ${{ steps.variables.outputs.godot-api-version }} runs: using: composite @@ -117,4 +120,26 @@ runs: validate_url "$GODOT_TEMPLATE_URL" "GODOT_TEMPLATE_URL" echo "godot-template-url=$GODOT_TEMPLATE_URL" >> $GITHUB_OUTPUT + case $INPUTS_GODOT_VERSION in + 4.3*) + echo "godot-api-version=4.3" >> $GITHUB_OUTPUT + ;; + 4.4*) + echo "godot-api-version=4.4" >> $GITHUB_OUTPUT + ;; + 4.5*) + echo "godot-api-version=4.5" >> $GITHUB_OUTPUT + ;; + 4.6*) + echo "godot-api-version=4.6" >> $GITHUB_OUTPUT + ;; + 4.7*) + echo "godot-api-version=4.7" >> $GITHUB_OUTPUT + ;; + *) + echo "::error::Could not generate godot-api-version from $INPUTS_GODOT_VERSION." + EXIT_STATUS=1 + ;; + esac + exit $EXIT_STATUS diff --git a/.github/actions/openvic-build/action.yml b/.github/actions/openvic-build/action.yml index 3c48c42b..767cb0fe 100644 --- a/.github/actions/openvic-build/action.yml +++ b/.github/actions/openvic-build/action.yml @@ -13,6 +13,9 @@ inputs: arch: description: Architecture to build for required: true + api-version: + description: API version to build for + required: true scons-flags: description: Additional flags to send to SCons default: '' @@ -83,7 +86,7 @@ runs: platform: ${{ inputs.platform }} target: ${{ inputs.target }} bin-dir: "game/bin/" - sconsflags: arch=${{ inputs.arch }} ${{ inputs.scons-flags }} + sconsflags: arch=${{ inputs.arch }} api_version=${{ inputs.api-version }} ${{ inputs.scons-flags }} - name: Delete compilation files if: ${{ inputs.platform == 'windows' }} diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index e572ecf0..74a685f3 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -2,7 +2,15 @@ name: 🔢 Build Matrix on: workflow_call: + inputs: + godot-api-version: + type: string + required: true workflow_dispatch: + inputs: + godot-api-version: + type: string + required: true jobs: build-matrix: @@ -70,4 +78,4 @@ jobs: target: ${{ matrix.target }} platform: ${{ matrix.platform }} arch: ${{ matrix.arch }} - + api-version: ${{ inputs.godot-api-version }} diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index dd467226..6393b4b6 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -23,6 +23,7 @@ jobs: sources-changed: ${{ steps.changed-files.outputs.sources_any_changed }} godot-executable-url: ${{ steps.godot-env.outputs.godot-linux-url }} godot-templates-url: ${{ steps.godot-env.outputs.godot-template-url }} + godot-api-version: ${{ steps.godot-env.outputs.godot-api-version }} steps: - name: Checkout project uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -67,6 +68,8 @@ jobs: permissions: contents: read uses: ./.github/workflows/build-matrix.yml + with: + godot-api-version: ${{ needs.static-checks-builds.outputs.godot-api-version }} godot-debug-checks: runs-on: ubuntu-latest diff --git a/.github/workflows/nightly-releases.yml b/.github/workflows/nightly-releases.yml index 21a92ae1..995ad41b 100644 --- a/.github/workflows/nightly-releases.yml +++ b/.github/workflows/nightly-releases.yml @@ -21,6 +21,7 @@ jobs: commit: ${{ steps.check_for_new_commits.outputs.commit }} godot-executable-url: ${{ steps.godot-env.outputs.godot-linux-url }} godot-templates-url: ${{ steps.godot-env.outputs.godot-template-url }} + godot-api-version: ${{ steps.godot-env.outputs.godot-api-version }} latest-tag: ${{ steps.default-values.outputs.latest-tag || steps.master-values.outputs.latest-tag || steps.nightly-values.outputs.latest-tag }} commit-hash: ${{ steps.default-values.outputs.commit-hash || steps.master-values.outputs.commit-hash || steps.nightly-values.outputs.commit-hash }} from-ref: ${{ steps.default-values.outputs.from-ref || steps.master-values.outputs.from-ref || steps.nightly-values.outputs.from-ref }} @@ -264,6 +265,7 @@ jobs: target: ${{ matrix.target }} platform: ${{ matrix.platform }} arch: ${{ matrix.arch }} + api-version: ${{ needs.nightly-check.outputs.godot-api-version }} tag-name: ${{ needs.nightly-check.outputs.tag-name }} disable-cache: true scons-flags: use_hot_reload=no debug_symbols=yes optimize=speed_trace ${{ matrix.scons-flags }} diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index b674a831..42910f49 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -20,6 +20,7 @@ jobs: release-name: ${{ steps.get_release_name.outputs.release-name }} godot-executable-url: ${{ steps.godot-env.outputs.godot-linux-url }} godot-templates-url: ${{ steps.godot-env.outputs.godot-template-url }} + godot-api-version: ${{ steps.godot-env.outputs.godot-api-version }} env: GITHUB_REF_NAME: ${{ github.ref_name }} steps: @@ -127,6 +128,7 @@ jobs: target: ${{ matrix.target }} platform: ${{ matrix.platform }} arch: ${{ matrix.arch }} + version-api: ${{ needs.static-checks-release.outputs.godot-api-version }} tag-name: ${{ github.ref_name }} release-name: ${{ needs.static-checks-release.outputs.release-name }} disable-cache: true diff --git a/game/project.godot b/game/project.godot index a82f48fb..dbf23256 100644 --- a/game/project.godot +++ b/game/project.godot @@ -14,7 +14,7 @@ config/name="OpenVic" config/description="A faithful recreation of Victoria 2: Heart of Darkness with a focus on enhancing performance, multiplayer stability, and modability for modern machines." run/main_scene="res://src/Systems/Startup/GameStart.tscn" config/use_custom_user_dir=true -config/features=PackedStringArray("4.7", "Forward Plus") +config/features=PackedStringArray("4.6", "Forward Plus") boot_splash/bg_color=Color(0, 0, 0, 0) boot_splash/show_image=false boot_splash/image="res://assets/graphics/splash_image.png"