Skip to content

Commit

Permalink
merged main and resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
popuz committed Sep 16, 2024
2 parents e97692b + 28ba5bc commit bc126a3
Show file tree
Hide file tree
Showing 1,016 changed files with 35,794 additions and 6,466 deletions.
48 changes: 43 additions & 5 deletions .github/workflows/build-unitycloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ on:
required: true
type: string
default: 'none'
cache:
clean_build:
required: true
default: true
type: boolean
cache_strategy:
required: true
default: 'workspace'
default: 'library'
type: string
version:
required: true
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
elif [ "${{ inputs.cache_strategy }}" ]; then
cache_strategy=${{ inputs.cache_strategy }}
else
cache_strategy='workspace'
cache_strategy='library'
fi
echo "cache_strategy=${cache_strategy}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
name: Build
runs-on: ubuntu-latest
needs: prebuild
timeout-minutes: 180
timeout-minutes: 360
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -228,7 +228,20 @@ jobs:

run: python -u scripts/cloudbuild/build.py

- name: Upload artifact
- name: 'Tar artifact to maintain original permissions'
if: matrix.target == 'macos'
run: tar --exclude='build/Decentraland_BackUpThisFolder_ButDontShipItWithYourGame' -cvf build.tar build

- name: Upload artifact for macOS
if: matrix.target == 'macos'
uses: actions/upload-artifact@v4
with:
name: Decentraland_${{ matrix.target }}
path: build.tar
if-no-files-found: error

- name: Upload artifact for Windows
if: matrix.target == 'windows64'
uses: actions/upload-artifact@v4
with:
name: Decentraland_${{ matrix.target }}
Expand All @@ -237,6 +250,15 @@ jobs:
!build/**/*_BackUpThisFolder_ButDontShipItWithYourGame
!build/**/*_BurstDebugInformation_DoNotShip
if-no-files-found: error

- name: Upload debug symbols
uses: actions/upload-artifact@v4
with:
name: Decentraland_${{ matrix.target }}_debug_symbols
path: |
build/**/*_BackUpThisFolder_ButDontShipItWithYourGame
build/**/*_BurstDebugInformation_DoNotShip
if-no-files-found: error

# Will run always (even if failing)
- name: Upload cloud logs
Expand All @@ -252,6 +274,22 @@ jobs:
if: always()
run: cat unity_cloud_log.log

# Will run always (even if failing)
- name: Generate Shader Compilation Report
if: always()
shell: pwsh
run: |
./scripts/Generate-ShaderReport.ps1 -InputLog "unity_cloud_log.log" -OutputReport "shader_compilation_report.log"
# Upload Shader Compilation Report
- name: Upload Shader Compilation Report
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}_shader_compilation_report
path: shader_compilation_report.log
if-no-files-found: error

# Will run on cancel or timeout only
- name: Cancel Unity Cloud build
if: ${{ cancelled() }}
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/trigger_clean_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Trigger Clean Build

on:
workflow_dispatch:
inputs:
branch_name:
description: 'Branch name to build'
required: true
type: string

jobs:
trigger_clean_build:
runs-on: ubuntu-latest
steps:
- name: Trigger Unity Cloud Build workflow
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
console.log('Attempting to dispatch workflow for branch: ${{ github.event.inputs.branch_name }}');
const result = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build-unitycloud.yml',
ref: '${{ github.event.inputs.branch_name }}',
inputs: {
clean_build: 'true'
}
});
console.log('Workflow dispatch result:', result.status);
} catch (error) {
console.error('Error dispatching workflow:', error.message);
core.setFailed(error.message);
}
Loading

0 comments on commit bc126a3

Please sign in to comment.