@@ -136,8 +136,7 @@ concurrency:
136136 github.event_name != 'pull_request' ||
137137 github.event.action != 'labeled' ||
138138 github.event.label.name == 'force-build' ||
139- github.event.label.name == 'clean-build' ||
140- github.event.label.name == 'automation-tests'
139+ github.event.label.name == 'clean-build'
141140 }}
142141
143142jobs :
@@ -163,14 +162,12 @@ jobs:
163162 github.event.action == 'ready_for_review' ||
164163 (
165164 github.event.action == 'labeled' &&
166- (github.event.label.name == 'force-build' || github.event.label.name == 'clean-build' || github.event.label.name == 'automation-tests' )
165+ (github.event.label.name == 'force-build' || github.event.label.name == 'clean-build')
167166 )
168167 )
169168 )
170169 )
171170 outputs :
172- should_build : ${{ steps.decide.outputs.should_build }}
173- alttester_build : ${{ steps.decide.outputs.alttester_build }}
174171 commit_sha : ${{ steps.get_commit_sha.outputs.commit_sha }}
175172 options : ${{ steps.get_options.outputs.options }}
176173 version : ${{ github.event.inputs.version || inputs.version || steps.get_version.outputs.full_version }}
@@ -199,54 +196,43 @@ jobs:
199196 run : |
200197 set -euo pipefail
201198
202- should_build=false
203- alttester_build=false
204-
205199 # Non-PR triggers that reached prebuild => build
206200 echo "[check non-PR] event_name='${{ github.event_name }}' != 'pull_request'"
207201 if [ "${{ github.event_name }}" != "pull_request" ]; then
208- echo "[non-PR] TRUE -> should_build=true"
209- should_build=true
210- else
211- labels="${{ join(github.event.pull_request.labels.*.name, ' ') }}"
212- echo "labels='$labels'"
202+ echo "[non-PR] TRUE -> should_build=true -> exiting 0"
203+ exit 0
204+ fi
213205
214- # Check for automation-tests label
215- echo "$labels" | grep -qw 'automation-tests' && alttester_build=true
216- echo "alttester_build='$alttester_build'"
206+ labels="${{ join(github.event.pull_request.labels.*.name, ' ') }}"
207+ echo "labels='$labels'"
217208
218- has_override=false
219- echo "[check override] searching for 'force-build|clean-build' in labels"
220- echo "$labels" | grep -qwE 'force-build|clean-build' && has_override=true
209+ has_override=false
210+ echo "[check override] searching for 'force-build|clean-build' in labels"
211+ echo "$labels" | grep -qwE 'force-build|clean-build' && has_override=true
221212
222- echo "has_override='$has_override'"
223- if [ "$has_override" = "true" ]; then
224- echo "[override] TRUE -> should_build=true"
225- should_build=true
226- else
227- is_draft="${{ github.event.pull_request.draft }}"
228- echo "[check draft] is_draft='$is_draft'"
229- if [ "$is_draft" != "true" ]; then
230- explorer_changed="${{ steps.changed_explorer.outputs.any_changed }}"
231- echo "[check explorer_changed] explorer_changed='$explorer_changed'"
232- if [ "$explorer_changed" = "true" ]; then
233- echo "[explorer_changed] TRUE -> should_build=true"
234- should_build=true
235- fi
236- fi
237- fi
213+ echo "has_override='$has_override'"
214+ if [ "$has_override" = "true" ]; then
215+ echo "[override] TRUE -> should_build=true -> exiting 0"
216+ exit 0
238217 fi
239218
240- echo "should_build=$should_build" >> $GITHUB_OUTPUT
241- echo "alttester_build=$alttester_build" >> $GITHUB_OUTPUT
242-
243- # If neither build is needed, fail to skip downstream jobs
244- if [ "$should_build" = "false" ] && [ "$alttester_build" = "false" ]; then
245- echo "No builds needed, skipping"
219+ # If still draft and no override => do not build
220+ is_draft="${{ github.event.pull_request.draft }}"
221+ echo "[check draft] is_draft='$is_draft'"
222+ if [ "$is_draft" = "true" ]; then
223+ echo "[draft] TRUE -> should_build=false -> exiting 1"
246224 exit 1
247225 fi
248226
249- echo "should_build=$should_build, alttester_build=$alttester_build"
227+ explorer_changed="${{ steps.changed_explorer.outputs.any_changed }}"
228+ echo "[check explorer_changed] explorer_changed='$explorer_changed'"
229+ if [ "$explorer_changed" = "true" ]; then
230+ echo "[explorer_changed] TRUE -> should_build=true -> exiting 0"
231+ exit 0
232+ fi
233+
234+ echo "[explorer_changed] FALSE -> should_build=false -> exiting 1"
235+ exit 1
250236
251237 - name : Get commit SHA
252238 id : get_commit_sha
@@ -366,7 +352,6 @@ jobs:
366352 name : Build
367353 runs-on : ubuntu-latest
368354 needs : prebuild
369- if : needs.prebuild.outputs.should_build == 'true'
370355 timeout-minutes : 360
371356 strategy :
372357 fail-fast : false
@@ -428,6 +413,7 @@ jobs:
428413 PARAM_SENTRY_ENABLED : ${{ needs.prebuild.outputs.sentry_enabled }}
429414 PARAM_SEGMENT_WRITE_KEY : ${{ secrets.SEGMENT_WRITE_KEY }}
430415 PARAM_INSTALL_SOURCE : ${{ needs.prebuild.outputs.install_source }}
416+ PARAM_IS_RELEASE_BUILD : ${{ inputs.is_release_build }}
431417 PARAM_UNITY_EXTRA_PARAMS : ' -disable-assembly-updater'
432418
433419 - name : ' Tar artifact to maintain original permissions'
@@ -715,119 +701,3 @@ jobs:
715701 ORG_ID : ${{ secrets.UNITY_CLOUD_ORG_ID }}
716702 PROJECT_ID : ${{ secrets.UNITY_CLOUD_PROJECT_ID }}
717703 run : python -u scripts/cloudbuild/build.py --cancel
718-
719- build-alttester :
720- name : Build (AltTester)
721- runs-on : ubuntu-latest
722- needs : prebuild
723- if : needs.prebuild.outputs.alttester_build == 'true'
724- timeout-minutes : 360
725- steps :
726- - name : Checkout code
727- uses : actions/checkout@v4
728- with :
729- fetch-depth : 0
730- ref : ${{ github.event.pull_request.head.ref || github.ref_name }}
731-
732- - name : Setup python
733- uses : actions/setup-python@v5
734- with :
735- python-version : 3.12.3
736-
737- - name : Install dependencies
738- run : |
739- python -m pip install --upgrade pip
740- pip install -r scripts/cloudbuild/requirements.txt
741-
742- - name : Execute Unity Cloud build (AltTester instrumented)
743- uses : nick-fields/retry@v3
744- with :
745- timeout_minutes : 180
746- max_attempts : 2
747- retry_on_exit_code : 99
748- retry_wait_seconds : 30
749- on_retry_command : |
750- echo "::warning::🔁 Unity Cloud Build (AltTester) retry triggered at $(date '+%Y-%m-%d %H:%M:%S')"
751- command : |
752- echo "🔧 Starting Unity Cloud Build (AltTester) attempt at $(date '+%Y-%m-%d %H:%M:%S')"
753- python -u scripts/cloudbuild/build.py
754- env :
755- API_KEY : ${{ secrets.UNITY_CLOUD_API_KEY }}
756- ORG_ID : ${{ secrets.UNITY_CLOUD_ORG_ID }}
757- PROJECT_ID : ${{ secrets.UNITY_CLOUD_PROJECT_ID }}
758- POLL_TIME : 60
759- GLOBAL_TIMEOUT : 10800
760- TARGET : t_windows64
761- BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
762- COMMIT_SHA : ${{ needs.prebuild.outputs.commit_sha }}
763- BUILD_OPTIONS : ' Development,CompressWithLz4HC'
764- CLEAN_BUILD : false
765- CACHE_STRATEGY : ${{ needs.prebuild.outputs.cache_strategy }}
766- IS_RELEASE_BUILD : false
767- TARGET_NAME_SUFFIX : alttester
768- PARAM_BUILD_VERSION : ${{ needs.prebuild.outputs.version }}
769- PARAM_SENTRY_ENABLED : false
770- PARAM_INSTALL_SOURCE : launcher
771- PARAM_ALTTESTER_BUILD : ' true'
772- PARAM_UNITY_EXTRA_PARAMS : ' -disable-assembly-updater'
773-
774- - name : Upload artifact
775- uses : actions/upload-artifact@v4
776- with :
777- name : Decentraland_windows64_alttester
778- path : |
779- build
780- !build/**/*_BackUpThisFolder_ButDontShipItWithYourGame
781- !build/**/*_BurstDebugInformation_DoNotShip
782- if-no-files-found : error
783-
784- - name : Set SHA and branch
785- run : |
786- echo "SHA_SHORT=$(echo ${{ needs.prebuild.outputs.commit_sha }} | cut -c1-7)" >> $GITHUB_ENV
787- echo "SAFE_BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" >> $GITHUB_ENV
788-
789- - name : Compress and upload to S3
790- env :
791- AWS_ACCESS_KEY_ID : ${{ secrets.EXPLORER_TEAM_AWS_ACCESS_KEY_ID }}
792- AWS_SECRET_ACCESS_KEY : ${{ secrets.EXPLORER_TEAM_AWS_SECRET_ACCESS_KEY }}
793- EXPLORER_TEAM_S3_BUCKET : ${{ secrets.EXPLORER_TEAM_S3_BUCKET }}
794- DESTINATION_PATH : " @dcl/${{ github.event.repository.name }}/branch/${{ env.SAFE_BRANCH_NAME }}/pr-${{ github.run_number }}-${{ env.SHA_SHORT }}"
795- run : |
796- mkdir -p upload_to_s3
797- cd build
798- zip -r ../upload_to_s3/Decentraland_windows64_alttester.zip . \
799- -x "*_BackUpThisFolder_ButDontShipItWithYourGame**" \
800- -x "*_BurstDebugInformation_DoNotShip**"
801- cd ..
802- npx @dcl/cdn-uploader@next \
803- --bucket $EXPLORER_TEAM_S3_BUCKET \
804- --local-folder upload_to_s3 \
805- --bucket-folder $DESTINATION_PATH
806-
807- # Will run always (even if failing)
808- - name : Upload cloud logs
809- if : always()
810- uses : actions/upload-artifact@v4
811- with :
812- name : windows64_alttester_unity_log
813- path : unity_cloud_log.log
814- if-no-files-found : error
815-
816- - name : Print cloud logs
817- if : always()
818- run : cat unity_cloud_log.log
819-
820- - name : Extract and display errors
821- if : always()
822- run : |
823- echo "=== Extracted Errors for windows64 alttester ==="
824- grep -iE "error c|fatal" unity_cloud_log.log | sed 's/^/\x1b[31m/' | sed 's/$/\x1b[0m/' || echo "No 'error c' or 'fatal' errors found in alttester log."
825-
826- # Will run on cancel or timeout only
827- - name : Cancel Unity Cloud build
828- if : ${{ cancelled() }}
829- env :
830- API_KEY : ${{ secrets.UNITY_CLOUD_API_KEY }}
831- ORG_ID : ${{ secrets.UNITY_CLOUD_ORG_ID }}
832- PROJECT_ID : ${{ secrets.UNITY_CLOUD_PROJECT_ID }}
833- run : python -u scripts/cloudbuild/build.py --cancel
0 commit comments