build: fixup windows source cache for release (#46270)
* build: fixup ffmpeg gn gen Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * build: add build-tools depot_tools to PATH There are some cases where it is still expected that depot_tools be in the path Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * put back regular gn gen for ffmpeg Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * build: add retry to moving source cache This resolves the error: `Move-Item : The process cannot access the file because it is being used by another process.` Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
06ad763412
commit
12d11c09a1
3 changed files with 25 additions and 14 deletions
2
.github/actions/build-electron/action.yml
vendored
2
.github/actions/build-electron/action.yml
vendored
|
@ -185,7 +185,7 @@ runs:
|
||||||
if: ${{ inputs.is-release == 'true' }}
|
if: ${{ inputs.is-release == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
e d gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true $GN_EXTRA_ARGS"
|
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true $GN_EXTRA_ARGS"
|
||||||
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg -j $NUMBER_OF_NINJA_PROCESSES
|
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
- name: Generate Hunspell Dictionaries ${{ inputs.step-suffix }}
|
- name: Generate Hunspell Dictionaries ${{ inputs.step-suffix }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -19,3 +19,4 @@ runs:
|
||||||
e d cipd.bat --version
|
e d cipd.bat --version
|
||||||
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
|
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
|
||||||
fi
|
fi
|
||||||
|
echo "$HOME/.electron_build_tools/third_party/depot_tools" >> $GITHUB_PATH
|
||||||
|
|
36
.github/actions/restore-cache-azcopy/action.yml
vendored
36
.github/actions/restore-cache-azcopy/action.yml
vendored
|
@ -97,18 +97,28 @@ runs:
|
||||||
$TEMP_DIR=New-Item -ItemType Directory -Path temp-cache
|
$TEMP_DIR=New-Item -ItemType Directory -Path temp-cache
|
||||||
$TEMP_DIR_PATH = $TEMP_DIR.FullName
|
$TEMP_DIR_PATH = $TEMP_DIR.FullName
|
||||||
C:\ProgramData\Chocolatey\bin\7z.exe -y x $src_cache -o"$TEMP_DIR_PATH"
|
C:\ProgramData\Chocolatey\bin\7z.exe -y x $src_cache -o"$TEMP_DIR_PATH"
|
||||||
if (Test-Path "temp-cache\src") {
|
|
||||||
Write-Host "Relocating Cache"
|
|
||||||
Remove-Item -Recurse -Force src
|
|
||||||
Move-Item temp-cache\src src
|
|
||||||
|
|
||||||
Write-Host "Deleting zip file"
|
- name: Move Src Cache (Windows)
|
||||||
Remove-Item -Force $src_cache
|
if: ${{ inputs.target-platform == 'win' }}
|
||||||
}
|
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
|
||||||
if (-Not (Test-Path "src\third_party\blink")) {
|
with:
|
||||||
Write-Host "Cache was not correctly restored - exiting"
|
timeout_minutes: 30
|
||||||
exit 1
|
max_attempts: 3
|
||||||
}
|
retry_on: error
|
||||||
|
shell: powershell
|
||||||
|
command: |
|
||||||
|
if (Test-Path "temp-cache\src") {
|
||||||
|
Write-Host "Relocating Cache"
|
||||||
|
Remove-Item -Recurse -Force src
|
||||||
|
Move-Item temp-cache\src src
|
||||||
|
|
||||||
Write-Host "Wiping Electron Directory"
|
Write-Host "Deleting zip file"
|
||||||
Remove-Item -Recurse -Force src\electron
|
Remove-Item -Force $src_cache
|
||||||
|
}
|
||||||
|
if (-Not (Test-Path "src\third_party\blink")) {
|
||||||
|
Write-Host "Cache was not correctly restored - exiting"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Wiping Electron Directory"
|
||||||
|
Remove-Item -Recurse -Force src\electron
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue