Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ Explorer/Assets/StreamingAssets/AssetBundles/**/*.meta -filter=lfs -diff=lfs -me
*.asset binary
*.controller binary
*.asset text diff=yaml merge=yaml

# Root-level compiler rsp files must check out byte-identical to what
# scripts/generate-ignore-warnings.sh writes (LF), or its drift check rewrites
# them on CRLF-converting builders and re-triggers a Bee DAG rebuild.
Explorer/Assets/*.rsp text eol=lf

# Shell scripts must check out LF everywhere: CRLF-converting Windows builders
# fail them with "$'\r': command not found" (seen on every Windows cloud build
# running the UBA preBuildScript).
*.sh text eol=lf
4 changes: 3 additions & 1 deletion .github/workflows/build-release-main-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ jobs:
uses: dawidd6/action-download-artifact@v6
with:
run_id: ${{ github.event.workflow_run.id }}
name: Decentraland_.*
# Anchored to the four player zips: Decentraland_.* also matched the multi-GB
# *_debug_symbols artifacts, downloading them only to discard them.
name: Decentraland_(windows64|macos)(_epic)?$
Comment thread
mikhail-dcl marked this conversation as resolved.
name_is_regexp: true
skip_unpack: true

Expand Down
37 changes: 23 additions & 14 deletions .github/workflows/build-unitycloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,19 @@ jobs:
PARAM_IS_RELEASE_BUILD: ${{ inputs.is_release_build }}
PARAM_UNITY_EXTRA_PARAMS: '-disable-assembly-updater'

# Must run before any always() log/report steps: on cancellation GitHub grants a 5-minute
# grace window, and the DELETE that frees the Unity-side queue slot has to win that race
# (a large-log upload ahead of it can eat the whole window). Also runs on failure() so an
# outer-step timeout doesn't leave a Unity-side build holding a slot.
- name: Cancel Unity Cloud build
if: ${{ cancelled() || failure() }}
timeout-minutes: 2
env:
API_KEY: ${{ secrets.UNITY_CLOUD_API_KEY }}
ORG_ID: ${{ secrets.UNITY_CLOUD_ORG_ID }}
PROJECT_ID: ${{ secrets.UNITY_CLOUD_PROJECT_ID }}
run: python -u scripts/cloudbuild/build.py --cancel || true

- name: Locate Windows main executable
if: matrix.target == 'windows64' && (inputs.is_release_build == true || github.event.inputs.force_sign == 'true')
run: |
Expand Down Expand Up @@ -877,14 +890,19 @@ jobs:
echo "[${ARTIFACT_URL}](${ARTIFACT_URL})"
} >> "$GITHUB_STEP_SUMMARY"

# Symbol artifacts have no downstream consumer (Sentry uploads from the on-disk build/
# folder below; release drafting attaches only the player zips) — keep them only where a
# human might need post-hoc symbolication, and never at default retention.
- name: Upload debug symbols
if: ${{ inputs.is_release_build == true }}
uses: actions/upload-artifact@v6
with:
name: ${{ env.artifact_name }}_debug_symbols
path: |
build/**/*_BackUpThisFolder_ButDontShipItWithYourGame
build/**/*_BurstDebugInformation_DoNotShip
if-no-files-found: error
retention-days: 7

- name: Upload debug symbols to Sentry
if: ${{ needs.prebuild.outputs.sentry_enabled == 'true' }}
Expand All @@ -899,22 +917,22 @@ jobs:
--project "$SENTRY_PROJECT" \
"build"

# Will run always (even if failing)
# Runs even on failure, but only once a log actually exists (a run cancelled in-queue
# never writes one, and a guaranteed-failing upload would burn the cancellation grace window).
- name: Upload cloud logs
if: always()
if: ${{ always() && hashFiles('unity_cloud_log.log') != '' }}
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.target }}_${{ needs.prebuild.outputs.install_source }}_unity_log
path: unity_cloud_log.log
if-no-files-found: error

# Will run always (even if failing)
- name: Print cloud logs
if: always()
if: ${{ always() && hashFiles('unity_cloud_log.log') != '' }}
run: cat unity_cloud_log.log

- name: Extract and display errors
if: always()
if: ${{ always() && hashFiles('unity_cloud_log.log') != '' }}
run: |
echo "=== Extracted Errors for ${{ matrix.target }} ${{ needs.prebuild.outputs.install_source }} ==="
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 ${{ matrix.target }} log."
Expand All @@ -931,15 +949,6 @@ jobs:
path: shader_compilation_report.log
if-no-files-found: warn

# Also runs on failure() so an outer-step timeout doesn't leave a Unity-side build holding a slot.
- name: Cancel Unity Cloud build
if: ${{ cancelled() || failure() }}
env:
API_KEY: ${{ secrets.UNITY_CLOUD_API_KEY }}
ORG_ID: ${{ secrets.UNITY_CLOUD_ORG_ID }}
PROJECT_ID: ${{ secrets.UNITY_CLOUD_PROJECT_ID }}
run: python -u scripts/cloudbuild/build.py --cancel || true

build-gate:
name: Build Gate (Windows + macOS)
runs-on: ubuntu-latest
Expand Down
14 changes: 14 additions & 0 deletions Explorer/Assets/csc.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-nowarn:8618
Comment thread
mikhail-dcl marked this conversation as resolved.
-nowarn:8625
-nowarn:8602
-nowarn:8604
-nowarn:8619
-nowarn:8620
-nowarn:8603
-nowarn:8600
-nowarn:8601
-nowarn:0649
-nowarn:0414
-nowarn:0168
-nowarn:0219
-nowarn:8632
7 changes: 7 additions & 0 deletions Explorer/Assets/csc.rsp.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Explorer/Assets/gmcs.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-nowarn:8618
-nowarn:8625
-nowarn:8602
-nowarn:8604
-nowarn:8619
-nowarn:8620
-nowarn:8603
-nowarn:8600
-nowarn:8601
-nowarn:0649
-nowarn:0414
-nowarn:0168
-nowarn:0219
-nowarn:8632
7 changes: 7 additions & 0 deletions Explorer/Assets/gmcs.rsp.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Explorer/Assets/mcs.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-nowarn:8618
-nowarn:8625
-nowarn:8602
-nowarn:8604
-nowarn:8619
-nowarn:8620
-nowarn:8603
-nowarn:8600
-nowarn:8601
-nowarn:0649
-nowarn:0414
-nowarn:0168
-nowarn:0219
-nowarn:8632
7 changes: 7 additions & 0 deletions Explorer/Assets/mcs.rsp.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Explorer/Assets/smcs.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-nowarn:8618
-nowarn:8625
-nowarn:8602
-nowarn:8604
-nowarn:8619
-nowarn:8620
-nowarn:8603
-nowarn:8600
-nowarn:8601
-nowarn:0649
-nowarn:0414
-nowarn:0168
-nowarn:0219
-nowarn:8632
7 changes: 7 additions & 0 deletions Explorer/Assets/smcs.rsp.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Explorer/Assets/us.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-nowarn:8618
-nowarn:8625
-nowarn:8602
-nowarn:8604
-nowarn:8619
-nowarn:8620
-nowarn:8603
-nowarn:8600
-nowarn:8601
-nowarn:0649
-nowarn:0414
-nowarn:0168
-nowarn:0219
-nowarn:8632
7 changes: 7 additions & 0 deletions Explorer/Assets/us.rsp.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion scripts/cloudbuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def cancel_build(id):
except requests.exceptions.RequestException as e:
print(f'Pre-cancel status check failed ({e}); attempting cancel anyway.')

response = requests.delete(f'{URL}/buildtargets/{os.getenv('TARGET')}/builds/{id}', headers=HEADERS)
response = requests.delete(f'{URL}/buildtargets/{os.getenv('TARGET')}/builds/{id}', headers=HEADERS, timeout=30)

if response.status_code == 204:
print('Build canceled successfully')
Expand Down Expand Up @@ -707,6 +707,17 @@ def run_poll_loop(id, build_already_active=False, resumed_build_elapsed=0):
id = build_info["id"]

if args.cancel:
if id is None:
# The runner died between the build POST and the id write; the queued build is
# findable only as the target's latest non-terminal build.
latest = get_latest_build(os.getenv('TARGET'))
if latest and latest.get('buildStatus') not in TERMINAL_STATUSES:
id = latest['build']
print(f'No build id persisted; cancelling latest non-terminal build #{id} on {os.getenv("TARGET")}')
else:
print('No build id persisted and no non-terminal build found; nothing to cancel.')
utils.delete_build_info()
sys.exit(0)
Comment thread
mikhail-dcl marked this conversation as resolved.
cancel_build(id)
utils.delete_build_info()
sys.exit(0)
Expand Down Expand Up @@ -741,6 +752,9 @@ def get_clean_build_bool():
else:
raise ValueError(f"Invalid boolean value for CLEAN_BUILD: {value}")

# Persist the target before the POST: if the runner dies mid-request, --cancel can still
# find the queued build via the target's latest-build lookup.
utils.persist_build_info(os.getenv('TARGET'), None)
id = run_build(os.getenv('BRANCH_NAME'), get_clean_build_bool())
utils.persist_build_info(os.getenv('TARGET'), id)
print(f'For more info and live logs, go to https://cloud.unity.com/ and search for target "{os.getenv('TARGET')}" and build ID "{id}"')
Expand Down
7 changes: 5 additions & 2 deletions scripts/generate-ignore-warnings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ if [[ ! -d "$assets_path" ]]; then
exit 1
fi

# Write suppressions to each .rsp file
# Write suppressions to each .rsp file, but only on content drift: the rsp files are
# timestamp inputs to Bee's build graph, and an unconditional rewrite forces a DAG
# rebuild (IL2CPP + Usym rerun, ~267s) on every otherwise-no-change build.
for file_name in "${rsp_files[@]}"; do
file_path="$assets_path/$file_name"

{
for warning in "${warnings_to_ignore[@]}"; do
echo "-nowarn:$warning"
done
} > "$file_path"
} > "$file_path.tmp"
if cmp -s "$file_path.tmp" "$file_path" 2>/dev/null; then rm -f "$file_path.tmp"; else mv "$file_path.tmp" "$file_path"; fi
Comment thread
mikhail-dcl marked this conversation as resolved.
Outdated
Comment thread
mikhail-dcl marked this conversation as resolved.
Outdated

if [[ $? -eq 0 ]]; then
echo "Successfully generated $file_name with ${#warnings_to_ignore[@]} warning suppressions."
Expand Down
Loading