mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-06-16 19:09:29 +00:00
ci: derive librln version from Makefile, drop cargo cache
The librln cache key/path hardcoded v0.9.0, so after the zerokit v2.0.2 bump it never matched the built artifact and librln was rebuilt every run. Derive the version via `make print-librln-version` so it tracks the Makefile automatically. Drop the cargo/zerokit-target cache: zerokit is bumped rarely, so the librln artifact cache covers the common case, and caching the target dir inside the submodule broke `git submodule update --init` (non-empty dir). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
f36f84b4c0
commit
7b25ae9781
42
.github/workflows/ci.yml
vendored
42
.github/workflows/ci.yml
vendored
@ -72,25 +72,16 @@ jobs:
|
||||
id: zerokit-sha
|
||||
run: echo "sha=$(git submodule status vendor/zerokit | awk '{print $1}' | sed 's/^[+-]//')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get librln version
|
||||
id: librln-version
|
||||
run: echo "version=$(make print-librln-version)" >> $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-
|
||||
path: librln_${{ steps.librln-version.outputs.version }}.a
|
||||
key: ${{ runner.os }}-librln-${{ steps.librln-version.outputs.version }}-${{ steps.zerokit-sha.outputs.sha }}
|
||||
|
||||
- name: Install Nim ${{ env.NIM_VERSION }}
|
||||
uses: jiro4989/setup-nim-action@v2
|
||||
@ -154,25 +145,16 @@ jobs:
|
||||
id: zerokit-sha
|
||||
run: echo "sha=$(git submodule status vendor/zerokit | awk '{print $1}' | sed 's/^[+-]//')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get librln version
|
||||
id: librln-version
|
||||
run: echo "version=$(make print-librln-version)" >> $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-
|
||||
path: librln_${{ steps.librln-version.outputs.version }}.a
|
||||
key: ${{ runner.os }}-librln-${{ steps.librln-version.outputs.version }}-${{ steps.zerokit-sha.outputs.sha }}
|
||||
|
||||
- name: Install Nim ${{ env.NIM_VERSION }}
|
||||
uses: jiro4989/setup-nim-action@v2
|
||||
|
||||
5
Makefile
5
Makefile
@ -173,11 +173,14 @@ deps: | nimble
|
||||
##################
|
||||
## RLN ##
|
||||
##################
|
||||
.PHONY: librln
|
||||
.PHONY: librln print-librln-version
|
||||
|
||||
LIBRLN_BUILDDIR := $(CURDIR)/vendor/zerokit
|
||||
LIBRLN_VERSION := v0.9.0
|
||||
|
||||
print-librln-version:
|
||||
@echo "$(LIBRLN_VERSION)"
|
||||
|
||||
ifeq ($(detected_OS),Windows)
|
||||
LIBRLN_FILE ?= rln.lib
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user