Move classes.pyx/pxd code into builtins.pyx/pxd (avoid recursive β¦
#366
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - godot4-meson | |
| pull_request: | |
| branches: | |
| - master | |
| - godot4-meson | |
| # Cancel run if another commit is pushed on the branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # Global Settings | |
| env: | |
| UV_VERSION: "0.9.16" | |
| BLEEDING_EDGE_GODOT: false | |
| jobs: | |
| static-checks: | |
| name: 'π Static checks' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # pin@v7.1.4 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Static checks | |
| uses: j178/prek-action@91fd7d7cf70ae1dee9f4f44e7dfa5d1073fe6623 # pin@v1.0.11 | |
| ################################################################################# | |
| linux-build: | |
| name: 'π§ Linux build' | |
| runs-on: ubuntu-latest | |
| env: | |
| CC: clang | |
| LD: lld | |
| PLATFORM: linux-x86_64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1 | |
| with: | |
| submodules: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # pin@v7.1.4 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Download bleeding edge Godot ποΈ | |
| uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9 | |
| if: ${{ env.BLEEDING_EDGE_GODOT == true }} | |
| with: | |
| repo: godotengine/godot | |
| branch: master | |
| event: push | |
| workflow: linux_builds.yml | |
| workflow_conclusion: success | |
| name: linux-editor-mono | |
| search_artifacts: true | |
| check_artifacts: true | |
| ensure_latest: true | |
| path: godot-artifacts | |
| - name: Setup bleeding edge Godot ποΈ | |
| id: setup-godot | |
| if: ${{ env.BLEEDING_EDGE_GODOT == true }} | |
| run: | | |
| set -eux | |
| GODOT_BIN=`pwd`/godot-artifacts/godot.linuxbsd.editor.x86_64.mono | |
| GDEXTENSION_DIR=`pwd`/gdextension_api | |
| ls godot-artifacts | |
| chmod +x $GODOT_BIN | |
| $GODOT_BIN --headless --version | |
| mkdir $GDEXTENSION_DIR && pushd $GDEXTENSION_DIR | |
| $GODOT_BIN --headless --dump-extension-api-with-docs | |
| mkdir godot && pushd godot | |
| $GODOT_BIN --headless --dump-gdextension-interface | |
| popd && popd | |
| echo "EXTRA_MESON_SETUP_ARGS=-D gdextension_path=$GDEXTENSION_DIR" >> $GITHUB_OUTPUT | |
| echo "EXTRA_RUN_TESTS_ARGS=--godot-binary=$GODOT_BIN" >> $GITHUB_OUTPUT | |
| - name: Setup project | |
| run: uv run meson setup build/ ${{ steps.setup-godot.outputs.EXTRA_MESON_SETUP_ARGS }} | |
| - name: Build project | |
| run: uv run meson compile -C build/ | |
| - name: Run tests | |
| run: | | |
| set -eux | |
| ARGS="--build-dir=build/ ${{ steps.setup-godot.outputs.EXTRA_RUN_TESTS_ARGS }} -- --headless" | |
| uv run python tests/run.py 0-gdscript $ARGS | |
| uv run python tests/run.py 1-gdextension $ARGS | |
| uv run python tests/run.py 2-init-with-python-hook $ARGS | |
| uv run python tests/run.py 3-init-with-cython-hook $ARGS | |
| uv run python tests/run.py 4-use-godot-from-python $ARGS | |
| # - name: Generate artifact archive | |
| # run: uv run meson compile -C build/ release | |
| # - name: Export release artifact | |
| # uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2 | |
| # with: | |
| # name: ${{ env.PLATFORM }}-release | |
| # path: 'build/godot-python-*.tar.bz2' | |
| ################################################################################# | |
| windows-build: | |
| name: 'π Windows build' | |
| runs-on: windows-latest | |
| env: | |
| PLATFORM: 'windows-x86_64' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1 | |
| with: | |
| submodules: true | |
| - name: Set up MSVC | |
| uses: egor-tensin/vs-shell@9a932a62d05192eae18ca370155cf877eecc2202 # pin@v2.1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # pin@v7.1.4 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Download bleeding edge Godot ποΈ | |
| uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9 | |
| if: ${{ env.BLEEDING_EDGE_GODOT == true }} | |
| with: | |
| repo: godotengine/godot | |
| branch: master | |
| event: push | |
| workflow: windows_builds.yml | |
| workflow_conclusion: success | |
| name: windows-editor | |
| search_artifacts: true | |
| check_artifacts: true | |
| ensure_latest: true | |
| path: godot-artifacts | |
| - name: Setup bleeding edge Godot ποΈ | |
| id: setup-godot | |
| if: ${{ env.BLEEDING_EDGE_GODOT == true }} | |
| shell: bash | |
| run: | | |
| set -eux | |
| # Absolute path should be used here, but Windows's path shenanigans | |
| # prevent me from doing this :'( | |
| GODOT_BIN=./godot-artifacts/godot.windows.editor.x86_64.exe | |
| GDEXTENSION_DIR=./gdextension_api | |
| ls godot-artifacts | |
| chmod +x $GODOT_BIN | |
| $GODOT_BIN --headless --version | |
| mkdir $GDEXTENSION_DIR && pushd $GDEXTENSION_DIR | |
| ../$GODOT_BIN --headless --dump-extension-api-with-docs | |
| mkdir godot && pushd godot | |
| ../../$GODOT_BIN --headless --dump-gdextension-interface | |
| popd && popd | |
| echo "EXTRA_MESON_SETUP_ARGS=-D gdextension_path=$GDEXTENSION_DIR" >> $GITHUB_OUTPUT | |
| echo "EXTRA_RUN_TESTS_ARGS=--godot-binary=$GODOT_BIN" >> $GITHUB_OUTPUT | |
| - name: Setup project | |
| # Note the install prefix has to be manually set on Windows due to some Meson limitation... | |
| run: uv run meson setup build/ ${{ steps.setup-godot.outputs.EXTRA_MESON_SETUP_ARGS }} -D prefix=C:/ | |
| - name: Build project | |
| run: uv run meson compile -C build/ | |
| - name: Run tests | |
| shell: bash | |
| run: | | |
| set -eux | |
| ARGS="--build-dir=build/ ${{ steps.setup-godot.outputs.EXTRA_RUN_TESTS_ARGS }} -- --headless" | |
| uv run python tests/run.py 0-gdscript $ARGS | |
| uv run python tests/run.py 1-gdextension $ARGS | |
| uv run python tests/run.py 2-init-with-python-hook $ARGS | |
| uv run python tests/run.py 3-init-with-cython-hook $ARGS | |
| uv run python tests/run.py 4-use-godot-from-python $ARGS | |
| # - name: Install Mesa3D OpenGL | |
| # shell: bash | |
| # run: | | |
| # set -eux | |
| # # Azure pipelines doesn't provide a GPU with an OpenGL driver, | |
| # # hence we use Mesa3D as software OpenGL driver | |
| # pushd build/${{ matrix.PLATFORM }}/platforms/ | |
| # if [ "${{ matrix.PLATFORM }}" = "windows-64" ] | |
| # then | |
| # curl https://downloads.fdossena.com/Projects/Mesa3D/Builds/MesaForWindows-x64-20.0.7.7z -o mesa.7z | |
| # else | |
| # curl https://downloads.fdossena.com/Projects/Mesa3D/Builds/MesaForWindows-20.0.7.7z -o mesa.7z | |
| # fi | |
| # # opengl32.dll must be extracted in the same directory than Godot binary | |
| # 7z.exe x mesa.7z | |
| # ls -lh opengl32.dll # Sanity check | |
| # popd | |
| # - name: Generate artifact archive | |
| # run: uv run meson compile -C build/ release | |
| # - name: Export release artifact | |
| # uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2 | |
| # with: | |
| # name: ${{ matrix.PLATFORM }}-release | |
| # path: 'build/godot-python-*.zip' | |
| ################################################################################# | |
| # TODO | |
| # macos-build: | |
| # name: 'π macOS build' | |
| # runs-on: macos-latest | |
| # env: | |
| # CC: clang | |
| # LD: lld | |
| # PLATFORM: 'macos-x86_64' | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1 | |
| # with: | |
| # submodules: true | |
| # - name: 'Set up Python' | |
| # uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # pin@v4.5.0 | |
| # with: | |
| # python-version: ${{ env.PYTHON_VERSION }} | |
| # - name: Setup venv | |
| # run: | | |
| # set -eux | |
| # ${{ env.CC }} --version | |
| # python --version | |
| # pip install -U pip | |
| # pip install -r requirements.txt | |
| # - name: Setup project | |
| # run: python .github/scripts/meson_setup_or_dump_log.py build/ | |
| # - name: Build project | |
| # run: meson compile -C build/ | |
| # TODO: see https://github.com/touilleMan/godot-python/issues/358 | |
| # - name: Run tests | |
| # run: python tests/run.py 0-pythonscript-init --build-dir build/ -- --headless | |
| # - name: Generate artifact archive | |
| # run: meson compile -C build/ release | |
| # - name: Export release artifact | |
| # uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2 | |
| # with: | |
| # name: ${{ env.PLATFORM }}-release | |
| # path: 'build/godot-python-*.tar.bz2' | |
| ################################################################################# | |
| # publish-release: | |
| # name: Publish ${{ matrix.PLATFORM }} release | |
| # if: startsWith(github.ref, 'refs/tags/v') | |
| # runs-on: ubuntu-latest | |
| # needs: | |
| # - linux-build | |
| # - windows-build | |
| # - macos-build | |
| # strategy: | |
| # matrix: | |
| # include: | |
| # - PLATFORM: linux-x86_64 | |
| # - PLATFORM: windows-x86_64 | |
| # - PLATFORM: windows-x86 | |
| # - PLATFORM: osx-x86_64 | |
| # steps: | |
| # - uses: actions/download-artifact@0ede0875b5db9a2824878bbbbe3d758a75eb8268 # pin@v2 | |
| # name: ${{ matrix.PLATFORM }}-release | |
| # - name: 'Upload release' | |
| # uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2 # pin@v2 | |
| # with: | |
| # repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| # tag: ${{ github.ref }} | |
| # file: godot-python-*.* | |
| # file_glob: true | |
| # overwrite: true |