дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 01:31:41 +02:00
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.
Цей коміт міститься в:
1 джерело
36d286c5af
коміт
5e85738f2d
2 files changed
+19
-18
No files matched your search
@@ -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.
|
||||
A runner takes one job at a time, so each job's directory has a single user.
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- if: runner.environment == 'self-hosted'
|
||||
shell: bash
|
||||
run: |
|
||||
dir="$HOME/.cache/openidea-ci/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"
|
||||
@@ -77,16 +77,7 @@ jobs:
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
# Checkout cleans ignored files, so a self-hosted runner builds outside the workspace and
|
||||
# keeps that output instead of a restored cache. One job at a time per runner: no sharing.
|
||||
- name: Persistent build output
|
||||
if: runner.environment == 'self-hosted'
|
||||
shell: bash
|
||||
run: |
|
||||
dir="$HOME/.cache/openidea-ci/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"
|
||||
- uses: ./.github/actions/persistent-target
|
||||
- uses: pnpm/action-setup@v5
|
||||
with: { version: 11 }
|
||||
- uses: actions/setup-node@v5
|
||||
@@ -146,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: |
|
||||
|
||||
Reference in new issue
Заблокувати користувача