Implement script and scene tier policy limits with enforcement in the… #16
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: Build GDExtension Native Libraries | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "SConstruct" | |
| - "SCsub" | |
| - "src/**" | |
| - "godot-cpp" | |
| - "godot-cpp/**" | |
| - "third-party/**" | |
| - "addons/GoToolCenter/**" | |
| - "project/addons/GoToolCenter/**" | |
| - ".gitmodules" | |
| - ".github/workflows/build-gdextension.yml" | |
| pull_request: | |
| paths: | |
| - "SConstruct" | |
| - "SCsub" | |
| - "src/**" | |
| - "godot-cpp" | |
| - "godot-cpp/**" | |
| - "third-party/**" | |
| - "addons/GoToolCenter/**" | |
| - "project/addons/GoToolCenter/**" | |
| - ".gitmodules" | |
| - ".github/workflows/build-gdextension.yml" | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.platform }} ${{ matrix.arch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| platform: linux | |
| arch: x86_64 | |
| artifact_name: gotool-center-linux-x86_64 | |
| - os: windows-latest | |
| platform: windows | |
| arch: x86_64 | |
| artifact_name: gotool-center-windows-x86_64 | |
| - os: macos-latest | |
| platform: macos | |
| arch: universal | |
| artifact_name: gotool-center-macos-universal | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Verify required files | |
| run: | | |
| python -c "from pathlib import Path; required = ['godot-cpp/SConstruct', 'third-party/godot/extension_api.json', 'third-party/sqlite3/sqlite3.c', 'SConstruct']; missing = [p for p in required if not Path(p).is_file()]; print('Missing files:', missing); raise SystemExit(1 if missing else 0)" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install SCons | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install scons | |
| scons --version | |
| - name: Print build environment | |
| run: | | |
| python --version | |
| scons --version | |
| git submodule status --recursive | |
| - name: Build debug library | |
| run: | | |
| scons platform=${{ matrix.platform }} target=template_debug arch=${{ matrix.arch }} custom_api_file=third-party/godot/extension_api.json generate_bindings=yes -j2 | |
| - name: Build release library | |
| run: | | |
| scons platform=${{ matrix.platform }} target=template_release arch=${{ matrix.arch }} custom_api_file=third-party/godot/extension_api.json generate_bindings=yes -j2 | |
| - name: List native library outputs | |
| run: | | |
| python -c "from pathlib import Path; root = Path('project/addons/GoToolCenter/bin'); print('Output directory:', root.resolve()); [print(p.as_posix()) for p in sorted(root.glob('*'))]" | |
| - name: Upload platform artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: | | |
| project/addons/GoToolCenter/bin/** | |
| if-no-files-found: error | |
| package: | |
| name: Package all native libraries | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| steps: | |
| - name: Download all platform artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: artifacts | |
| - name: Create combined addon bin folder | |
| run: | | |
| mkdir -p package/addons/GoToolCenter/bin | |
| find artifacts -type f \( \ | |
| -name "*.dll" -o \ | |
| -name "*.so" -o \ | |
| -name "*.dylib" \ | |
| \) -exec cp {} package/addons/GoToolCenter/bin/ \; | |
| find package -type f -print | |
| - name: Upload combined native library package | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: gotool-center-all-platforms | |
| path: package/** | |
| if-no-files-found: error |