mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-08 13:15:31 +02:00
Auto-format files using new pre-commit config
This commit is contained in:
parent
58f4f8f216
commit
002e7aacc7
22 changed files with 408 additions and 403 deletions
206
.github/workflows/main.yml
vendored
206
.github/workflows/main.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: 'Build and Test'
|
||||
name: "Build and Test"
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -7,12 +7,12 @@ on:
|
|||
|
||||
jobs:
|
||||
import_assets:
|
||||
name: 'Import Assets'
|
||||
name: "Import Assets"
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-22.04 ]
|
||||
os: [ubuntu-22.04]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Import assets
|
||||
|
@ -26,13 +26,13 @@ jobs:
|
|||
path: .godot/
|
||||
|
||||
build_docker:
|
||||
name: 'Build Docker'
|
||||
name: "Build Docker"
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: [ release, debug ]
|
||||
arch: [ x86_64, x86_32 ]
|
||||
target: [release, debug]
|
||||
arch: [x86_64, x86_32]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -68,14 +68,14 @@ jobs:
|
|||
|
||||
build_native:
|
||||
if: false # Temporarily disabled.
|
||||
name: 'Build Native'
|
||||
name: "Build Native"
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ javascript, osx, windows ]
|
||||
target: [ release, debug ]
|
||||
bits: [ 64, 32 ]
|
||||
platform: [javascript, osx, windows]
|
||||
target: [release, debug]
|
||||
bits: [64, 32]
|
||||
include:
|
||||
- platform: javascript
|
||||
os: ubuntu-22.04
|
||||
|
@ -138,7 +138,7 @@ jobs:
|
|||
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
||||
uses: jwlawson/actions-setup-cmake@v1
|
||||
with:
|
||||
cmake-version: '3.23.2'
|
||||
cmake-version: "3.23.2"
|
||||
use-32bit: ${{ matrix.bits == 32 && matrix.os == 'windows-2022' }}
|
||||
- name: Build libuv
|
||||
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
||||
|
@ -181,63 +181,63 @@ jobs:
|
|||
|
||||
html5_export:
|
||||
if: false # Temporarily disabled.
|
||||
name: 'HTML5 Export'
|
||||
needs: [ build_docker, build_native ]
|
||||
name: "HTML5 Export"
|
||||
needs: [build_docker, build_native]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Godot
|
||||
uses: lihop/setup-godot@4aad9daa7dd81c11329c4b54fdc26dbd39eea7d6
|
||||
with:
|
||||
export-templates: true
|
||||
- name: Install binary build artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: libgodot-xterm-release
|
||||
path: addons/godot_xterm/native/bin
|
||||
- name: Import assets
|
||||
uses: ./.github/actions/import-assets
|
||||
- name: Export HTML5
|
||||
uses: nick-fields/retry@v2
|
||||
with:
|
||||
command: godot --no-window --export HTML5
|
||||
retry_on: error
|
||||
timeout_minutes: 5
|
||||
max_attempts: 6
|
||||
- name: NPM cache
|
||||
uses: c-hive/gha-npm-cache@v1
|
||||
with:
|
||||
directory: test/html5
|
||||
- name: Smoke test HTML5 export
|
||||
shell: bash
|
||||
working-directory: test/html5
|
||||
run: |
|
||||
npm ci
|
||||
npx serve ../../docs/demo -p 3000 &
|
||||
npx cypress run
|
||||
- name: Upload cypress artifacts (on failure)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: cypress-artifacts
|
||||
path: |-
|
||||
test/html5/cypress/screenshots
|
||||
test/html5/cypress/videos
|
||||
- name: Upload export
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: html5-demo
|
||||
path: docs/demo
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Godot
|
||||
uses: lihop/setup-godot@4aad9daa7dd81c11329c4b54fdc26dbd39eea7d6
|
||||
with:
|
||||
export-templates: true
|
||||
- name: Install binary build artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: libgodot-xterm-release
|
||||
path: addons/godot_xterm/native/bin
|
||||
- name: Import assets
|
||||
uses: ./.github/actions/import-assets
|
||||
- name: Export HTML5
|
||||
uses: nick-fields/retry@v2
|
||||
with:
|
||||
command: godot --no-window --export HTML5
|
||||
retry_on: error
|
||||
timeout_minutes: 5
|
||||
max_attempts: 6
|
||||
- name: NPM cache
|
||||
uses: c-hive/gha-npm-cache@v1
|
||||
with:
|
||||
directory: test/html5
|
||||
- name: Smoke test HTML5 export
|
||||
shell: bash
|
||||
working-directory: test/html5
|
||||
run: |
|
||||
npm ci
|
||||
npx serve ../../docs/demo -p 3000 &
|
||||
npx cypress run
|
||||
- name: Upload cypress artifacts (on failure)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: cypress-artifacts
|
||||
path: |-
|
||||
test/html5/cypress/screenshots
|
||||
test/html5/cypress/videos
|
||||
- name: Upload export
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: html5-demo
|
||||
path: docs/demo
|
||||
|
||||
test:
|
||||
name: 'Test'
|
||||
name: "Test"
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-22.04 ] #, macos-12, windows-2022 ] Temporarily disabled.
|
||||
bits: [ 64, 32 ]
|
||||
godot_version: [ 'v4.2.1-stable' ]
|
||||
os: [ubuntu-22.04] #, macos-12, windows-2022 ] Temporarily disabled.
|
||||
bits: [64, 32]
|
||||
godot_version: ["v4.2.1-stable"]
|
||||
exclude:
|
||||
- os: macos-12
|
||||
bits: 32
|
||||
|
@ -277,59 +277,59 @@ jobs:
|
|||
run: godot -s addons/gut/gut_cmdln.gd -gconfig=test/.gutconfig.unix.json
|
||||
|
||||
delete_imports:
|
||||
name: 'Delete Imports'
|
||||
needs: [ test ]
|
||||
name: "Delete Imports"
|
||||
needs: [test]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: geekyeggo/delete-artifact@v2
|
||||
with:
|
||||
name: imports-*
|
||||
name: imports-*
|
||||
|
||||
# Git archive should only include addons/godot_xterm directory.
|
||||
check-archive:
|
||||
name: 'Check Archive'
|
||||
name: "Check Archive"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Create git archive
|
||||
run: git archive -o archive.zip HEAD
|
||||
- name: Extract archive
|
||||
run: mkdir -p /tmp/unzipped && unzip archive.zip -d /tmp/unzipped
|
||||
- name: Check that archive only contains addons/godot_xterm directory
|
||||
run: |
|
||||
shopt -s nullglob dotglob
|
||||
ls -lR /tmp/unzipped
|
||||
files=(/tmp/unzipped/*)
|
||||
if [ ${#files[@]} -ne 1 ]; then
|
||||
echo "Wrong number of files in archive (${#files[@]}) expected 1."
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "/tmp/unzipped/addons" ]; then
|
||||
echo "Expected directory (addons) not found."
|
||||
exit 1
|
||||
fi
|
||||
files=(/tmp/unzipped/addons)
|
||||
if [ ${#files[@]} -ne 1 ]; then
|
||||
echo "Wrong number of files in addons directory (${#files[@]}) expected 1."
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "/tmp/unzipped/addons/godot_xterm" ]; then
|
||||
echo "Expected directory (addons/godot_xterm) not found."
|
||||
exit 1
|
||||
fi
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Create git archive
|
||||
run: git archive -o archive.zip HEAD
|
||||
- name: Extract archive
|
||||
run: mkdir -p /tmp/unzipped && unzip archive.zip -d /tmp/unzipped
|
||||
- name: Check that archive only contains addons/godot_xterm directory
|
||||
run: |
|
||||
shopt -s nullglob dotglob
|
||||
ls -lR /tmp/unzipped
|
||||
files=(/tmp/unzipped/*)
|
||||
if [ ${#files[@]} -ne 1 ]; then
|
||||
echo "Wrong number of files in archive (${#files[@]}) expected 1."
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "/tmp/unzipped/addons" ]; then
|
||||
echo "Expected directory (addons) not found."
|
||||
exit 1
|
||||
fi
|
||||
files=(/tmp/unzipped/addons)
|
||||
if [ ${#files[@]} -ne 1 ]; then
|
||||
echo "Wrong number of files in addons directory (${#files[@]}) expected 1."
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "/tmp/unzipped/addons/godot_xterm" ]; then
|
||||
echo "Expected directory (addons/godot_xterm) not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check-code-format:
|
||||
name: 'Check Code Format'
|
||||
name: "Check Code Format"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
cache: 'pip'
|
||||
- name: Install python dependencies
|
||||
run: pip install -r requirements.txt
|
||||
- name: GDScript format check
|
||||
run: gdformat -c .
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
cache: "pip"
|
||||
- name: Install python dependencies
|
||||
run: pip install -r requirements.txt
|
||||
- name: GDScript format check
|
||||
run: gdformat -c .
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue