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
b58755b8ed
commit
9eb5831172
@ -28,17 +28,28 @@ jobs:
|
|||||||
|
|
||||||
- name: Install ISO build dependencies
|
- name: Install ISO build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -qq
|
# Skip apt if packages already installed (persistent runner)
|
||||||
sudo apt-get install -y -qq \
|
if dpkg -s debootstrap squashfs-tools xorriso isolinux syslinux-common mtools \
|
||||||
debootstrap squashfs-tools xorriso \
|
grub-efi-amd64-bin grub-pc-bin grub-common >/dev/null 2>&1; then
|
||||||
isolinux syslinux-common mtools \
|
echo "ISO build deps already installed, skipping apt"
|
||||||
grub-efi-amd64-bin grub-pc-bin grub-common
|
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: |
|
run: |
|
||||||
source $HOME/.cargo/env 2>/dev/null || true
|
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)
|
export GIT_HASH=$(git rev-parse --short HEAD)
|
||||||
cargo build --release --manifest-path core/Cargo.toml
|
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
|
- name: Build frontend
|
||||||
run: cd neode-ui && npm ci && npm run build
|
run: cd neode-ui && npm ci && npm run build
|
||||||
@ -52,6 +63,7 @@ jobs:
|
|||||||
- name: Run container orchestration unit tests
|
- name: Run container orchestration unit tests
|
||||||
run: |
|
run: |
|
||||||
source $HOME/.cargo/env 2>/dev/null || true
|
source $HOME/.cargo/env 2>/dev/null || true
|
||||||
|
cd "$HOME/archy"
|
||||||
echo "=== Container crate tests ==="
|
echo "=== Container crate tests ==="
|
||||||
cargo test -p archipelago-container --no-fail-fast --manifest-path core/Cargo.toml
|
cargo test -p archipelago-container --no-fail-fast --manifest-path core/Cargo.toml
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user