feat(compat): make compatible with godot v4.2+

Previously the plugin could only be used with v4.2.1. This commit
extends support support back to v4.2.0.
This commit is contained in:
Leroy Hopson 2024-03-03 14:08:09 +13:00
parent 1a5f0f96da
commit c6609ebae5
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
6 changed files with 18 additions and 19 deletions

View file

@ -29,7 +29,9 @@ runs:
uses: actions/cache@v3 uses: actions/cache@v3
id: cache id: cache
with: with:
path: addons/godot_xterm/native/thirdparty path: |
addons/godot_xterm/native/thirdparty/libuv
addons/godot_xterm/native/thirdparty/node-pty
key: thirdparty-${{ inputs.platform }}-${{ inputs.arch }}-${{ inputs.target }}-${{ steps.hash.outputs.hash }}-${{ steps.hash.outputs.build-files-hash }} key: thirdparty-${{ inputs.platform }}-${{ inputs.arch }}-${{ inputs.target }}-${{ steps.hash.outputs.hash }}-${{ steps.hash.outputs.build-files-hash }}
restore-keys: | restore-keys: |
thirdparty-${{ inputs.platform }}-${{ inputs.arch }}-${{ inputs.target }}-${{ steps.hash.outputs.hash }}- thirdparty-${{ inputs.platform }}-${{ inputs.arch }}-${{ inputs.target }}-${{ steps.hash.outputs.hash }}-

View file

@ -234,13 +234,14 @@ jobs:
path: docs/demo path: docs/demo
test: test:
name: Test (${{ matrix.platform }}, ${{ matrix.arch }}, debug) name: Test (${{ matrix.platform }}, ${{ matrix.arch }}, ${{ matrix.godot-version }})
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: [linux, macos, windows] platform: [linux, macos, windows]
arch: [x86_64, x86_32, universal] arch: [x86_64, x86_32, universal]
godot-version: ["v4.2-stable", "v4.2.1-stable"]
exclude: exclude:
- platform: linux - platform: linux
arch: universal arch: universal
@ -262,7 +263,7 @@ jobs:
- name: Setup Godot - name: Setup Godot
uses: lihop/setup-godot@v2 uses: lihop/setup-godot@v2
with: with:
version: "4.2.1-stable" version: ${{ matrix.godot-version }}
- name: Macos setup - name: Macos setup
if: ${{ matrix.platform == 'macos' }} if: ${{ matrix.platform == 'macos' }}
run: | run: |
@ -299,9 +300,16 @@ jobs:
shell: bash shell: bash
run: | run: |
if [ "${{ matrix.platform }}" = "windows" ]; then if [ "${{ matrix.platform }}" = "windows" ]; then
just test just test | tee output.log
else else
just test-all just test-all | tee output.log
fi
# This step often passes when it shouldn't, due to GUT not failing on script errors
# (see: https://github.com/bitwes/Gut/issues/210). Therefore, we check the output
# for expected (and unexpected) strings.
if 'SCRIPT_ERROR:' output.log; then
exit 1
fi fi
merge-artifacts: merge-artifacts:

View file

@ -1,11 +0,0 @@
[configuration]
entry_symbol = "godot_xterm_library_init"
compatibility_minimum = "4.2.1"
[libraries]
linux.debug.x86_64 = "res://addons/godot_xterm/native/bin/libgodot-xterm.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://addons/godot_xterm/native/bin/libgodot-xterm.linux.template_release.x86_64.so"
linux.debug.x86_32 = "res://addons/godot_xterm/native/bin/libgodot-xterm.linux.template_debug.x86_32.so"
linux.release.x86_32 = "res://addons/godot_xterm/native/bin/libgodot-xterm.linux.template_release.x86_32.so"

View file

@ -1,7 +1,7 @@
[configuration] [configuration]
entry_symbol = "godot_xterm_library_init" entry_symbol = "godot_xterm_library_init"
compatibility_minimum = "4.2.1" compatibility_minimum = "4.2.0"
[libraries] [libraries]

@ -1 +1 @@
Subproject commit 78ffea5b136f3178c31cddb28f6b963ceaa89420 Subproject commit 54136ee8357c5140a3775c54f08db5f7deda2058

View file

@ -4,7 +4,7 @@
<br/> <br/>
[![Godot Version](https://img.shields.io/badge/Godot-3.4.x-blue.svg)](#supported-godot-versions) [![Godot Version](https://img.shields.io/badge/Godot-4.2+-blue.svg)](#supported-godot-versions)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/lihop/godot-xterm/blob/stable/LICENSE.md) [![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/lihop/godot-xterm/blob/stable/LICENSE.md)
[![Build and Test](https://github.com/lihop/godot-xterm/actions/workflows/main.yml/badge.svg?event=schedule)](https://github.com/lihop/godot-xterm/actions/workflows/main.yml) [![Build and Test](https://github.com/lihop/godot-xterm/actions/workflows/main.yml/badge.svg?event=schedule)](https://github.com/lihop/godot-xterm/actions/workflows/main.yml)