diff --git a/.github/actions/scons-cache/action.yml b/.github/actions/scons-cache/action.yml new file mode 100644 index 000000000..66e8f8dd1 --- /dev/null +++ b/.github/actions/scons-cache/action.yml @@ -0,0 +1,65 @@ +# base key setup copied from the godot cache action setup +# just added some if statements for only restoring the cache when not on master and only saving when on master + +name: Setup scons cache +description: Setup scons build cache. +inputs: + cache-name: + description: The cache base name (job name by default). + default: "${{github.job}}" + scons-cache: + description: The scons cache path. + default: "${{github.workspace}}/.scons-cache/" + +runs: + using: "composite" + steps: + # Upload cache on completion and check it out now + - name: Load .scons_cache directory + if: ${{ github.ref == 'refs/heads/master' }} + uses: actions/cache@v4 + with: + path: ${{inputs.scons-cache}} + key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + + # We try to match an existing cache to restore from it. Each potential key is checked against + # all existing caches as a prefix. E.g. 'linux-template-minimal' would match any cache that + # starts with "linux-template-minimal", such as "linux-template-minimal-master-refs/heads/master-6588a4a29af1621086feac0117d5d4d37af957fd". + # + # We check these prefixes in this order: + # + # 1. The exact match, including the base branch, the commit reference, and the SHA hash of the commit. + # 2. A partial match for the same base branch and the same commit reference. + # 3. A partial match for the same base branch and the base branch commit reference. + # 4. A partial match for the same base branch only (not ideal, matches any PR with the same base branch). + + restore-keys: | + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-refs/heads/${{env.GODOT_BASE_BRANCH}} + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}} + + # Check out cache but do not upload it at the end + - name: Load .scons_cache directory + if: ${{ github.ref != 'refs/heads/master' }} + uses: actions/cache/restore@v4 # only restores the cache but does not upload it + with: + path: ${{inputs.scons-cache}} + key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + + # We try to match an existing cache to restore from it. Each potential key is checked against + # all existing caches as a prefix. E.g. 'linux-template-minimal' would match any cache that + # starts with "linux-template-minimal", such as "linux-template-minimal-master-refs/heads/master-6588a4a29af1621086feac0117d5d4d37af957fd". + # + # We check these prefixes in this order: + # + # 1. The exact match, including the base branch, the commit reference, and the SHA hash of the commit. + # 2. A partial match for the same base branch and the same commit reference. + # 3. A partial match for the same base branch and the base branch commit reference. + # 4. A partial match for the same base branch only (not ideal, matches any PR with the same base branch). + + restore-keys: | + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-refs/heads/${{env.GODOT_BASE_BRANCH}} + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}} diff --git a/.github/workflows/assemble_export_templates.yml b/.github/workflows/assemble_export_templates.yml index 71e71b2bc..1f50d8d23 100644 --- a/.github/workflows/assemble_export_templates.yml +++ b/.github/workflows/assemble_export_templates.yml @@ -37,6 +37,7 @@ jobs: uses: actions/download-artifact@v4 with: name: export_template_all_ios + path: "./" - name: Move ios export template shell: sh @@ -46,6 +47,7 @@ jobs: uses: actions/download-artifact@v4 with: name: export_template_debug_linux_x86_64 + path: "./" - name: Move linux x86_64 debug export template shell: sh @@ -55,6 +57,7 @@ jobs: uses: actions/download-artifact@v4 with: name: export_template_release_linux_x86_64 + path: "./" - name: Move linux x86_64 release export template shell: sh @@ -64,6 +67,7 @@ jobs: uses: actions/download-artifact@v4 with: name: export_template_debug_windows_x86_64 + path: "./" - name: Move windows x86_64 debug export template shell: sh @@ -73,6 +77,7 @@ jobs: uses: actions/download-artifact@v4 with: name: export_template_release_windows_x86_64 + path: "./" - name: Move windows x86_64 release export template shell: sh @@ -82,6 +87,7 @@ jobs: uses: actions/download-artifact@v4 with: name: export_template_all_macos + path: "./" - name: Move macos export template shell: sh diff --git a/.github/workflows/assemble_ios.yml b/.github/workflows/assemble_ios.yml index 3675f9357..ff9607a7b 100644 --- a/.github/workflows/assemble_ios.yml +++ b/.github/workflows/assemble_ios.yml @@ -29,6 +29,7 @@ jobs: uses: actions/download-artifact@v4 with: name: export_template_ios_all + path: "./" - name: Clone MoltenVK uses: actions/checkout@v4 diff --git a/.github/workflows/assemble_macos.yml b/.github/workflows/assemble_macos.yml index 167289dba..d76646b89 100644 --- a/.github/workflows/assemble_macos.yml +++ b/.github/workflows/assemble_macos.yml @@ -38,11 +38,13 @@ jobs: uses: actions/download-artifact@v4 with: name: editor_${{ matrix.target }}_macos_x86_64 + path: "./" - name: Download ${{ matrix.target }} arm64 editor uses: actions/download-artifact@v4 with: name: editor_${{ matrix.target }}_macos_arm64 + path: "./" - name: Create ${{ matrix.target }} OSX universal binary uses: ./.github/actions/create-macos-universal-binary @@ -129,11 +131,13 @@ jobs: uses: actions/download-artifact@v4 with: name: export_template_${{ matrix.target }}_macos_x86_64 + path: "./" - name: Download ${{ matrix.target }} arm64 export_template uses: actions/download-artifact@v4 with: name: export_template_${{ matrix.target }}_macos_arm64 + path: "./" - name: Create macos universal binary uses: ./.github/actions/create-macos-universal-binary diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index edb070481..53c777414 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -36,10 +36,10 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Setup Godot build cache - uses: ./.github/actions/godot-cache + uses: ./.github/actions/scons-cache continue-on-error: true - name: Setup python and scons @@ -95,6 +95,7 @@ jobs: ls -l bin/ - name: Upload artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: export_template_android_all + path: "bin/*" diff --git a/.github/workflows/build_ios.yml b/.github/workflows/build_ios.yml index 037cd685b..4b3bef588 100644 --- a/.github/workflows/build_ios.yml +++ b/.github/workflows/build_ios.yml @@ -27,7 +27,7 @@ jobs: path: modules/kotlin_jvm - name: Setup Godot build cache - uses: ./.github/actions/godot-cache + uses: ./.github/actions/scons-cache continue-on-error: true - name: Setup python and scons @@ -48,6 +48,7 @@ jobs: target: template_debug - name: Upload artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: export_template_ios_all + path: "bin/*" diff --git a/.github/workflows/build_jvm.yml b/.github/workflows/build_jvm.yml index cc4e31627..e918981ab 100644 --- a/.github/workflows/build_jvm.yml +++ b/.github/workflows/build_jvm.yml @@ -36,7 +36,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Compilation # we build the release bootstrap jar here. Debug gets its own trigger later @@ -44,49 +44,49 @@ jobs: modules/kotlin_jvm/kt/gradlew -p modules/kotlin_jvm/kt/ build -Prelease - name: Upload api-generator artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_api-generator path: modules/kotlin_jvm/kt/api-generator/build/libs/api-generator.jar - name: Upload release bootstrap artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_godot-bootstrap_release path: modules/kotlin_jvm/kt/godot-library/build/libs/godot-bootstrap.jar - name: Upload entry-generator artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_entry-generator path: modules/kotlin_jvm/kt/entry-generation/godot-entry-generator/build/libs/godot-entry-generator-*.jar - name: Upload ksp-symbol-processor artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_ksp-symbol-processor path: modules/kotlin_jvm/kt/entry-generation/godot-kotlin-symbol-processor/build/libs/godot-kotlin-symbol-processor-*.jar - name: Upload gradle-plugin artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_gradle-plugin path: modules/kotlin_jvm/kt/plugins/godot-gradle-plugin/build/libs/godot-gradle-plugin-*.jar - name: Upload intellij-plugin artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_intellij-plugin path: modules/kotlin_jvm/kt/plugins/godot-intellij-plugin/build/distributions/godot-jvm-idea-plugin-*.zip - name: Upload plugins-common artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_plugins-common path: modules/kotlin_jvm/kt/plugins/godot-plugins-common/build/libs/godot-plugins-common-*.jar - name: Upload tools-common artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_tools-common path: modules/kotlin_jvm/kt/tools-common/build/libs/tools-common-*.jar @@ -96,7 +96,7 @@ jobs: modules/kotlin_jvm/kt/gradlew -p modules/kotlin_jvm/kt/ build -Pdebug - name: Upload debug bootstrap artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: jvm_godot-bootstrap_debug path: modules/kotlin_jvm/kt/godot-library/build/libs/godot-bootstrap.jar diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 7216ead63..2a67a58f3 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -55,7 +55,7 @@ jobs: path: modules/kotlin_jvm - name: Setup Godot build cache - uses: ./.github/actions/godot-cache + uses: ./.github/actions/scons-cache with: cache-name: ${{ matrix.cache-name }} continue-on-error: true @@ -77,6 +77,7 @@ jobs: chmod +x bin/godot.* - name: Upload artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: ${{ matrix.cache-name }} + path: "bin/*" diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml index fff5a48b1..5972612a8 100644 --- a/.github/workflows/build_macos.yml +++ b/.github/workflows/build_macos.yml @@ -80,7 +80,7 @@ jobs: path: modules/kotlin_jvm - name: Setup Godot build cache - uses: ./.github/actions/godot-cache + uses: ./.github/actions/scons-cache with: cache-name: ${{ matrix.cache-name }} continue-on-error: true @@ -105,6 +105,7 @@ jobs: chmod +x bin/godot.* - name: Upload artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: ${{ matrix.cache-name }} + path: "bin/*" diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index e67e9c198..9ad8ef0f5 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -64,7 +64,7 @@ jobs: path: modules/kotlin_jvm - name: Setup Godot build cache - uses: ./.github/actions/godot-cache + uses: ./.github/actions/scons-cache with: cache-name: ${{ matrix.cache-name }} continue-on-error: true @@ -92,6 +92,7 @@ jobs: Remove-Item bin/* -Include *.pdb -Force - name: Upload artifact - uses: ./.github/actions/upload-artifact + uses: actions/upload-artifact@v4 with: name: ${{ matrix.cache-name }} + path: "bin/*" diff --git a/.github/workflows/deploy_create_draft_release.yml b/.github/workflows/deploy_create_draft_release.yml index 53f26ee20..2695dae94 100644 --- a/.github/workflows/deploy_create_draft_release.yml +++ b/.github/workflows/deploy_create_draft_release.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Generate changelog shell: sh diff --git a/.github/workflows/deploy_jvm.yml b/.github/workflows/deploy_jvm.yml index da5c940ae..0a5cb10b7 100644 --- a/.github/workflows/deploy_jvm.yml +++ b/.github/workflows/deploy_jvm.yml @@ -45,7 +45,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Publish tools-common shell: sh @@ -112,7 +112,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Deploy intellij plugin ${{ matrix.ij_sdk }} shell: sh diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index 424b92bdd..3ab0e83d5 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -45,16 +45,16 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Download linux editor ${{ matrix.target }} - uses: ./.github/actions/download-artifact + uses: actions/download-artifact@v4 with: name: editor_${{ matrix.target }}_linux_x86_64 path: './bin' - name: Download godot-bootstrap ${{ matrix.bootstrap-target }} - uses: ./.github/actions/download-artifact + uses: actions/download-artifact@v4 with: name: jvm_godot-bootstrap_${{ matrix.bootstrap-target }} path: './bin' diff --git a/.github/workflows/test_macos.yml b/.github/workflows/test_macos.yml index b7b1d1e0c..c24afe9c0 100644 --- a/.github/workflows/test_macos.yml +++ b/.github/workflows/test_macos.yml @@ -45,16 +45,16 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Download macos editor ${{ matrix.target }} - uses: ./.github/actions/download-artifact + uses: actions/download-artifact@v4 with: name: editor_${{ matrix.target }}_macos_universal path: './bin' - name: Download godot-bootstrap ${{ matrix.bootstrap-target }} - uses: ./.github/actions/download-artifact + uses: actions/download-artifact@v4 with: name: jvm_godot-bootstrap_${{ matrix.bootstrap-target }} path: './bin' diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index fab2a13ed..cd31006e4 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -45,16 +45,16 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-read-only: ${{ github.ref != 'refs/heads/master' }} - name: Download windows editor ${{ matrix.target }} - uses: ./.github/actions/download-artifact + uses: actions/download-artifact@v4 with: name: editor_${{ matrix.target }}_windows_x86_64 path: './bin' - name: Download godot-bootstrap ${{ matrix.bootstrap-target }} - uses: ./.github/actions/download-artifact + uses: actions/download-artifact@v4 with: name: jvm_godot-bootstrap_${{ matrix.bootstrap-target }} path: './bin' diff --git a/.github/workflows/trigger_dev.yml b/.github/workflows/trigger_dev.yml new file mode 100644 index 000000000..d422a9d20 --- /dev/null +++ b/.github/workflows/trigger_dev.yml @@ -0,0 +1,98 @@ +name: Dev build and test + +on: + push: + branches: + - '*' # matches every branch that doesn't contain a '/' + - '*/*' # matches every branch containing a single '/' + - '**' # matches every branch + - '!master' # excludes master + +concurrency: + group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-trigger_dev + cancel-in-progress: true + +jobs: + # This job checks if the current commit is part of a pull request + # The output is then used to determine if the subsequent jobs should run (see the `if` in `setup-build-variables`) + # This is needed as github actions does not allow to run on every push except on pull request pushes + # general concept taken from: https://github.com/orgs/community/discussions/27071#discussioncomment-4943026 + get-pr-number: + name: 🔗 Get PR number if present + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + pr-number: ${{ steps.get-pr-number.outputs.pr-number }} + steps: + - uses: actions/github-script@v7 + id: get_issue_number + with: + script: | + if (context.issue.number) { + // Return issue number if present + return context.issue.number; + } else { + // Otherwise return issue number from commit + const data = ( + await github.rest.repos.listPullRequestsAssociatedWithCommit({ + commit_sha: context.sha, + owner: context.repo.owner, + repo: context.repo.repo, + }) + ).data[0]; + + if (data) { + return data.number; + } else { + return ''; + } + } + result-encoding: string + + - id: get-pr-number + run: | + echo "Got PR number: ${{steps.get_issue_number.outputs.result}}" + echo "pr-number=${{steps.get_issue_number.outputs.result}}" >> "$GITHUB_OUTPUT" + + setup-build-variables: + needs: + - get-pr-number + # we only want to run this if we're not in a pull request. + # all subsequent jobs in this workflow depend on this one. So if we don't execute it, they won't be executed either + if: ${{ needs.get-pr-number.outputs['pr-number'] == '' }} + name: 🛠️ Setup build variables + runs-on: ubuntu-latest + steps: + - run: | + echo "Setup done" + outputs: # defined here explicitly, so it only needs to be defined here. All other workflows can just reference it + godot-version: "4.2.2-stable" + jvm-version: "17" + + build-jvm: + name: ☕ Build Jvm + uses: ./.github/workflows/build_jvm.yml + needs: + - setup-build-variables + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} + jvm-version: ${{ needs.setup-build-variables.outputs['jvm-version'] }} + + build-linux: + name: 🐧 Build Linux + uses: ./.github/workflows/build_linux.yml + needs: + - setup-build-variables + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} + + test-linux: + name: 🐧 Test Linux + uses: ./.github/workflows/test_linux.yml + needs: + - setup-build-variables + - build-jvm + - build-linux + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} + jvm-version: ${{ needs.setup-build-variables.outputs['jvm-version'] }} \ No newline at end of file diff --git a/.github/workflows/trigger_on_push_master.yml b/.github/workflows/trigger_on_push_master.yml new file mode 100644 index 000000000..8cbf69b3a --- /dev/null +++ b/.github/workflows/trigger_on_push_master.yml @@ -0,0 +1,74 @@ +name: Master pipeline +on: + push: + branches: + - master + schedule: + - cron: '0 0 * * 1' # run once a week on monday midnight to prevent the cache from being cleared + +concurrency: + group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-trigger_on_push_master + cancel-in-progress: true + +jobs: + setup-build-variables: + # Fake job to define outputs which can be used in the other jobs + name: 🛠️ Setup build variables + runs-on: ubuntu-latest + steps: + - run: | + echo "Setup done" + outputs: # defined here explicitly, so it only needs to be defined here. All other workflows can just reference it + godot-kotlin-jvm-version: "0.9.1-4.2.2" + godot-version: "4.2.2-stable" + jvm-version: "17" + + build-jvm: + name: ☕ Build Jvm + uses: ./.github/workflows/build_jvm.yml + needs: + - setup-build-variables + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} + jvm-version: ${{ needs.setup-build-variables.outputs['jvm-version'] }} + + build-android: + name: 🤖 Build and Assemble Android + uses: ./.github/workflows/build_android.yml + needs: + - setup-build-variables + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} + jvm-version: ${{ needs.setup-build-variables.outputs['jvm-version'] }} + + build-ios: + name: 🍏 Build iOS + uses: ./.github/workflows/build_ios.yml + needs: + - setup-build-variables + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} + + build-linux: + name: 🐧 Build Linux + uses: ./.github/workflows/build_linux.yml + needs: + - setup-build-variables + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} + + build-macos: + name: 🍎 Build macOS + uses: ./.github/workflows/build_macos.yml + needs: + - setup-build-variables + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} + + build-windows: + name: 🪟 Build Windows + uses: ./.github/workflows/build_windows.yml + needs: + - setup-build-variables + with: + godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }} \ No newline at end of file diff --git a/harness/tests/build.gradle.kts b/harness/tests/build.gradle.kts index f5f52755c..98bd2b3c7 100644 --- a/harness/tests/build.gradle.kts +++ b/harness/tests/build.gradle.kts @@ -95,56 +95,61 @@ tasks { dependsOn(importResources) val editorExecutable: String = projectDir - .resolve("../../../../bin") - .listFiles() - ?.also { - println("[${it.joinToString()}]") - } - ?.firstOrNull { it.name.startsWith("godot.") } - ?.absolutePath - ?: throw Exception("Could not find editor executable") + .resolve("../../../../bin") + .listFiles() + ?.also { + println("[${it.joinToString()}]") + } + ?.firstOrNull { it.name.startsWith("godot.") } + ?.absolutePath + ?: throw Exception("Could not find editor executable") var didAllTestsPass = false var isJvmClosed = false val testOutputFile = File("$projectDir/test_output.txt") standardOutput = testOutputFile.outputStream() + errorOutput = testOutputFile.outputStream() doLast { - val outputLines = testOutputFile.readText().split("\n") + val testOutput = testOutputFile.readText() + val outputLines = testOutput.split("\n") outputLines.forEach { line -> when { line.contains("All tests passed") -> { didAllTestsPass = true } + line.contains("JVM GC thread was closed") -> { isJvmClosed = true } } } - if (!didAllTestsPass) { - println(testOutputFile.readText()) - throw Exception("ERROR: Some assertions failed") - } - if (!isJvmClosed) { - throw Exception("ERROR: JVM has not closed properly") + val error = when { + !didAllTestsPass -> Exception("ERROR: Some assertions failed") + !isJvmClosed -> Exception("ERROR: JVM has not closed properly") + else -> null } + + println(testOutput) + + error?.let { throw it } } isIgnoreExitValue = true if (HostManager.hostIsMingw) { commandLine( - "cmd", - "/c", - "$editorExecutable -s --headless --path $projectDir addons/gut/gut_cmdln.gd", + "cmd", + "/c", + "$editorExecutable -s --headless --path $projectDir addons/gut/gut_cmdln.gd", ) } else { commandLine( - "bash", - "-c", - "$editorExecutable -s --headless --path $projectDir addons/gut/gut_cmdln.gd", + "bash", + "-c", + "$editorExecutable -s --headless --path $projectDir addons/gut/gut_cmdln.gd", ) } }