diff --git a/.github/actions/godot-cpp-test/action.yml b/.github/actions/godot-cpp-test/action.yml new file mode 100644 index 00000000000..2950ab751e4 --- /dev/null +++ b/.github/actions/godot-cpp-test/action.yml @@ -0,0 +1,37 @@ +name: Build godot-cpp +description: Build godot-cpp with the provided options. + +env: + GODOT_CPP_BRANCH: 4.3 + +inputs: + bin: + description: Path to the Godot binary. + required: true + scons-flags: + description: Additional SCons flags. + required: false + +runs: + using: composite + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + repository: godotengine/godot-cpp + ref: ${{ env.GODOT_CPP_BRANCH }} + path: godot-cpp + + - name: Extract API + shell: sh + run: | + ${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api + cp -f gdextension_interface.h godot-cpp/gdextension/ + cp -f extension_api.json godot-cpp/gdextension/ + + - name: SCons Build + shell: sh + run: | + echo "Building with flags: --directory=./godot-cpp/test ${{ inputs.scons-flags }}" + scons --directory=./godot-cpp/test ${{ inputs.scons-flags }} diff --git a/.github/workflows/godot_cpp_test.yml b/.github/workflows/godot_cpp_test.yml deleted file mode 100644 index e26c109d75c..00000000000 --- a/.github/workflows/godot_cpp_test.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: 🪲 Godot CPP -on: - workflow_call: - -# Global Settings -env: - # Used for the cache key. Add version suffix to force clean build. - GODOT_BASE_BRANCH: master - # Used for the godot-cpp checkout. - GODOT_CPP_BRANCH: 4.3 - -concurrency: - group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-cpp-tests - cancel-in-progress: true - -jobs: - godot-cpp-tests: - runs-on: ubuntu-20.04 - name: Build and test Godot CPP - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - sparse-checkout: .github - - - name: Checkout godot-cpp - uses: actions/checkout@v4 - with: - submodules: recursive - repository: godotengine/godot-cpp - ref: ${{ env.GODOT_CPP_BRANCH }} - path: godot-cpp - - - name: Setup Python and SCons - uses: ./.github/actions/godot-deps - - - name: Setup GCC problem matcher - uses: ammaraskar/gcc-problem-matcher@master - - - name: Download GDExtension interface and API dump - uses: ./.github/actions/download-artifact - with: - name: godot-api-dump - path: ./godot-cpp/gdextension - - # TODO: Enable caching when godot-cpp has proper cache limiting. - - # - name: Restore Godot build cache - # uses: ./.github/actions/godot-cache-restore - # with: - # cache-name: godot-cpp - # continue-on-error: true - - - name: Build godot-cpp test extension - env: # Keep synced with godot-build. - SCONS_CACHE: ${{ github.workspace }}/.scons-cache/ - SCONS_CACHE_LIMIT: 7168 - run: scons --directory=./godot-cpp/test target=template_debug dev_build=yes verbose=yes - - # - name: Save Godot build cache - # uses: ./.github/actions/godot-cache-save - # with: - # cache-name: godot-cpp - # continue-on-error: true diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index dc3d9f37862..d38a255b89c 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -44,8 +44,7 @@ jobs: build-mono: false tests: true proj-test: true - # Generate an API dump for godot-cpp tests. - api-dump: true + godot-cpp: true # Skip 2GiB artifact speeding up action. artifact: false @@ -171,12 +170,6 @@ jobs: with: name: ${{ matrix.cache-name }} - - name: Dump Godot API - uses: ./.github/actions/godot-api-dump - if: matrix.api-dump - with: - bin: ${{ matrix.bin }} - - name: Unit tests if: matrix.tests run: | @@ -217,3 +210,10 @@ jobs: if: matrix.proj-conv with: bin: ${{ matrix.bin }} + + - name: Test godot-cpp + uses: ./.github/actions/godot-cpp-test + if: matrix.godot-cpp + with: + bin: ${{ matrix.bin }} + scons-flags: target=template_debug dev_build=yes verbose=yes diff --git a/.github/workflows/runner.yml b/.github/workflows/runner.yml index fd5e74b914a..71d8dfbf354 100644 --- a/.github/workflows/runner.yml +++ b/.github/workflows/runner.yml @@ -44,15 +44,3 @@ jobs: name: 🌐 Web needs: static-checks uses: ./.github/workflows/web_builds.yml - - # Third stage: Run auxiliary tests using build artifacts from previous jobs. - - # Can be turned off for PRs that intentionally break compat with godot-cpp, - # until both the upstream PR and the matching godot-cpp changes are merged. - godot-cpp-test: - name: 🪲 Godot CPP - # This can be changed to depend on another platform, if we decide to use it for - # godot-cpp instead. Make sure to move the .github/actions/godot-api-dump step - # appropriately. - needs: linux-build - uses: ./.github/workflows/godot_cpp_test.yml