@@ -570,6 +570,7 @@ jobs:
570570 env :
571571 ASAN_OPTIONS : detect_leaks=1:halt_on_error=1:abort_on_error=1
572572 UBSAN_OPTIONS : print_stacktrace=1:halt_on_error=1
573+ CCACHE_DIR : /mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/.ccache
573574 steps :
574575 - name : Refuse an unauthorised run before anything else
575576 if : ${{ needs.authz.result != 'success' }}
@@ -582,6 +583,143 @@ jobs:
582583 persist-credentials : false
583584 fetch-depth : 0
584585
586+ - name : Measure sanitizer disk space before preparation
587+ if : ${{ needs.authz.result == 'success' }}
588+ run : df -h / /mnt
589+
590+ - name : Prepare sanitizer build storage
591+ if : ${{ needs.authz.result == 'success' }}
592+ shell : bash
593+ run : |
594+ set -euo pipefail
595+ sudo install -d -m 0775 -o "$USER" -g "$(id -gn)" \
596+ "/mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/build-asan" \
597+ "/mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/tmp" \
598+ "/mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/.ccache"
599+ [[ ! -e build-asan && ! -L build-asan ]]
600+ ln -s -- \
601+ "/mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/build-asan" \
602+ build-asan
603+ resolved_build="$(readlink -f -- build-asan)"
604+ printf 'sanitizer build tree: %s\n' "$resolved_build"
605+ [[ "$resolved_build" == "/mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/build-asan" ]]
606+ stat -c '%A %U:%G %n' -- "$resolved_build" "/mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/tmp" "$CCACHE_DIR"
607+
608+ - name : Inventory disposable .NET installation
609+ if : ${{ needs.authz.result == 'success' }}
610+ shell : bash
611+ run : |
612+ set -euo pipefail
613+ if [[ -d /usr/share/dotnet && ! -L /usr/share/dotnet ]]; then
614+ sudo ls -ld -- /usr/share/dotnet
615+ sudo du -sh -- /usr/share/dotnet
616+ elif [[ -e /usr/share/dotnet || -L /usr/share/dotnet ]]; then
617+ sudo ls -ld -- /usr/share/dotnet
618+ echo "::warning::optional preinstall is not a real directory; no removal performed: /usr/share/dotnet"
619+ else
620+ echo "optional preinstall absent: /usr/share/dotnet"
621+ fi
622+
623+ - name : Remove disposable .NET installation
624+ if : ${{ needs.authz.result == 'success' }}
625+ shell : bash
626+ run : |
627+ set -euo pipefail
628+ if [[ -d /usr/share/dotnet && ! -L /usr/share/dotnet ]]; then
629+ sudo rm -rf -- /usr/share/dotnet
630+ else
631+ echo "no directory removal for absent or symlinked optional preinstall: /usr/share/dotnet"
632+ fi
633+
634+ - name : Inventory disposable Android SDK
635+ if : ${{ needs.authz.result == 'success' }}
636+ shell : bash
637+ run : |
638+ set -euo pipefail
639+ if [[ -d /usr/local/lib/android && ! -L /usr/local/lib/android ]]; then
640+ sudo ls -ld -- /usr/local/lib/android
641+ sudo du -sh -- /usr/local/lib/android
642+ elif [[ -e /usr/local/lib/android || -L /usr/local/lib/android ]]; then
643+ sudo ls -ld -- /usr/local/lib/android
644+ echo "::warning::optional preinstall is not a real directory; no removal performed: /usr/local/lib/android"
645+ else
646+ echo "optional preinstall absent: /usr/local/lib/android"
647+ fi
648+
649+ - name : Remove disposable Android SDK
650+ if : ${{ needs.authz.result == 'success' }}
651+ shell : bash
652+ run : |
653+ set -euo pipefail
654+ if [[ -d /usr/local/lib/android && ! -L /usr/local/lib/android ]]; then
655+ sudo rm -rf -- /usr/local/lib/android
656+ else
657+ echo "no directory removal for absent or symlinked optional preinstall: /usr/local/lib/android"
658+ fi
659+
660+ - name : Inventory disposable GHC installation
661+ if : ${{ needs.authz.result == 'success' }}
662+ shell : bash
663+ run : |
664+ set -euo pipefail
665+ if [[ -d /opt/ghc && ! -L /opt/ghc ]]; then
666+ sudo ls -ld -- /opt/ghc
667+ sudo du -sh -- /opt/ghc
668+ elif [[ -e /opt/ghc || -L /opt/ghc ]]; then
669+ sudo ls -ld -- /opt/ghc
670+ echo "::warning::optional preinstall is not a real directory; no removal performed: /opt/ghc"
671+ else
672+ echo "optional preinstall absent: /opt/ghc"
673+ fi
674+
675+ - name : Remove disposable GHC installation
676+ if : ${{ needs.authz.result == 'success' }}
677+ shell : bash
678+ run : |
679+ set -euo pipefail
680+ if [[ -d /opt/ghc && ! -L /opt/ghc ]]; then
681+ sudo rm -rf -- /opt/ghc
682+ else
683+ echo "no directory removal for absent or symlinked optional preinstall: /opt/ghc"
684+ fi
685+
686+ - name : Inventory disposable Boost installation
687+ if : ${{ needs.authz.result == 'success' }}
688+ shell : bash
689+ run : |
690+ set -euo pipefail
691+ if [[ -d /usr/local/share/boost && ! -L /usr/local/share/boost ]]; then
692+ sudo ls -ld -- /usr/local/share/boost
693+ sudo du -sh -- /usr/local/share/boost
694+ elif [[ -e /usr/local/share/boost || -L /usr/local/share/boost ]]; then
695+ sudo ls -ld -- /usr/local/share/boost
696+ echo "::warning::optional preinstall is not a real directory; no removal performed: /usr/local/share/boost"
697+ else
698+ echo "optional preinstall absent: /usr/local/share/boost"
699+ fi
700+
701+ - name : Remove disposable Boost installation
702+ if : ${{ needs.authz.result == 'success' }}
703+ shell : bash
704+ run : |
705+ set -euo pipefail
706+ if [[ -d /usr/local/share/boost && ! -L /usr/local/share/boost ]]; then
707+ sudo rm -rf -- /usr/local/share/boost
708+ else
709+ echo "no directory removal for absent or symlinked optional preinstall: /usr/local/share/boost"
710+ fi
711+
712+ - name : Prune unused Docker images
713+ if : ${{ needs.authz.result == 'success' }}
714+ shell : bash
715+ run : |
716+ set -euo pipefail
717+ docker image prune -af
718+
719+ - name : Measure sanitizer disk space after preparation
720+ if : ${{ always() && needs.authz.result == 'success' }}
721+ run : df -h / /mnt
722+
585723 - name : Set up Python
586724 uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
587725 with :
@@ -604,6 +742,8 @@ jobs:
604742
605743 - name : Verify (sanitizers)
606744 if : ${{ needs.authz.result == 'success' }}
745+ env :
746+ TMPDIR : /mnt/pineforge-sanitizers/${{ github.run_id }}-${{ matrix.shard }}/tmp
607747 run : python3 scripts/ci_verify.py sanitizers --build-dir build-asan --jobs "$(getconf _NPROCESSORS_ONLN)" --ccache --ctest-shard ${{ matrix.shard }}/8
608748
609749 - name : Stage and summarize diagnostics
0 commit comments