Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/actions/godot-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
5 changes: 4 additions & 1 deletion .github/actions/openvic-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
Expand Down Expand Up @@ -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' }}
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -70,4 +78,4 @@ jobs:
target: ${{ matrix.target }}
platform: ${{ matrix.platform }}
arch: ${{ matrix.arch }}

api-version: ${{ inputs.godot-api-version }}
3 changes: 3 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nightly-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion game/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading