Stabilize Apple Namespace build caches
Some checks are pending
Build Apple / Build App (iOS Simulator) (push) Waiting to run
Build Apple / Build App (macOS) (push) Waiting to run
Build Rust / Cargo Test (push) Waiting to run
Build Site / Next.js Build (push) Waiting to run

This commit is contained in:
Conrad Kramer 2026-03-19 02:06:24 -07:00
parent 7fb6419fa0
commit 2da0244d42
2 changed files with 16 additions and 0 deletions

View file

@ -33,6 +33,7 @@ jobs:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 20G
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
@ -82,6 +83,12 @@ jobs:
"${cache_root}/apple/PackageCache" \
"${cache_root}/apple/SourcePackages" \
"${cache_root}/apple/DerivedData/${{ matrix.cache-id }}"
rm -rf \
"${cache_root}/cargo-target/${{ matrix.cache-id }}" \
"${cache_root}/apple/DerivedData/${{ matrix.cache-id }}"
mkdir -p \
"${cache_root}/cargo-target/${{ matrix.cache-id }}" \
"${cache_root}/apple/DerivedData/${{ matrix.cache-id }}"
echo "CARGO_HOME=${cache_root}/cargo" >> "${GITHUB_ENV}"
echo "CARGO_TARGET_DIR=${cache_root}/cargo-target/${{ matrix.cache-id }}" >> "${GITHUB_ENV}"
echo "RUSTUP_HOME=${cache_root}/rustup" >> "${GITHUB_ENV}"
@ -90,6 +97,7 @@ jobs:
echo "APPLE_PACKAGE_CACHE=${cache_root}/apple/PackageCache" >> "${GITHUB_ENV}"
echo "APPLE_SOURCE_PACKAGES=${cache_root}/apple/SourcePackages" >> "${GITHUB_ENV}"
echo "APPLE_DERIVED_DATA=${cache_root}/apple/DerivedData/${{ matrix.cache-id }}" >> "${GITHUB_ENV}"
df -h "${cache_root}" || true
- name: Install Rust
shell: bash

View file

@ -79,6 +79,14 @@ if [[ -n "${RUSTC_WRAPPER:-}" && "${RUSTC_WRAPPER}" != /* ]]; then
fi
fi
if [[ -x "$(command -v rustup)" ]]; then
for TARGET in "${RUST_TARGETS[@]}"; do
if ! rustup target list --installed | grep -qx "${TARGET}"; then
rustup target add "${TARGET}"
fi
done
fi
# Run cargo without the various environment variables set by Xcode.
# Those variables can confuse cargo and the build scripts it runs.
EXTRA_ENV=()