Merge remote-tracking branch 'origin/master' into godot4

This commit is contained in:
Leroy Hopson 2024-02-13 11:02:24 +13:00
commit d6ca4f2817
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
5 changed files with 67 additions and 4 deletions

1
.gitattributes vendored
View file

@ -30,6 +30,7 @@
/.import export-ignore
/LICENSE.md export-ignore
/misc export-ignore
/.pre-commit-config.yaml export-ignore
/project.godot export-ignore
/README.md export-ignore
/requirements.txt export-ignore

View file

@ -0,0 +1,32 @@
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 }}

15
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "14:44"
timezone: UTC
open-pull-requests-limit: 10
commit-message:
prefix: "chore"
include: "scope"
labels:
- "dependabot"
- "dependencies"

View file

@ -14,7 +14,7 @@ jobs:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Import assets
uses: ./.github/actions/import-assets
with:
@ -136,7 +136,7 @@ jobs:
scons platform=${{ matrix.platform }} target=${{ matrix.target }} bits=${{ matrix.bits }} generate_bindings=yes -j2
- name: Setup cmake
if: steps.cache-submodules.outputs.cache-hit != 'true'
uses: jwlawson/actions-setup-cmake@v1
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.23.2"
use-32bit: ${{ matrix.bits == 32 && matrix.os == 'windows-2022' }}
@ -198,7 +198,7 @@ jobs:
- name: Import assets
uses: ./.github/actions/import-assets
- name: Export HTML5
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
command: godot --no-window --export HTML5
retry_on: error
@ -325,7 +325,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: "pip"

15
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,15 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: CC0-1.0
ci:
autofix_commit_msg: "fix: auto fixes"
autoupdate_commit_msg: "chore: autoupdate"
exclude: "^addons/gut/"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier