Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai 19c3bec3c4 ci: keep each self-hosted runner's build output apart
Several runners on one machine can run the same job for different pull requests
at once; a directory per runner keeps them from waiting on each other's cargo lock.
2026-11-18 16:00:11 +08:00
l0ng-ai 5e85738f2d ci: run the Plugins job on the self-hosted Mac as well
The persistent build output step moves into a local composite action shared
by the macOS Rust job and the Plugins job.
2026-11-18 14:59:57 +08:00
l0ng-ai 36d286c5af ci: run the macOS Rust job and the Frontend job on the self-hosted runners
The macOS Rust job builds into a directory outside the workspace that persists
between runs instead of restoring the rust-cache; the Frontend job has no
platform-specific steps and runs on the Linux ARM64 runner.
2026-11-18 14:33:44 +08:00
2 змінених файлів з 28 додано та 11 видалено

No files matched your search

+15
Переглянути файл
@@ -0,0 +1,15 @@
name: Persistent build output
description: >-
On a self-hosted runner, point CARGO_TARGET_DIR at a directory outside the workspace
(checkout cleans ignored files) that persists between runs, in place of a restored cache.
Each runner (one job at a time) gets its own directory per job, so concurrent jobs never share one.
runs:
using: composite
steps:
- if: runner.environment == 'self-hosted'
shell: bash
run: |
dir="$HOME/.cache/openidea-ci/$RUNNER_NAME/target-$GITHUB_JOB"
# Start over once it grows past 60 GB.
if [ -d "$dir" ] && [ "$(du -sk "$dir" | cut -f1)" -gt 62914560 ]; then rm -rf "$dir"; fi
echo "CARGO_TARGET_DIR=$dir" >> "$GITHUB_ENV"
+13 -11
Переглянути файл
@@ -69,10 +69,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
include:
# Apple silicon like macos-latest; the self-hosted Mac keeps its build output between runs.
- { os: macos-latest, runner: [self-hosted, macOS, ARM64] }
- { os: ubuntu-22.04, runner: ubuntu-22.04 }
- { os: windows-latest, runner: windows-latest }
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/persistent-target
- uses: pnpm/action-setup@v5
with: { version: 11 }
- uses: actions/setup-node@v5
@@ -81,6 +86,7 @@ jobs:
with: { components: "clippy, rustfmt" }
# Only main saves the cache (saving takes minutes on Windows); PRs restore main's.
- uses: Swatinem/rust-cache@v2
if: runner.environment == 'github-hosted'
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: taiki-e/install-action@nextest
@@ -131,18 +137,13 @@ jobs:
needs: changes
if: needs.changes.outputs.rust == 'true'
timeout-minutes: 30
runs-on: ubuntu-22.04
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target-plugins
# Rust and Node only: the self-hosted Mac, building incrementally on its persisted output.
runs-on: [self-hosted, macOS, ARM64]
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/persistent-target
- uses: dtolnay/rust-toolchain@stable
with: { targets: wasm32-wasip2, components: "clippy, rustfmt" }
- uses: Swatinem/rust-cache@v2
with:
key: plugins
cache-directories: target-plugins
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Format, lint (host and wasm) and test each crate
shell: bash
run: |
@@ -195,7 +196,8 @@ jobs:
needs: changes
if: needs.changes.outputs.frontend == 'true'
timeout-minutes: 30
runs-on: ubuntu-22.04
# Node only, nothing architecture- or distro-specific: the self-hosted Linux runner.
runs-on: [self-hosted, Linux, ARM64]
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v5