Skip to content

chore(deps): update actions/cache action to v5.1.0 #2327

chore(deps): update actions/cache action to v5.1.0

chore(deps): update actions/cache action to v5.1.0 #2327

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened, labeled, ready_for_review]
workflow_dispatch:
# Allows manual triggering from the Actions tab
permissions:
contents: read
pull-requests: write
actions: write
env:
CARGO_TERM_COLOR: always
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.event.pull_request.head.ref, 'release-please--') }}
jobs:
paths-filter:
if: >-
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
(github.event.action != 'labeled' || github.event.label.name == 'ready-to-test')
runs-on: arc-llama-monitor
outputs:
code: ${{ steps.filter.outputs.code }}
ui: ${{ steps.filter.outputs.ui }}
release: ${{ steps.filter.outputs.release }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4
id: filter
with:
filters: |
code:
- 'src/**'
- 'sensor_bridge/**'
- 'Cargo.toml'
- 'Cargo.lock'
ui:
- 'static/**'
- 'tests/ui/**'
release:
- 'src/**'
- 'sensor_bridge/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'scripts/**'
- '.github/release-please/**'
- '.github/workflows/release.yml'
- '.github/workflows/release-please.yml'
check:
needs: paths-filter
timeout-minutes: 60
if: >-
always() &&
github.event.pull_request.draft == false &&
(
startsWith(github.event.pull_request.head.ref, 'release-please--') ||
(
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
(github.event.action != 'labeled' || github.event.label.name == 'ready-to-test') &&
(contains(github.event.pull_request.labels.*.name, 'ready-to-test') ||
startsWith(github.actor, 'dependabot')) &&
needs.paths-filter.outputs.code == 'true'
)
)
runs-on: ${{ startsWith(github.event.pull_request.head.ref, 'release-please--') && 'arc-general' || 'arc-llama-monitor-fast' }}
steps:
- name: Release PR shortcut
if: startsWith(github.event.pull_request.head.ref, 'release-please--')
run: echo "Release-please PR detected; required check intentionally passes without rerunning full CI."
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
if: '!startsWith(github.event.pull_request.head.ref, ''release-please--'')'
- name: Setup Rust
if: >-
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
needs.paths-filter.outputs.code == 'true'
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
- name: Cache Rust
if: >-
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
needs.paths-filter.outputs.code == 'true'
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
prefix-key: "v0-rust"
shared-key: "local-llm-foundry-${{ hashFiles('Cargo.lock') }}"
save-if: "${{ github.ref == 'refs/heads/main' }}"
- name: Run checks
if: >-
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
needs.paths-filter.outputs.code == 'true'
run: |
git diff --check
cargo fmt -- --check
cargo clippy -- -D warnings
cargo test
- name: Validate sensor_bridge compiles
if: >-
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
needs.paths-filter.outputs.code == 'true'
run: |
dotnet publish sensor_bridge/sensor_bridge.csproj -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true -o sensor_bridge/publish
- name: No code changes
if: >-
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
needs.paths-filter.outputs.code != 'true'
run: echo "No code changes detected, skipping Rust checks"
lint:
needs: paths-filter
timeout-minutes: 10
if: >-
always() &&
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
(github.event.action != 'labeled' || github.event.label.name == 'ready-to-test') &&
needs.paths-filter.outputs.ui == 'true' &&
github.event.pull_request.draft == false
runs-on: arc-llama-monitor
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: npm
cache-dependency-path: package-lock.json
- name: Install ESLint dependencies
run: npm ci
- name: ESLint static/js
run: npm run lint
ui:
needs: [paths-filter, check, check-windows]
timeout-minutes: 60
if: >-
always() &&
needs.check.result != 'failure' &&
needs.check-windows.result != 'failure' &&
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
(github.event.action != 'labeled' || github.event.label.name == 'ready-to-test') &&
needs.paths-filter.outputs.ui == 'true' &&
github.event.pull_request.draft == false &&
(contains(github.event.pull_request.labels.*.name, 'ready-to-test') ||
startsWith(github.actor, 'dependabot'))
runs-on: arc-llama-monitor-fast
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup Rust
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
- name: Cache Rust
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
prefix-key: "v0-rust"
shared-key: "local-llm-foundry-${{ hashFiles('Cargo.lock') }}"
save-if: "${{ github.ref == 'refs/heads/main' }}"
- name: Build binary
run: cargo build --release
- name: Make binary executable
run: chmod +x target/release/local-llm-foundry
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: npm
cache-dependency-path: tests/ui/package-lock.json
- name: Check static JavaScript syntax
run: npm run validate-js
- name: Install UI test dependencies
working-directory: tests/ui
run: npm ci
- name: Cache Playwright Chromium
id: pw-cache
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
with:
path: ~/.cache/ms-playwright
key: playwright-chromium-${{ hashFiles('tests/ui/package-lock.json') }}
- name: Install Playwright Chromium
if: steps.pw-cache.outputs.cache-hit != 'true'
working-directory: tests/ui
run: npx playwright install chromium
- name: Start UI smoke server
run: |
./target/release/local-llm-foundry --headless --port 7778 > "$RUNNER_TEMP/local-llm-foundry-ui.log" 2>&1 &
echo $! > "$RUNNER_TEMP/local-llm-foundry-ui.pid"
for i in {1..30}; do
curl -fsS http://127.0.0.1:7778 >/dev/null && exit 0
sleep 1
done
cat "$RUNNER_TEMP/local-llm-foundry-ui.log"
exit 1
- name: Run Rapid-MLX UI contract gate
working-directory: tests/ui
env:
LLAMA_MONITOR_UI_URL: http://127.0.0.1:7778
run: npm run test:rapid-mlx-contract
- name: Run Playwright UI tests
# Runs all .spec.js files except:
# - SSH integration test (skips without LLAMA_MONITOR_SSH_TARGET)
# - AI-dependent tests (skip without LLAMA_MONITOR_HAS_AI=1)
working-directory: tests/ui
env:
LLAMA_MONITOR_UI_URL: http://127.0.0.1:7778
run: npm test
- name: Stop UI smoke server
if: always()
run: |
if [ -f "$RUNNER_TEMP/local-llm-foundry-ui.pid" ]; then
kill "$(cat "$RUNNER_TEMP/local-llm-foundry-ui.pid")" || true
fi
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: playwright-report
path: tests/ui/playwright-report/
if-no-files-found: ignore
retention-days: 1
release-smoke:
needs: [paths-filter, check, check-windows]
timeout-minutes: 90
if: >-
always() &&
needs.check.result != 'failure' &&
needs.check-windows.result != 'failure' &&
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
(github.event.action != 'labeled' || github.event.label.name == 'ready-to-test') &&
needs.paths-filter.outputs.release == 'true' &&
github.event.pull_request.draft == false &&
(contains(github.event.pull_request.labels.*.name, 'ready-to-test') ||
startsWith(github.actor, 'dependabot'))
name: release-smoke (${{ matrix.target }})
runs-on: arc-llama-monitor
strategy:
fail-fast: true
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-pc-windows-gnu
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
prefix-key: "v0-rust"
shared-key: "local-llm-foundry-${{ matrix.target }}-${{ hashFiles('Cargo.lock') }}"
save-if: "${{ github.ref == 'refs/heads/main' }}"
- name: Preflight release toolchain
run: bash scripts/release-preflight.sh
- name: Smoke build ${{ matrix.target }}
run: bash scripts/build-single-target.sh ${{ matrix.target }}
check-windows:
# Gates in parallel with `check` (depends only on paths-filter), so a
# Windows-only clippy failure surfaces early instead of after `check` and the
# release build. Lints natively with the host mingw-w64 toolchain — no cross /
# Docker — which avoids the cross-remote volume-permission error in the dind
# runner. The release build still uses cross (mingw lives inside its image).
needs: paths-filter
timeout-minutes: 20
if: >-
always() &&
github.event.pull_request.draft == false &&
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
(github.event.action != 'labeled' || github.event.label.name == 'ready-to-test') &&
(contains(github.event.pull_request.labels.*.name, 'ready-to-test') ||
startsWith(github.actor, 'dependabot')) &&
needs.paths-filter.outputs.code == 'true'
name: check-windows (clippy)
runs-on: arc-llama-monitor-fast
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup Rust
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
targets: x86_64-pc-windows-gnu
components: clippy
- name: Cache Rust
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
prefix-key: "v0-rust"
shared-key: "local-llm-foundry-x86_64-pc-windows-gnu-${{ hashFiles('Cargo.lock') }}"
save-if: "${{ github.ref == 'refs/heads/main' }}"
- name: Clippy (Windows target)
# Lints the SHIPPED Windows feature set (matches scripts/build-single-target.sh).
# Build scripts for C deps (aws-lc-sys, ring) compile via the host mingw-w64
# cross compiler installed in the runner image.
env:
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS: "-C target-feature=+crt-static"
CC_x86_64_pc_windows_gnu: x86_64-w64-mingw32-gcc
CXX_x86_64_pc_windows_gnu: x86_64-w64-mingw32-g++
AR_x86_64_pc_windows_gnu: x86_64-w64-mingw32-ar
run: cargo clippy --target x86_64-pc-windows-gnu --no-default-features --features native-tray,webview-popover -- -D warnings
release-smoke-rest:
needs: [paths-filter, check, check-windows, release-smoke]
timeout-minutes: 90
if: >-
always() &&
needs.check.result != 'failure' &&
needs.check-windows.result != 'failure' &&
needs.release-smoke.result != 'failure' &&
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
(github.event.action != 'labeled' || github.event.label.name == 'ready-to-test') &&
needs.paths-filter.outputs.release == 'true' &&
github.event.pull_request.draft == false &&
(contains(github.event.pull_request.labels.*.name, 'ready-to-test') ||
startsWith(github.actor, 'dependabot'))
name: release-smoke-rest (${{ matrix.target }})
runs-on: arc-llama-monitor
strategy:
fail-fast: true
matrix:
target:
- aarch64-unknown-linux-gnu
- aarch64-apple-darwin
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
prefix-key: "v0-rust"
shared-key: "local-llm-foundry-${{ matrix.target }}-${{ hashFiles('Cargo.lock') }}"
save-if: "${{ github.ref == 'refs/heads/main' }}"
- name: Preflight release toolchain
run: bash scripts/release-preflight.sh
- name: Smoke build ${{ matrix.target }}
run: bash scripts/build-single-target.sh ${{ matrix.target }}