ci: separate compiled caches and reuse complete native validation
This commit is contained in:
1 parent
948a427280
commit
69f400fa19
6 files changed
+267
-76
No files matched your search
@@ -2,7 +2,10 @@ name: Full native tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
push:
|
||||
# Releases call this entire workflow instead of duplicating branch-push jobs.
|
||||
branches-ignore: ["release/**"]
|
||||
paths:
|
||||
- "**/*.rs"
|
||||
- "scripts/**/*.py"
|
||||
@@ -11,6 +14,7 @@ on:
|
||||
- "rust-toolchain.toml"
|
||||
- ".github/workflows/linux-lua.yml"
|
||||
- ".github/ci-profile.toml"
|
||||
- ".github/actions/rust-cache/action.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**/*.rs"
|
||||
@@ -20,6 +24,7 @@ on:
|
||||
- "rust-toolchain.toml"
|
||||
- ".github/workflows/linux-lua.yml"
|
||||
- ".github/ci-profile.toml"
|
||||
- ".github/actions/rust-cache/action.yml"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -64,13 +69,24 @@ jobs:
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: "1.97.1"
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: ./.github/actions/rust-cache
|
||||
id: rust-cache
|
||||
with:
|
||||
shared-key: ${{ runner.os == 'Windows' && 'windows' || runner.os == 'Linux' && 'linux' || 'macos' }}
|
||||
cache-workspace-crates: true
|
||||
cache-on-failure: true
|
||||
key: native
|
||||
target: target/ci
|
||||
legacy-key: ${{ runner.os == 'Windows' && 'windows' || runner.os == 'Linux' && 'linux' || 'macos' }}
|
||||
- name: Prepare pinned Windows console runtime
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: ./scripts/prepare-windows-runtime.ps1 -Destination assets/windows/conhost
|
||||
- name: Test complete workspace and native harness
|
||||
run: python scripts/ci_native_tests.py
|
||||
- name: Save compiled workload
|
||||
if: ${{ always() && steps.rust-cache.outcome == 'success' && steps.rust-cache.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: target/ci
|
||||
key: ${{ steps.rust-cache.outputs.cache-key }}
|
||||
- name: Check source architecture
|
||||
if: ${{ !cancelled() && runner.os == 'Linux' }}
|
||||
run: python scripts/check_architecture.py
|
||||
@@ -80,3 +96,12 @@ jobs:
|
||||
- name: Check the release workspace
|
||||
if: ${{ !cancelled() }}
|
||||
run: cargo check --locked --workspace --release
|
||||
- name: Upload native compilation timings
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: native-timings-${{ matrix.os }}
|
||||
path: target/cargo-timings
|
||||
if-no-files-found: warn
|
||||
compression-level: 0
|
||||
retention-days: 14
|
||||
Reference in new issue
Block a user