11name : Continuous integration
2- on : [push, pull_request]
2+ on :
3+ workflow_call :
34
45env :
56 # Only used for the cache key. Increment version to force clean build.
89 GODOT_TEST_VERSION : master
910
1011concurrency :
11- group : ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
12+ group : ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}
1213 cancel-in-progress : true
1314
1415jobs :
9192 env :
9293 SCONS_CACHE : ${{ github.workspace }}/.scons-cache/
9394 EM_VERSION : 3.1.39
94- EM_CACHE_FOLDER : " emsdk-cache"
95+ EM_CACHE_FOLDER : emsdk-cache
9596
9697 steps :
9798 - name : Checkout
@@ -108,24 +109,24 @@ jobs:
108109 - name : Set up Python (for SCons)
109110 uses : actions/setup-python@v5
110111 with :
111- python-version : ' 3.x'
112+ python-version : 3.x
112113
113114 - name : Android dependencies
114- if : ${{ matrix.platform == 'android' }}
115+ if : matrix.platform == 'android'
115116 uses : nttld/setup-ndk@v1
116117 with :
117118 ndk-version : r23c
118119 link-to-sdk : true
119120
120121 - name : Web dependencies
121- if : ${{ matrix.platform == 'web' }}
122+ if : matrix.platform == 'web'
122123 uses : mymindstorm/setup-emsdk@v14
123124 with :
124- version : ${{env.EM_VERSION}}
125- actions-cache-folder : ${{env.EM_CACHE_FOLDER}}
125+ version : ${{ env.EM_VERSION }}
126+ actions-cache-folder : ${{ env.EM_CACHE_FOLDER }}
126127
127128 - name : Setup MinGW for Windows/MinGW build
128- if : ${{ matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes' }}
129+ if : matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes'
129130 uses : egor-tensin/setup-mingw@v2
130131 with :
131132 version : 12.2.0
@@ -161,7 +162,7 @@ jobs:
161162
162163 - name : Download latest Godot artifacts
163164 uses : dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
164- if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
165+ if : matrix.run-tests && env.GODOT_TEST_VERSION == 'master'
165166 with :
166167 repo : godotengine/godot
167168 branch : master
@@ -175,21 +176,21 @@ jobs:
175176 path : godot-artifacts
176177
177178 - name : Prepare Godot artifacts for testing
178- if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
179+ if : matrix.run-tests && env.GODOT_TEST_VERSION == 'master'
179180 run : |
180181 chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
181182 echo "GODOT=$(pwd)/godot-artifacts/godot.linuxbsd.editor.x86_64.mono" >> $GITHUB_ENV
182183
183184 - name : Download requested Godot version for testing
184- if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION != 'master' }}
185+ if : matrix.run-tests && env.GODOT_TEST_VERSION != 'master'
185186 run : |
186187 wget "https://github.com/godotengine/godot-builds/releases/download/${GODOT_TEST_VERSION}/Godot_v${GODOT_TEST_VERSION}_linux.x86_64.zip" -O Godot.zip
187188 unzip -a Godot.zip
188189 chmod +x "Godot_v${GODOT_TEST_VERSION}_linux.x86_64"
189190 echo "GODOT=$(pwd)/Godot_v${GODOT_TEST_VERSION}_linux.x86_64" >> $GITHUB_ENV
190191
191192 - name : Run tests
192- if : ${{ matrix.run-tests }}
193+ if : matrix.run-tests
193194 run : |
194195 $GODOT --headless --version
195196 cd test
0 commit comments