summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2023-04-29 11:56:33 -0500
committerDavid Snopek <dsnopek@gmail.com>2023-05-17 14:08:12 -0500
commit1fd3f82d3a7fc8056eb21bb5910b2c0609c4faea (patch)
treeea095120a11bd75b11b7574703e8cc2097583465 /.github/workflows
parent1c18413de00f1a6265b2b6c30175b2f6a434b574 (diff)
downloadredot-cpp-1fd3f82d3a7fc8056eb21bb5910b2c0609c4faea.tar.gz
Add automated tests that run a GDExtension (rather than just building it)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 062cefa..30c7668 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,6 +22,7 @@ jobs:
platform: linux
artifact-name: godot-cpp-linux-glibc2.27-x86_64-release
artifact-path: bin/libgodot-cpp.linux.template_release.x86_64.a
+ run-tests: true
cache-name: linux-x86_64
- name: 🐧 Linux (GCC, Double Precision)
@@ -30,6 +31,7 @@ jobs:
artifact-name: godot-cpp-linux-glibc2.27-x86_64-double-release
artifact-path: bin/libgodot-cpp.linux.template_release.double.x86_64.a
flags: precision=double
+ run-tests: false
cache-name: linux-x86_64-f64
- name: 🏁 Windows (x86_64, MSVC)
@@ -37,6 +39,7 @@ jobs:
platform: windows
artifact-name: godot-cpp-windows-msvc2019-x86_64-release
artifact-path: bin/libgodot-cpp.windows.template_release.x86_64.lib
+ run-tests: false
cache-name: windows-x86_64-msvc
- name: 🏁 Windows (x86_64, MinGW)
@@ -45,6 +48,7 @@ jobs:
artifact-name: godot-cpp-linux-mingw-x86_64-release
artifact-path: bin/libgodot-cpp.windows.template_release.x86_64.a
flags: use_mingw=yes
+ run-tests: false
cache-name: windows-x86_64-mingw
- name: 🍎 macOS (universal)
@@ -53,6 +57,7 @@ jobs:
artifact-name: godot-cpp-macos-universal-release
artifact-path: bin/libgodot-cpp.macos.template_release.universal.a
flags: arch=universal
+ run-tests: false
cache-name: macos-universal
- name: 🤖 Android (arm64)
@@ -61,6 +66,7 @@ jobs:
artifact-name: godot-cpp-android-arm64-release
artifact-path: bin/libgodot-cpp.android.template_release.arm64.a
flags: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64
+ run-tests: false
cache-name: android-arm64
- name: 🍏 iOS (arm64)
@@ -69,6 +75,7 @@ jobs:
artifact-name: godot-cpp-ios-arm64-release
artifact-path: bin/libgodot-cpp.ios.template_release.arm64.a
flags: arch=arm64
+ run-tests: false
cache-name: ios-arm64
env:
@@ -124,6 +131,31 @@ jobs:
cd test
scons platform=${{ matrix.platform }} target=template_release ${{ matrix.flags }}
+ - name: Download latest Godot artifacts
+ uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
+ if: ${{ matrix.run-tests }}
+ 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: Run tests
+ if: ${{ matrix.run-tests }}
+ run: |
+ chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
+ ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono --headless --version
+ cd test
+ # Need to run the editor so .godot is generated... but it crashes! Ignore that :-)
+ (cd project && (../../godot-artifacts/godot.linuxbsd.editor.x86_64.mono --editor --headless --quit >/dev/null 2>&1 || true))
+ GODOT=../godot-artifacts/godot.linuxbsd.editor.x86_64.mono ./run-tests.sh
+
- name: Upload artifact
uses: actions/upload-artifact@v3
with: