Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions .github/actions/provider-ci-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
lane:
description: provider, sdk or cluster; each owns independent build outputs
required: true
save-caches:
description: "'true' to save this lane's caches; ci.yml passes true only for pushes to master and dev"
default: 'false'
runs:
using: composite
steps:
Expand Down Expand Up @@ -33,7 +36,21 @@ runs:
shell: bash
env:
LANE: ${{ inputs.lane }}
run: python3 scripts/provider-ci-cache.py keys --lane "$LANE" >> "$GITHUB_OUTPUT"
run: |
python3 scripts/provider-ci-cache.py keys --lane "$LANE" >> "$GITHUB_OUTPUT"
# actions/cache stores a path outside the workspace relative to the
# workspace, so SwiftPM's cache is shared only between equal layouts.
echo "home-layout=$(printf '%s\n' "$HOME" "$GITHUB_WORKSPACE" | shasum -a 256 | cut -c1-12)" >> "$GITHUB_OUTPUT"
echo "actions/cache compressor: $(command -v zstd >/dev/null && echo zstd || echo gzip)"
# Dependency clones for a cold build; the lane's own build cache already
# holds them when it is restored.
- name: Restore SwiftPM repositories
id: spm-repos
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/Library/Caches/org.swift.swiftpm/repositories
key: spm-repos-v1-${{ runner.os }}-${{ steps.keys.outputs.home-layout }}-${{ inputs.lane }}-${{ hashFiles('**/Package.resolved', '!**/.build/**') }}
restore-keys: spm-repos-v1-${{ runner.os }}-${{ steps.keys.outputs.home-layout }}-${{ inputs.lane }}-
- name: Restore lane-specific Swift test build
id: swift-cache
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
Expand Down Expand Up @@ -84,18 +101,23 @@ runs:
id: timestamps
shell: bash
run: python3 scripts/provider-release-cache.py snapshot-mtimes
# Pushes save their build. A pull request saves only when it restored
# nothing, so its later pushes do not each add an entry that evicts the
# base branch's entry from the repository cache.
# Only callers' trusted pushes save (save-caches): a pull request's entry
# is scoped to its merge ref, where nothing else restores it.
- name: Save lane-specific Swift test build
if: ${{ !cancelled() && steps.timestamps.outcome == 'success' && steps.swift-cache.outputs.cache-hit != 'true' && (github.event_name != 'pull_request' || steps.swift-cache.outputs.cache-matched-key == '') }}
if: ${{ !cancelled() && inputs.save-caches == 'true' && steps.timestamps.outcome == 'success' && steps.swift-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: |
provider-swift/.build
libs/mlx-swift-lm/.build
libs/darkbloom-cluster/.build
key: ${{ steps.keys.outputs.swift-key }}
- name: Save SwiftPM repositories
if: ${{ !cancelled() && inputs.save-caches == 'true' && steps.timestamps.outcome == 'success' && steps.spm-repos.outputs.cache-hit != 'true' }}
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/Library/Caches/org.swift.swiftpm/repositories
key: ${{ steps.spm-repos.outputs.cache-primary-key }}
- name: Restore source-matched Metal cache
id: metallib-cache
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
Expand All @@ -118,7 +140,7 @@ runs:
bin=$(swift build --package-path "$package" --show-bin-path)
./scripts/stage-test-metallib.sh "$bin"
- name: Save validated source-matched Metal cache
if: ${{ !cancelled() && steps.metallib.outcome == 'success' && steps.metallib-cache.outputs.cache-hit != 'true' }}
if: ${{ !cancelled() && inputs.save-caches == 'true' && steps.metallib.outcome == 'success' && steps.metallib-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ runner.temp }}/metallib-cache
Expand Down
390 changes: 357 additions & 33 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .github/workflows/component-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
value: ${{ jobs.changes.outputs.sdk }}
cluster:
value: ${{ jobs.changes.outputs.cluster }}
mimo_audio:
value: ${{ jobs.changes.outputs.mimo_audio }}

permissions:
contents: read
Expand All @@ -23,6 +25,7 @@ jobs:
provider: ${{ steps.paths.outputs.provider }}
sdk: ${{ steps.paths.outputs.sdk }}
cluster: ${{ steps.paths.outputs.cluster }}
mimo_audio: ${{ steps.paths.outputs.mimo_audio }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/docs-impact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
# The diff needs commits and trees; old file contents are fetched only
# when read. Evidence tarballs and landing media are never read.
filter: blob:none
sparse-checkout: |
/*
!/docs/reports/evidence/**/*.gz
!/landing/public/media/
sparse-checkout-cone-mode: false
- name: Test documentation-impact validation
run: python3 scripts/test-docs-impact-check.py
- name: Check documentation impact
Expand Down
Loading
Loading