Commit d1c7eb6
committed
use larger disk for build artifacts in CI
I was debugging an issue where my CI jobs were running out of disk space:
```
=== df -h ===
Filesystem Size Used Avail Use% Mounted on
/dev/root 72G 71G 1.2G 99% /
tmpfs 7.9G 84K 7.9G 1% /dev/shm
tmpfs 3.2G 1.1M 3.2G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sdb16 881M 62M 758M 8% /boot
/dev/sdb15 105M 6.2M 99M 6% /boot/efi
/dev/sda1 74G 4.1G 66G 6% /mnt
tmpfs 1.6G 12K 1.6G 1% /run/user/1001
=== Top directories in workspace ===
sort: write failed: 'standard output': Broken pipe
16G ./target/debug
16G ./target
16G .
15G ./target/debug/deps
1.5G ./target/debug/examples
348M ./target/debug/build
19M ./target/debug/.fingerprint
```
See how `/` is 99% full. It turns out that `Swatinem/rust-cache@v2` was caching some outdated artifacts, causing `./target/debug` to be 3-4GB too large.
I was able to fix the issue by reseting the cache, however, the disk usage is still quite high.
```
=== df -h ===
Filesystem Size Used Avail Use% Mounted on
/dev/root 72G 66G 5.8G 93% /
tmpfs 7.9G 84K 7.9G 1% /dev/shm
tmpfs 3.2G 1.2M 3.2G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda16 881M 62M 758M 8% /boot
/dev/sda15 105M 6.2M 99M 6% /boot/efi
/dev/sdb1 74G 4.1G 66G 6% /mnt
tmpfs 1.6G 12K 1.6G 1% /run/user/1001
=== Top directories in workspace ===
12G ./target/debug
12G ./target
12G .
9.2G ./target/debug/deps
2.2G ./target/debug/examples
200M ./target/debug/build
```
I did some research while debugging this and uncovered that it is common to use `mnt` for cargo artifacts. This change makes cargo use `mnt` for the `target` directory.1 parent 83efd9e commit d1c7eb6
2 files changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
35 | 53 | | |
36 | 54 | | |
37 | 55 | | |
| |||
48 | 66 | | |
49 | 67 | | |
50 | 68 | | |
| 69 | + | |
0 commit comments