Skip to content

Commit ad876a4

Browse files
committed
Fix CI
1 parent f91e49b commit ad876a4

File tree

3 files changed

+44
-42
lines changed

3 files changed

+44
-42
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ jobs:
6565
python --version
6666
pip install -U pip
6767
pip install -r requirements.in
68-
- name: 'Sanity check on extension_api_parser'
69-
run: python -m scripts.extension_api_parser
7068
- name: 'Setup project'
7169
run: python .github/scripts/meson_setup_or_dump_log.py build/
7270
- name: 'Build project'
@@ -98,11 +96,9 @@ jobs:
9896
- PLATFORM: 'windows-x86_64'
9997
PYTHON_ARCH: 'x64'
10098
MSVC_ARCH: 'x64'
101-
GODOT_BINARY_HINT: ''
10299
- PLATFORM: 'windows-x86'
103100
PYTHON_ARCH: 'x86'
104101
MSVC_ARCH: 'x86'
105-
GODOT_BINARY_HINT: 'x86:'
106102
steps:
107103
- name: 'Checkout'
108104
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
@@ -132,9 +128,9 @@ jobs:
132128
shell: bash
133129
run: |
134130
set -eux
135-
python tests/run.py 0-gdscript --build-dir build/ --godot-binary=${{ matrix.GODOT_BINARY_HINT }} -- --headless
136-
python tests/run.py 1-gdextension --build-dir build/ --godot-binary=${{ matrix.GODOT_BINARY_HINT }} -- --headless
137-
python tests/run.py 2-pythonscript-init --build-dir build/ --godot-binary=${{ matrix.GODOT_BINARY_HINT }} -- --headless
131+
python tests/run.py 0-gdscript --build-dir build/ -- --headless
132+
python tests/run.py 1-gdextension --build-dir build/ -- --headless
133+
python tests/run.py 2-pythonscript-init --build-dir build/ -- --headless
138134
# - name: 'Install Mesa3D OpenGL'
139135
# shell: bash
140136
# run: |
@@ -166,33 +162,34 @@ jobs:
166162
#################################################################################
167163

168164

169-
macos-build:
170-
name: '🍎 macOS build'
171-
runs-on: macos-latest
172-
env:
173-
CC: clang
174-
LD: lld
175-
PLATFORM: 'macos-x86_64'
176-
steps:
177-
- name: 'Checkout'
178-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
179-
with:
180-
submodules: true
181-
- name: 'Set up Python'
182-
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # pin@v4.5.0
183-
with:
184-
python-version: ${{ env.PYTHON_VERSION }}
185-
- name: 'Setup venv'
186-
run: |
187-
set -eux
188-
${{ env.CC }} --version
189-
python --version
190-
pip install -U pip
191-
pip install -r requirements.txt
192-
- name: 'Setup project'
193-
run: python .github/scripts/meson_setup_or_dump_log.py build/
194-
- name: 'Build project'
195-
run: meson compile -C build/
165+
# TODO
166+
# macos-build:
167+
# name: '🍎 macOS build'
168+
# runs-on: macos-latest
169+
# env:
170+
# CC: clang
171+
# LD: lld
172+
# PLATFORM: 'macos-x86_64'
173+
# steps:
174+
# - name: 'Checkout'
175+
# uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
176+
# with:
177+
# submodules: true
178+
# - name: 'Set up Python'
179+
# uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # pin@v4.5.0
180+
# with:
181+
# python-version: ${{ env.PYTHON_VERSION }}
182+
# - name: 'Setup venv'
183+
# run: |
184+
# set -eux
185+
# ${{ env.CC }} --version
186+
# python --version
187+
# pip install -U pip
188+
# pip install -r requirements.txt
189+
# - name: 'Setup project'
190+
# run: python .github/scripts/meson_setup_or_dump_log.py build/
191+
# - name: 'Build project'
192+
# run: meson compile -C build/
196193
# TODO: see https://github.com/touilleMan/godot-python/issues/358
197194
# - name: 'Run tests'
198195
# run: python tests/run.py 0-pythonscript-init --build-dir build/ -- --headless

meson.build

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,20 +248,29 @@ if get_option('gdextension_path') != ''
248248
gdextension_path = join_paths(meson.project_source_root(), get_option('gdextension_path'))
249249
else
250250
# Download Godot and generate it GDextension API
251+
message('Fetching Godot v@0@ binary and generating GDExtension...'.format(get_option('godot_version')))
251252
run_command(
252253
python,
253254
'scripts/fetch_godot.py',
254255
'--generate-gdextension',
255256
'--build-dir', meson.project_build_root(),
256257
get_option('godot_version'),
257-
capture: true,
258258
check: true,
259-
).stdout().strip().split('\n')
259+
)
260260
gdextension_path = join_paths(meson.project_build_root(), 'gdextension_api')
261261
endif
262262

263263

264264
godot_extension_api_json = join_paths(gdextension_path, 'extension_api.json')
265+
# Sanity check on extension_api_parser
266+
message('Checking GDExtension\'s extension_api.json is supported...'.format(get_option('godot_version')))
267+
run_command(
268+
python,
269+
'-m',
270+
'scripts.extension_api_parser',
271+
godot_extension_api_json,
272+
check: true,
273+
)
265274

266275

267276
# On Windows `/MDd` flag (used by meson when `buildtype=debug`) defines `_DEBUG`,

scripts/extension_api_parser/__main__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
try:
1414
extension_api_path = Path(sys.argv[1])
1515
except IndexError:
16-
extension_api_path = (
17-
(Path(__file__).parent / "../../godot_headers/extension_api.json")
18-
.resolve()
19-
.relative_to(os.getcwd())
20-
)
16+
raise SystemExit("Usage: python -m extension_api_parser <path/to/extension_api.json>")
2117

2218

2319
try:
@@ -29,6 +25,6 @@
2925
for build_config in build_configs:
3026
initial_types_db = TYPES_DB.copy()
3127
print(f"Checking {extension_api_path} with config {build_config.value}")
32-
parse_extension_api_json(extension_api_path, build_config, skip_classes=False)
28+
parse_extension_api_json(extension_api_path, build_config, filter_classes=False)
3329
TYPES_DB.clear()
3430
TYPES_DB.update(initial_types_db)

0 commit comments

Comments
 (0)