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.
1112 LC_ALL : en_US.UTF-8
1213
1314concurrency :
14- group : ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
15+ group : ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}
1516 cancel-in-progress : true
1617
1718jobs :
9495 env :
9596 SCONS_CACHE : ${{ github.workspace }}/.scons-cache/
9697 EM_VERSION : 3.1.39
97- EM_CACHE_FOLDER : " emsdk-cache"
98+ EM_CACHE_FOLDER : emsdk-cache
9899
99100 steps :
100101 - name : Checkout
@@ -111,24 +112,24 @@ jobs:
111112 - name : Set up Python (for SCons)
112113 uses : actions/setup-python@v5
113114 with :
114- python-version : ' 3.x'
115+ python-version : 3.x
115116
116117 - name : Android dependencies
117- if : ${{ matrix.platform == 'android' }}
118+ if : matrix.platform == 'android'
118119 uses : nttld/setup-ndk@v1
119120 with :
120121 ndk-version : r23c
121122 link-to-sdk : true
122123
123124 - name : Web dependencies
124- if : ${{ matrix.platform == 'web' }}
125+ if : matrix.platform == 'web'
125126 uses : mymindstorm/setup-emsdk@v14
126127 with :
127- version : ${{env.EM_VERSION}}
128- actions-cache-folder : ${{env.EM_CACHE_FOLDER}}
128+ version : ${{ env.EM_VERSION }}
129+ actions-cache-folder : ${{ env.EM_CACHE_FOLDER }}
129130
130131 - name : Setup MinGW for Windows/MinGW build
131- if : ${{ matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes' }}
132+ if : matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes'
132133 uses : egor-tensin/setup-mingw@v2
133134 with :
134135 version : 12.2.0
@@ -164,7 +165,7 @@ jobs:
164165
165166 - name : Download latest Godot artifacts
166167 uses : dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
167- if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
168+ if : matrix.run-tests && env.GODOT_TEST_VERSION == 'master'
168169 with :
169170 repo : godotengine/godot
170171 branch : master
@@ -178,21 +179,21 @@ jobs:
178179 path : godot-artifacts
179180
180181 - name : Prepare Godot artifacts for testing
181- if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
182+ if : matrix.run-tests && env.GODOT_TEST_VERSION == 'master'
182183 run : |
183184 chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
184185 echo "GODOT=$(pwd)/godot-artifacts/godot.linuxbsd.editor.x86_64.mono" >> $GITHUB_ENV
185186
186187 - name : Download requested Godot version for testing
187- if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION != 'master' }}
188+ if : matrix.run-tests && env.GODOT_TEST_VERSION != 'master'
188189 run : |
189190 wget "https://github.com/godotengine/godot-builds/releases/download/${GODOT_TEST_VERSION}/Godot_v${GODOT_TEST_VERSION}_linux.x86_64.zip" -O Godot.zip
190191 unzip -a Godot.zip
191192 chmod +x "Godot_v${GODOT_TEST_VERSION}_linux.x86_64"
192193 echo "GODOT=$(pwd)/Godot_v${GODOT_TEST_VERSION}_linux.x86_64" >> $GITHUB_ENV
193194
194195 - name : Run tests
195- if : ${{ matrix.run-tests }}
196+ if : matrix.run-tests
196197 run : |
197198 $GODOT --headless --version
198199 cd test
0 commit comments