|
@@ -105,18 +105,32 @@ jobs:
|
|
|
hash_dir=false
|
|
|
temporary_dir=${{ env.DEV_DRIVE }}\temp
|
|
|
cache_dir=${{ env.DEV_DRIVE_WORKSPACE }}\.ccache
|
|
|
-
|
|
|
+
|
|
|
+ - name: Check for rerun
|
|
|
+ id: check-rerun
|
|
|
+ run: |
|
|
|
+ # GitHub sets GITHUB_RUN_ATTEMPT to track reruns
|
|
|
+ if ($env:GITHUB_RUN_ATTEMPT -gt 1) {
|
|
|
+ echo "is_rerun=true" >> $env:GITHUB_OUTPUT
|
|
|
+ echo "This is rerun attempt #$env:GITHUB_RUN_ATTEMPT"
|
|
|
+ } else {
|
|
|
+ echo "is_rerun=false" >> $env:GITHUB_OUTPUT
|
|
|
+ echo "This is the first run attempt"
|
|
|
+ }
|
|
|
+
|
|
|
- name: Get last run
|
|
|
# Get the last runid of the target branch of a PR or the current branch
|
|
|
+ # Skip if this is a rerun to either freshly build or get artifacts from existing run
|
|
|
uses: dawidd6/action-download-artifact@07ab29fd4a977ae4d2b275087cf67563dfdf0295 # v9
|
|
|
id: last-run-id
|
|
|
- if: ${{ inputs.last_artifact }}
|
|
|
+ if: ${{ inputs.last_artifact && steps.check-rerun.outputs.is_rerun != 'true' }}
|
|
|
continue-on-error: true
|
|
|
with:
|
|
|
workflow_search: true
|
|
|
workflow_conclusion: ""
|
|
|
branch: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}
|
|
|
search_artifacts: true
|
|
|
+ check_artifacts: true
|
|
|
name: O3DE-${{ inputs.platform }}-${{ inputs.config }}-build
|
|
|
dry_run: true
|
|
|
|
|
@@ -176,7 +190,7 @@ jobs:
|
|
|
# Builds with presets in ../scripts/build/Platform/Windows/build_config.json
|
|
|
# Set temp folders to the workspace drive as the boot drive is slow
|
|
|
working-directory: "${{ env.DEV_DRIVE_WORKSPACE }}"
|
|
|
- timeout-minutes: 310
|
|
|
+ timeout-minutes: 330
|
|
|
run: |
|
|
|
$env:LY_3RDPARTY_PATH = "${{ env.DEV_DRIVE_WORKSPACE }}\3rdParty"
|
|
|
$env:TEMP = "${{ env.DEV_DRIVE }}\temp"
|
|
@@ -194,8 +208,8 @@ jobs:
|
|
|
try {
|
|
|
tar --format=posix -cvpf ${{ env.DEV_DRIVE_WORKSPACE }}\cache.tar `
|
|
|
.ccache `
|
|
|
- .o3de\python `
|
|
|
- 3rdParty\packages `
|
|
|
+ .o3de\python\downloaded_packages `
|
|
|
+ 3rdParty\downloaded_packages `
|
|
|
AutomatedTesting\Cache
|
|
|
} catch {
|
|
|
echo "Warning: Error during tar compression"
|