Skip to content

Commit 90b9b29

Browse files
committed
Merge branch 'master' into 2022.3-urp
2 parents 1ff8397 + 3d2c3c8 commit 90b9b29

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,24 @@ jobs:
7373
if: ${{ github.ref == 'refs/heads/master' || needs.variables.outputs.TAG != needs.variables.outputs.UNITY_VERSION }}
7474
needs: [ variables ]
7575
runs-on: ubuntu-latest
76-
strategy:
77-
fail-fast: false
7876
steps:
7977
- uses: actions/checkout@v4
8078
with:
8179
fetch-depth: 0
8280
lfs: true
8381

82+
# Avoid running into space issues for github runners - Docker images can take up quite some space
83+
- name: Free Disk Space
84+
run: |
85+
echo "Disk space before cleanup:"
86+
df -h
87+
sudo rm -rf /usr/share/dotnet
88+
sudo rm -rf /opt/ghc
89+
sudo rm -rf /usr/local/share/boost
90+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
91+
echo "Disk space after cleanup:"
92+
df -h
93+
8494
# Unity 2020 cache is not compatible with older versions
8595
- name: Unity Library Cache 2020 or higher
8696
if: ${{ !startsWith(needs.variables.outputs.UNITY_VERSION, '201') }}
@@ -111,6 +121,17 @@ jobs:
111121
versioning: None
112122
buildName: ${{ needs.variables.outputs.BUILD_NAME }}
113123

124+
- name: Check Disk Space After Build
125+
run: |
126+
echo "Disk space after build:"
127+
df -h
128+
AVAILABLE=$(df / | tail -1 | awk '{print $4}')
129+
AVAILABLE_GB=$(echo $AVAILABLE | sed 's/G//')
130+
echo "Available space: ${AVAILABLE_GB}GB"
131+
if (( $(echo "$AVAILABLE_GB < 1" | bc -l) )); then
132+
echo "::warning::Low disk space! Less than 1GB remaining."
133+
fi
134+
114135
- uses: actions/upload-artifact@v4
115136
with:
116137
name: ${{ needs.variables.outputs.BUILD_NAME }}

.github/workflows/upgrade-unity.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
upgrade-unity-version:
3535
name: Upgrade Unity version and packages to ${{ inputs.unityVersion }}
3636
runs-on: ubuntu-latest
37-
strategy:
38-
fail-fast: false
3937
steps:
4038
- name: Log input parameter
4139
run: |
@@ -75,6 +73,18 @@ jobs:
7573
env:
7674
GIT_USER: ${{ github.actor }}
7775

76+
# Avoid running into space issues for github runners - Docker images can take up quite some space
77+
- name: Free Disk Space
78+
run: |
79+
echo "Disk space before cleanup:"
80+
df -h
81+
sudo rm -rf /usr/share/dotnet
82+
sudo rm -rf /opt/ghc
83+
sudo rm -rf /usr/local/share/boost
84+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
85+
echo "Disk space after cleanup:"
86+
df -h
87+
7888
# Make sure the branch has the latest master changes in
7989
- name: Merge master into current branch
8090
if: ${{ inputs.mergeMaster }}
@@ -149,6 +159,18 @@ jobs:
149159
allowDirtyBuild: true
150160
manualExit: true
151161

162+
- name: Check Disk Space After Build
163+
if: ${{ !inputs.tagsOnly }}
164+
run: |
165+
echo "Disk space after build:"
166+
df -h
167+
AVAILABLE=$(df / | tail -1 | awk '{print $4}')
168+
AVAILABLE_GB=$(echo $AVAILABLE | sed 's/G//')
169+
echo "Available space: ${AVAILABLE_GB}GB"
170+
if (( $(echo "$AVAILABLE_GB < 1" | bc -l) )); then
171+
echo "::warning::Low disk space! Less than 1GB remaining."
172+
fi
173+
152174
- name: Delete build folder with elevated rights
153175
if: ${{ !inputs.tagsOnly }}
154176
run: sudo rm -rf ./build

0 commit comments

Comments
 (0)