build: free up macos disk space as soon as possible (#43545)
* chore: free up macos disk space as soon as possible Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * build: free up disk space on gn check too 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
01f11a9169
commit
d7816993b9
2 changed files with 23 additions and 0 deletions
|
@ -82,6 +82,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Free up space (macOS)
|
||||||
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
|
uses: ./src/electron/.github/actions/free-space-macos
|
||||||
|
- name: Check disk space after freeing up space
|
||||||
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
|
run: df -h
|
||||||
- name: Setup Node.js/npm
|
- name: Setup Node.js/npm
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
|
||||||
|
|
|
@ -54,6 +54,23 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Cleanup disk space on macOS
|
||||||
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p $TMPDIR/del-target
|
||||||
|
|
||||||
|
tmpify() {
|
||||||
|
if [ -d "$1" ]; then
|
||||||
|
sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
tmpify /Library/Developer/CoreSimulator
|
||||||
|
tmpify ~/Library/Developer/CoreSimulator
|
||||||
|
sudo rm -rf $TMPDIR/del-target
|
||||||
|
- name: Check disk space after freeing up space
|
||||||
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
|
run: df -h
|
||||||
- name: Install Build Tools
|
- name: Install Build Tools
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
- name: Init Build Tools
|
- name: Init Build Tools
|
||||||
|
|
Loading…
Add table
Reference in a new issue