fix: missing exotic rarity background #2449
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unity Cloud Build | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
pull_request_target: | |
types: | |
- labeled | |
merge_group: {} | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
profile: | |
description: 'Select level of profiling' | |
required: true | |
default: 'none' | |
type: choice | |
options: | |
- none | |
- profile | |
- deep | |
cache: | |
description: 'Enable to use workspace caching in cloud runners' | |
required: false | |
default: true | |
type: boolean | |
cache_strategy: | |
description: 'Select cache strategy' | |
required: true | |
default: 'workspace' | |
type: choice | |
options: | |
- none | |
- library | |
- workspace | |
- inherit | |
version: | |
description: 'Override for build version to use' | |
required: false | |
default: '' | |
type: string | |
workflow_call: | |
inputs: | |
profile: | |
required: true | |
type: string | |
default: 'none' | |
cache: | |
required: true | |
default: true | |
type: boolean | |
cache_strategy: | |
required: true | |
default: 'workspace' | |
type: string | |
version: | |
required: true | |
type: string | |
sentry_enabled: | |
required: false | |
type: boolean | |
default: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
prebuild: | |
name: Prebuild | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
if: | | |
(github.ref == 'refs/heads/main') || | |
(github.event_name == 'pull_request' && !github.event.pull_request.draft) || | |
(github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'force-build') | |
outputs: | |
commit_sha: ${{ steps.get_commit_sha.outputs.commit_sha }} | |
options: ${{ steps.get_options.outputs.options }} | |
version: ${{ github.event.inputs.version || inputs.version || steps.get_version.outputs.full_version }} | |
sentry_environment: ${{ steps.get_sentry.outputs.environment }} | |
sentry_upload_symbols: ${{ steps.get_sentry.outputs.upload_symbols }} | |
sentry_enabled: ${{ steps.get_sentry.outputs.sentry_enabled }} | |
use_cache: ${{ steps.set_defaults.outputs.use_cache }} | |
cache_strategy: ${{ steps.set_defaults.outputs.cache_strategy }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version | |
id: get_version | |
if: ${{ github.event.inputs.version == '' && inputs.version == '' }} | |
uses: ./.github/actions/version | |
- name: Get commit SHA | |
id: get_commit_sha | |
run: echo "commit_sha=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT | |
- name: Get Sentry parameters | |
id: get_sentry | |
run: | | |
#!/bin/bash | |
if [[ "${{ github.event.inputs.sentry_enabled || inputs.sentry_enabled }}" == "true" ]]; then | |
echo "environment=production" >> "$GITHUB_OUTPUT" | |
echo "upload_symbols=true" >> "$GITHUB_OUTPUT" | |
echo "sentry_enabled=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "environment=" >> "$GITHUB_OUTPUT" | |
echo "upload_symbols=false" >> "$GITHUB_OUTPUT" | |
echo "sentry_enabled=false" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Set default values | |
id: set_defaults | |
run: | | |
if [ "${{ github.event.inputs.cache }}" ]; then | |
use_cache=${{ github.event.inputs.cache }} | |
elif [ "${{ inputs.cache }}" ]; then | |
use_cache=${{ inputs.cache }} | |
else | |
use_cache='true' | |
fi | |
echo "use_cache=${use_cache}" >> $GITHUB_OUTPUT | |
if [ "${{ github.event.inputs.cache_strategy }}" ]; then | |
cache_strategy=${{ github.event.inputs.cache_strategy }} | |
elif [ "${{ inputs.cache_strategy }}" ]; then | |
cache_strategy=${{ inputs.cache_strategy }} | |
else | |
cache_strategy='workspace' | |
fi | |
echo "cache_strategy=${cache_strategy}" >> $GITHUB_OUTPUT | |
- name: Get BuildOptions | |
id: get_options | |
run: | | |
#!/bin/bash | |
#options=("DetailedBuildReport") | |
options=() | |
# input.profile | |
profile="${{ github.event.inputs.profile || inputs.profile }}" | |
if [[ "$profile" == "profile" || "$profile" == "deep" ]]; then | |
options+=("Development") | |
options+=("AllowDebugging") | |
options+=("ConnectWithProfiler") | |
fi | |
if [[ "$profile" == "deep" ]]; then | |
options+=("EnableDeepProfilingSupport") | |
fi | |
# Write the array as a comma-separated string | |
# Set the Internal Field Separator to comma | |
IFS=, | |
echo "options=${options[*]}" >> "$GITHUB_OUTPUT" | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: prebuild | |
timeout-minutes: 180 | |
strategy: | |
fail-fast: false | |
matrix: | |
target: ['windows64', 'macos'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12.3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r scripts/cloudbuild/requirements.txt | |
- name: Execute Unity Cloud build | |
env: | |
API_KEY: ${{ secrets.UNITY_CLOUD_API_KEY }} | |
ORG_ID: ${{ secrets.UNITY_CLOUD_ORG_ID }} | |
PROJECT_ID: ${{ secrets.UNITY_CLOUD_PROJECT_ID }} | |
POLL_TIME: 60 # In seconds (int) | |
TARGET: t_${{ matrix.target }} | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
COMMIT_SHA: ${{ needs.prebuild.outputs.commit_sha }} | |
BUILD_OPTIONS: ${{ needs.prebuild.outputs.options }} | |
USE_CACHE: ${{ needs.prebuild.outputs.use_cache }} | |
CACHE_STRATEGY: ${{ needs.prebuild.outputs.cache_strategy }} #Possible values: { none, library, workspace, inherit } | |
# Any ENV variables starting with "PARAM_" will be passed to Unity without the prefix | |
# (The "PARAM_" prefix exists to allow any future values config-free) | |
# e.g.: PARAM_ALLOW_DEBUG -> In Unity will be available as "ALLOW_DEBUG" | |
# e.g.: Editor.CloudBuild.Parameters["ALLOW_DEBUG"] | |
PARAM_BUILD_VERSION: ${{ needs.prebuild.outputs.version }} | |
PARAM_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
PARAM_SENTRY_ENVIRONMENT: ${{ needs.prebuild.outputs.sentry_environment }} | |
PARAM_SENTRY_CLI_AUTH_TOKEN: ${{ secrets.SENTRY_CLI_AUTH_TOKEN }} | |
PARAM_SENTRY_ENABLED: ${{ needs.prebuild.outputs.sentry_enabled }} | |
PARAM_SENTRY_UPLOAD_DEBUG_SYMBOLS: ${{ needs.prebuild.outputs.sentry_upload_symbols }} | |
PARAM_SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }} | |
run: python -u scripts/cloudbuild/build.py | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Decentraland_${{ matrix.target }} | |
path: | | |
build | |
!build/**/*_BackUpThisFolder_ButDontShipItWithYourGame | |
!build/**/*_BurstDebugInformation_DoNotShip | |
if-no-files-found: error | |
# Will run always (even if failing) | |
- name: Upload cloud logs | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.target }}_unity_log | |
path: unity_cloud_log.log | |
if-no-files-found: error | |
# Will run always (even if failing) | |
- name: Print cloud logs | |
if: always() | |
run: cat unity_cloud_log.log | |
# Will run on cancel or timeout only | |
- name: Cancel Unity Cloud build | |
if: ${{ cancelled() }} | |
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 |