mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-06-04 21:19:28 +00:00
ci: cache zerokit/RLN build artifacts on PR CI
Avoid rebuilding librln (zerokit) from Rust source on every job. Cache the final static library keyed by OS + RLN version + zerokit submodule SHA, and add a Cargo registry/target fallback cache for the miss path. Applied to the build and test jobs in ci.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c6e448a0ba
commit
276d1a60c0
48
.github/workflows/ci.yml
vendored
48
.github/workflows/ci.yml
vendored
@ -66,6 +66,30 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get zerokit submodule SHA
|
||||
id: zerokit-sha
|
||||
run: echo "sha=$(git submodule status vendor/zerokit | awk '{print $1}' | sed 's/^[+-]//')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache librln
|
||||
id: cache-librln
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: librln_v0.9.0.a
|
||||
key: ${{ runner.os }}-librln-v0.9.0-${{ steps.zerokit-sha.outputs.sha }}
|
||||
|
||||
- name: Cache cargo
|
||||
if: steps.cache-librln.outputs.cache-hit != 'true'
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
vendor/zerokit/target/
|
||||
key: ${{ runner.os }}-cargo-zerokit-${{ steps.zerokit-sha.outputs.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-zerokit-
|
||||
|
||||
- name: Install Nim ${{ env.NIM_VERSION }}
|
||||
uses: jiro4989/setup-nim-action@v2
|
||||
with:
|
||||
@ -119,6 +143,30 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get zerokit submodule SHA
|
||||
id: zerokit-sha
|
||||
run: echo "sha=$(git submodule status vendor/zerokit | awk '{print $1}' | sed 's/^[+-]//')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache librln
|
||||
id: cache-librln
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: librln_v0.9.0.a
|
||||
key: ${{ runner.os }}-librln-v0.9.0-${{ steps.zerokit-sha.outputs.sha }}
|
||||
|
||||
- name: Cache cargo
|
||||
if: steps.cache-librln.outputs.cache-hit != 'true'
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
vendor/zerokit/target/
|
||||
key: ${{ runner.os }}-cargo-zerokit-${{ steps.zerokit-sha.outputs.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-zerokit-
|
||||
|
||||
- name: Install Nim ${{ env.NIM_VERSION }}
|
||||
uses: jiro4989/setup-nim-action@v2
|
||||
with:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user