mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-22 01:30:25 +01:00
Re-enable native builds
This commit is contained in:
parent
4b7408a4d1
commit
420c774a43
4 changed files with 56 additions and 65 deletions
32
.github/actions/cache-submodules/action.yaml
vendored
32
.github/actions/cache-submodules/action.yaml
vendored
|
@ -1,32 +0,0 @@
|
||||||
name: Cache dependencies
|
|
||||||
inputs:
|
|
||||||
platform:
|
|
||||||
required: true
|
|
||||||
target:
|
|
||||||
required: true
|
|
||||||
bits:
|
|
||||||
required: true
|
|
||||||
outputs:
|
|
||||||
cache-hit:
|
|
||||||
value: ${{ steps.cache.outputs.cache-hit }}
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Hash submodule revisions
|
|
||||||
id: hash
|
|
||||||
working-directory: addons/godot_xterm/native/thirdparty
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cache_version=1 # Increment this number to invalidate the cache.
|
|
||||||
godot_cpp_rev=$(git ls-tree HEAD godot-cpp --object-only)
|
|
||||||
libuv_rev=$(git ls-tree HEAD libuv --object-only)
|
|
||||||
libtsm_rev=$(git ls-tree HEAD libtsm --object-only)
|
|
||||||
hash_cmd=$([[ $RUNNER_OS == 'Windows' ]] && echo 'sha1sum' || echo 'shasum')
|
|
||||||
hash_of_hashes=$(echo -n "$godot_cpp_rev$libuv_rev$libtsm_rev$cache_version" | $hash_cmd | head -c 40)
|
|
||||||
echo "name=hash::$hash_of_hashes" >> $GITHUB_OUTPUT
|
|
||||||
- name: Cache submodules
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: cache
|
|
||||||
with:
|
|
||||||
path: addons/godot_xterm/native/thirdparty
|
|
||||||
key: thirdparty-${{ inputs.platform }}-${{ inputs.bits }}-${{ inputs.target }}-${{ steps.hash.outputs.hash }}
|
|
2
.github/actions/import-assets/action.yml
vendored
2
.github/actions/import-assets/action.yml
vendored
|
@ -6,7 +6,7 @@ runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Godot
|
- name: Setup Godot
|
||||||
uses: lihop/setup-godot@4aad9daa7dd81c11329c4b54fdc26dbd39eea7d6
|
uses: lihop/setup-godot@v2
|
||||||
with:
|
with:
|
||||||
version: ${{ inputs.godot-version }}
|
version: ${{ inputs.godot-version }}
|
||||||
- name: Import assets
|
- name: Import assets
|
||||||
|
|
83
.github/workflows/main.yml
vendored
83
.github/workflows/main.yml
vendored
|
@ -12,7 +12,14 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04]
|
platform: [linux, macos, windows]
|
||||||
|
include:
|
||||||
|
- platform: linux
|
||||||
|
os: ubuntu-22.04
|
||||||
|
- platform: macos
|
||||||
|
os: macos-12
|
||||||
|
- platform: windows
|
||||||
|
os: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Import assets
|
- name: Import assets
|
||||||
|
@ -26,13 +33,13 @@ jobs:
|
||||||
path: .godot/
|
path: .godot/
|
||||||
|
|
||||||
build_docker:
|
build_docker:
|
||||||
name: "Build Docker"
|
name: Build Docker (linux, ${{ matrix.arch }}, ${{ matrix.target }})
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
target: [release, debug]
|
|
||||||
arch: [x86_64, x86_32]
|
arch: [x86_64, x86_32]
|
||||||
|
target: [release, debug]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@ -42,8 +49,8 @@ jobs:
|
||||||
id: cache-submodules
|
id: cache-submodules
|
||||||
with:
|
with:
|
||||||
platform: linux
|
platform: linux
|
||||||
target: ${{ matrix.target }}
|
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
|
target: ${{ matrix.target }}
|
||||||
- name: Pull docker images
|
- name: Pull docker images
|
||||||
run: docker-compose pull
|
run: docker-compose pull
|
||||||
working-directory: addons/godot_xterm/native
|
working-directory: addons/godot_xterm/native
|
||||||
|
@ -67,27 +74,36 @@ jobs:
|
||||||
addons/godot_xterm/native/bin/*.so
|
addons/godot_xterm/native/bin/*.so
|
||||||
|
|
||||||
build_native:
|
build_native:
|
||||||
if: false # Temporarily disabled.
|
name: Build Native (${{ matrix.platform }}, ${{ matrix.arch }}, ${{ matrix.target}})
|
||||||
name: "Build Native"
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [javascript, osx, windows]
|
platform: [web, macos, windows]
|
||||||
target: [release, debug]
|
target: [release, debug]
|
||||||
bits: [64, 32]
|
bits: [64, 32]
|
||||||
|
exclude:
|
||||||
|
- platform: web
|
||||||
|
bits: 64
|
||||||
|
- platform: macos
|
||||||
|
bits: 32
|
||||||
include:
|
include:
|
||||||
- platform: javascript
|
- platform: web
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
- platform: osx
|
- platform: macos
|
||||||
os: macos-12
|
os: macos-12
|
||||||
- platform: windows
|
- platform: windows
|
||||||
os: windows-2022
|
os: windows-2022
|
||||||
exclude:
|
- platform: web
|
||||||
- platform: javascript
|
arch: wasm32
|
||||||
bits: 64 # Currently only wasm32 is supported.
|
- platform: macos
|
||||||
- platform: osx
|
arch: universal
|
||||||
bits: 32 # Only 64-bit supported on macOS.
|
- platform: windows
|
||||||
|
bits: 64
|
||||||
|
arch: x86_64
|
||||||
|
- platform: windows
|
||||||
|
bits: 32
|
||||||
|
arch: x86_32
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@ -98,9 +114,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
platform: ${{ matrix.platform }}
|
platform: ${{ matrix.platform }}
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
bits: ${{ matrix.bits }}
|
arch: ${{ matrix.arch }}
|
||||||
- name: Cache emscripten
|
- name: Cache emscripten
|
||||||
if: ${{ matrix.platform == 'javascript' }}
|
if: ${{ matrix.platform == 'web' }}
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
cache-name: cache-emscripten
|
cache-name: cache-emscripten
|
||||||
|
@ -109,14 +125,14 @@ jobs:
|
||||||
key: emsdk-cache-${{ matrix.target }}-${{ hashFiles('**/*.c*', '**/*.h*') }}
|
key: emsdk-cache-${{ matrix.target }}-${{ hashFiles('**/*.c*', '**/*.h*') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
emsdk-cache-${{ matrix.target }}-
|
emsdk-cache-${{ matrix.target }}-
|
||||||
- name: Install javascript build dependencies
|
- name: Install web build dependencies
|
||||||
if: ${{ matrix.platform == 'javascript' }}
|
if: ${{ matrix.platform == 'web' }}
|
||||||
uses: mymindstorm/setup-emsdk@v11
|
uses: mymindstorm/setup-emsdk@v11
|
||||||
with:
|
with:
|
||||||
version: 3.1.14
|
version: 3.1.14
|
||||||
actions-cache-folder: emsdk-cache-${{ matrix.target }}
|
actions-cache-folder: emsdk-cache-${{ matrix.target }}
|
||||||
- name: Install additional javascript build dependencies
|
- name: Install additional web build dependencies
|
||||||
if: ${{ matrix.platform == 'javascript' }}
|
if: ${{ matrix.platform == 'web' }}
|
||||||
run: sudo apt-get update && sudo apt-get install -y scons gcc-multilib g++-multilib
|
run: sudo apt-get update && sudo apt-get install -y scons gcc-multilib g++-multilib
|
||||||
- name: Install additional macos build dependencies
|
- name: Install additional macos build dependencies
|
||||||
if: ${{ matrix.os == 'macos-12' }}
|
if: ${{ matrix.os == 'macos-12' }}
|
||||||
|
@ -129,11 +145,6 @@ jobs:
|
||||||
if: ${{ matrix.os == 'windows-2022' }}
|
if: ${{ matrix.os == 'windows-2022' }}
|
||||||
with:
|
with:
|
||||||
arch: win${{ matrix.bits }}
|
arch: win${{ matrix.bits }}
|
||||||
- name: Build godot-cpp bindings
|
|
||||||
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
cd addons/godot_xterm/native/thirdparty/godot-cpp
|
|
||||||
scons platform=${{ matrix.platform }} target=${{ matrix.target }} bits=${{ matrix.bits }} generate_bindings=yes -j2
|
|
||||||
- name: Setup cmake
|
- name: Setup cmake
|
||||||
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
||||||
uses: jwlawson/actions-setup-cmake@v2
|
uses: jwlawson/actions-setup-cmake@v2
|
||||||
|
@ -166,10 +177,15 @@ jobs:
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
cmake --build build --config $TARGET
|
cmake --build build --config $TARGET
|
||||||
|
- name: Ensure scons cache exists
|
||||||
|
run: mkdir -p ${{github.workspace}}/.scons-cache
|
||||||
|
shell: bash
|
||||||
- name: Build libgodot-xterm
|
- name: Build libgodot-xterm
|
||||||
|
env:
|
||||||
|
SCONS_CACHE: ${{github.workspace}}/.scons-cache
|
||||||
run: |
|
run: |
|
||||||
cd addons/godot_xterm/native
|
cd addons/godot_xterm/native
|
||||||
scons platform=${{ matrix.platform }} target=${{ matrix.target }} bits=${{ matrix.bits }} -j2
|
scons platform=${{ matrix.platform }} target=template_${{ matrix.target }} arch=${{ matrix.arch }} -j2
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -236,11 +252,18 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04] #, macos-12, windows-2022 ] Temporarily disabled.
|
platform: [linux, macos, windows]
|
||||||
bits: [64, 32]
|
bits: [64, 32]
|
||||||
godot_version: ["v4.2.1-stable"]
|
godot_version: ["v4.2.1-stable"]
|
||||||
|
include:
|
||||||
|
- platform: linux
|
||||||
|
os: ubuntu-22.04
|
||||||
|
- platform: macos
|
||||||
|
os: macos-12
|
||||||
|
- platform: windows
|
||||||
|
os: windows-2022
|
||||||
exclude:
|
exclude:
|
||||||
- os: macos-12
|
- platform: macos
|
||||||
bits: 32
|
bits: 32
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -253,7 +276,7 @@ jobs:
|
||||||
uses: fountainhead/action-wait-for-check@v1.1.0
|
uses: fountainhead/action-wait-for-check@v1.1.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
checkName: Import Assets (${{ matrix.os }})
|
checkName: Import Assets (${{ matrix.platform }})
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
- name: Download imports
|
- name: Download imports
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
@ -264,7 +287,7 @@ jobs:
|
||||||
uses: fountainhead/action-wait-for-check@v1.1.0
|
uses: fountainhead/action-wait-for-check@v1.1.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
checkName: Build Docker (debug, x86_${{ matrix.bits }})
|
checkName: Build Docker (linux, x86_${{ matrix.bits }}, debug)
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
- name: Install debug binary build artifacts
|
- name: Install debug binary build artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
|
|
@ -382,8 +382,8 @@ void Terminal::update_sizes(bool force)
|
||||||
Vector2 prev_size = Vector2(size);
|
Vector2 prev_size = Vector2(size);
|
||||||
int32_t prev_font_size = font_size;
|
int32_t prev_font_size = font_size;
|
||||||
Vector2 prev_cell_size = Vector2(cell_size);
|
Vector2 prev_cell_size = Vector2(cell_size);
|
||||||
uint prev_cols = cols;
|
unsigned int prev_cols = cols;
|
||||||
uint prev_rows = rows;
|
unsigned int prev_rows = rows;
|
||||||
|
|
||||||
size = get_size();
|
size = get_size();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue