@@ -24,48 +24,46 @@ jobs:
2424 fail-fast : true
2525 matrix :
2626 include :
27- # Godot Meta Toolkit
28- - name : Godot Meta Toolkit Linux (x86_64)
27+ - name : 🐧 Linux (x86_64)
2928 os : ubuntu-20.04
3029 platform : linux
3130 flags : arch=x86_64
3231 artifact_name : godotmetatoolkit-build-files-linux-x86_64
3332 artifact_path : godot_meta_toolkit/demo/addons/godot_meta_toolkit/.bin/linux/*/*/*.so
3433 cache-name : linux-x86_64
35- - name : Godot Meta Toolkit Windows
34+ - name : 🏁 Windows (x86_64)
3635 os : windows-latest
3736 platform : windows
3837 artifact_name : godotmetatoolkit-build-files-windows
3938 artifact_path : godot_meta_toolkit/demo/addons/godot_meta_toolkit/.bin/windows/*/*/*.dll
4039 cache-name : windows-x86_64
41- - name : Godot Meta Toolkit MacOS
40+ - name : 🍎 MacOS (universal)
4241 os : macos-latest
4342 platform : macos
4443 flags : arch=universal
4544 artifact_name : godotmetatoolkit-build-files-macos
4645 artifact_path : godot_meta_toolkit/demo/addons/godot_meta_toolkit/.bin/macos/*/*.framework
4746 cache-name : macos-universal
48- - name : Godot Meta Toolkit Android
47+ - name : 🤖 Android (arm64)
4948 os : ubuntu-20.04
5049 platform : android
5150 flags : arch=arm64
5251 artifact_name : godotmetatoolkit-build-files-android
5352 artifact_path : |
54- godot_meta_toolkit/demo/addons/godot_meta_toolkit/.bin/android/*/*.aar
5553 godot_meta_toolkit/demo/addons/godot_meta_toolkit/.bin/android/*/*/*.so
5654 cache-name : android
5755
5856 # Note, to satisfy the asset library we need to make sure our zip files have a root folder
5957 # this is why we checkout into godot_meta_toolkit and build into asset
6058 steps :
6159 - name : Checkout
62- uses : actions/checkout@v3
60+ uses : actions/checkout@v4
6361 with :
6462 path : godot_meta_toolkit
6563 submodules : recursive
6664 lfs : ' true'
67- - name : Setup Godot build cache
68- uses : ./godot_meta_toolkit/thirdparty/godot-cpp/.github/actions/godot-cache
65+ - name : Restore Godot build cache
66+ uses : ./godot_meta_toolkit/thirdparty/godot-cpp/.github/actions/godot-cache-restore
6967 with :
7068 cache-name : ${{ matrix.cache-name }}
7169 continue-on-error : true
7472 wget "${{ env.META_PLATFORM_SDK_URL }}" -O meta_platform_sdk.zip
7573 cd godot_meta_toolkit/thirdparty/ovr_platform_sdk
7674 unzip -a ../../../meta_platform_sdk.zip
75+ rm -rf Android/libs/armeabi-v7a
7776 cd ../../..
7877 rm meta_platform_sdk.zip
7978 if : runner.os != 'Windows'
@@ -87,71 +86,76 @@ jobs:
8786 Remove-Item "meta_platform_sdk.zip"
8887 if : runner.os == 'Windows'
8988 - name : Set up Python (for SCons)
90- uses : actions/setup-python@v4
89+ uses : actions/setup-python@v5
9190 with :
9291 python-version : " 3.x"
9392 - name : Android dependencies
9493 uses : nttld/setup-ndk@v1
9594 with :
9695 ndk-version : r23c
9796 link-to-sdk : true
97+ if : matrix.platform == 'android'
9898 - name : Install scons
9999 run : |
100100 python -m pip install scons==4.0.0
101101 - name : Create extension library
102102 run : |
103103 cd godot_meta_toolkit
104- scons platform=${{ matrix.platform }} target=template_debug ${{ matrix.flags }}
105- scons platform=${{ matrix.platform }} target=template_release ${{ matrix.flags }}
104+ scons platform=${{ matrix.platform }} target=template_debug ${{ matrix.flags }} build_profile=thirdparty/godot_cpp_build_profile/build_profile.json
105+ scons platform=${{ matrix.platform }} target=template_release ${{ matrix.flags }} build_profile=thirdparty/godot_cpp_build_profile/build_profile.json
106106 cd ..
107-
108- # On Android we build our loaders and build our extension with gradlew
109- - name : Setup java
110- uses : actions/setup-java@v3
107+ - name : Save Godot build cache
108+ uses : ./godot_meta_toolkit/thirdparty/godot-cpp/.github/actions/godot-cache-save
111109 with :
112- java-version : 17
113- distribution : " adopt"
114- if : matrix.platform == 'android'
115- - name : Validate Gradle wrapper
116- uses : gradle/wrapper-validation-action@v1
117- if : matrix.platform == 'android'
118- - name : Create Godot-CPP library
119- run : |
120- cd godot_meta_toolkit/thirdparty/godot-cpp
121- scons platform=${{ matrix.platform }} target=template_debug arch=arm64
122- scons platform=${{ matrix.platform }} target=template_release arch=arm64
123- scons platform=${{ matrix.platform }} target=template_debug arch=x86_64
124- scons platform=${{ matrix.platform }} target=template_release arch=x86_64
125- cd ../../..
126- if : matrix.platform == 'android'
127- - name : Create Godot Meta Toolkit AARs
128- uses : burrunan/gradle-cache-action@v1
129- with :
130- build-root-directory : godot_meta_toolkit
131- arguments : build
132- if : matrix.platform == 'android'
133-
110+ cache-name : ${{ matrix.cache-name }}
111+ continue-on-error : true
134112 - name : Upload build files (artifacts)
135- uses : actions/upload-artifact@v3
113+ uses : actions/upload-artifact@v4
136114 with :
137115 name : ${{ matrix.artifact_name }}
116+ include-hidden-files : true
138117 path : |
139118 ${{ matrix.artifact_path }}
140119
141- # GODOT 4.2 ADDON GENERATION SECTION
142120 asset :
143121 name : Assembling the asset
144122 runs-on : ubuntu-20.04
145123 needs : build
146124
147- # Steps represent a sequence of tasks that will be executed as part of the job
148125 steps :
149126 - name : Checkout
150- uses : actions/checkout@v3
127+ uses : actions/checkout@v4
151128 with :
152129 path : godot_meta_toolkit
153130 - name : Download all workflow run artifacts
154- uses : actions/download-artifact@v3
131+ uses : actions/download-artifact@v4
132+ - name : Download Meta Platform SDK
133+ run : |
134+ wget "${{ env.META_PLATFORM_SDK_URL }}" -O meta_platform_sdk.zip
135+ cd godot_meta_toolkit/thirdparty/ovr_platform_sdk
136+ unzip -a ../../../meta_platform_sdk.zip
137+ rm -rf Android/libs/armeabi-v7a
138+ cd ../../..
139+ rm meta_platform_sdk.zip
140+ - name : Setup java
141+ uses : actions/setup-java@v4
142+ with :
143+ java-version : 17
144+ distribution : " adopt"
145+ - name : Validate Gradle wrapper
146+ uses : gradle/actions/wrapper-validation@v3
147+ - name : Copy Android binaries
148+ run : |
149+ mkdir -p godot_meta_toolkit/toolkit/src/main/libs/debug/arm64-v8a/arm64-v8a
150+ cp godotmetatoolkit-build-files-android/template_debug/arm64/libgodot_meta_toolkit.so godot_meta_toolkit/toolkit/src/main/libs/debug/arm64-v8a/arm64-v8a/
151+
152+ mkdir -p godot_meta_toolkit/toolkit/src/main/libs/release/arm64-v8a/arm64-v8a
153+ cp godotmetatoolkit-build-files-android/template_release/arm64/libgodot_meta_toolkit.so godot_meta_toolkit/toolkit/src/main/libs/release/arm64-v8a/arm64-v8a/
154+ - name : Create Godot Meta Toolkit AARs
155+ run : |
156+ cd godot_meta_toolkit
157+ ./gradlew build
158+ cd ..
155159 - name : Create Godot Meta Toolkit Addon
156160 run : |
157161 mkdir asset
@@ -172,9 +176,10 @@ jobs:
172176 cp -r godotmetatoolkit-build-files-macos/* asset/addons/godot_meta_toolkit/.bin/macos/
173177
174178 - name : Create Godot Meta Toolkit addon artifact
175- uses : actions/upload-artifact@v3
179+ uses : actions/upload-artifact@v4
176180 with :
177181 name : GodotMetaToolkitAddon
182+ include-hidden-files : true
178183 path : |
179184 asset
180185 - name : Zip addon
@@ -186,6 +191,7 @@ jobs:
186191 with :
187192 allowUpdates : true
188193 artifacts : " godotmetatoolkitaddon.zip"
194+ draft : true
189195 omitNameDuringUpdate : true
190196 omitBodyDuringUpdate : true
191197 omitDraftDuringUpdate : true
0 commit comments