perf: incremental cargo builds, skip apt when cached
- Build in $HOME/archy to reuse target/ cache across CI runs - Skip apt-get install when ISO build deps already present - Cargo tests also use persistent target dir Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9eb5d8cee0
commit
b0e5e8c00e
@ -28,17 +28,28 @@ jobs:
|
||||
|
||||
- name: Install ISO build dependencies
|
||||
run: |
|
||||
# Skip apt if packages already installed (persistent runner)
|
||||
if dpkg -s debootstrap squashfs-tools xorriso isolinux syslinux-common mtools \
|
||||
grub-efi-amd64-bin grub-pc-bin grub-common >/dev/null 2>&1; then
|
||||
echo "ISO build deps already installed, skipping apt"
|
||||
else
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y -qq \
|
||||
debootstrap squashfs-tools xorriso \
|
||||
isolinux syslinux-common mtools \
|
||||
grub-efi-amd64-bin grub-pc-bin grub-common
|
||||
fi
|
||||
|
||||
- name: Build backend
|
||||
- name: Build backend (incremental)
|
||||
run: |
|
||||
source $HOME/.cargo/env 2>/dev/null || true
|
||||
# Build in persistent repo dir to reuse target/ cache
|
||||
cd "$HOME/archy"
|
||||
export GIT_HASH=$(git rev-parse --short HEAD)
|
||||
cargo build --release --manifest-path core/Cargo.toml
|
||||
# Copy binary to workspace for downstream steps
|
||||
mkdir -p "$GITHUB_WORKSPACE/core/target/release"
|
||||
cp core/target/release/archipelago "$GITHUB_WORKSPACE/core/target/release/"
|
||||
|
||||
- name: Build frontend
|
||||
run: cd neode-ui && npm ci && npm run build
|
||||
@ -52,6 +63,7 @@ jobs:
|
||||
- name: Run container orchestration unit tests
|
||||
run: |
|
||||
source $HOME/.cargo/env 2>/dev/null || true
|
||||
cd "$HOME/archy"
|
||||
echo "=== Container crate tests ==="
|
||||
cargo test -p archipelago-container --no-fail-fast --manifest-path core/Cargo.toml
|
||||
echo ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user