mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-20 18:56:23 +00:00
ci: route test jobs to self-hosted runner with persistent CARGO_TARGET_DIR
- Add tags: [pezkuwi-runner] to .test-base, wasm-check, test-doc - Set CARGO_TARGET_DIR to /var/cache/cargo-target/<hash>/<job-name> on VPS2 - Hash is md5(Cargo.lock + rust-toolchain.toml) — auto-deletes old keys - Set CARGO_HOME: /root/.cargo (persistent volume, skip GitLab cache upload) - Disable GitLab registry cache for self-hosted jobs (cache: []) - Fix basic-authorship doc test: mark as no_run (requires compiled WASM at runtime)
This commit is contained in:
1 parent
578190da50
commit
b99f16f934
2 files changed
+38
-2
No files matched your search
+37
-1
@@ -256,11 +256,23 @@ cargo-audit:
|
||||
# Tests split into 3 partitions via cargo-nextest — mirrors GitHub matrix strategy
|
||||
.test-base:
|
||||
stage: test
|
||||
tags: [pezkuwi-runner]
|
||||
needs: [clippy, check-try-runtime]
|
||||
variables:
|
||||
CARGO_HOME: /root/.cargo
|
||||
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
|
||||
WASM_BUILD_NO_COLOR: "1"
|
||||
CARGO_INCREMENTAL: "0"
|
||||
before_script:
|
||||
- rustup show
|
||||
- rustc --version && cargo --version
|
||||
- rustup target add wasm32v1-none
|
||||
- export CACHE_KEY="$(cat Cargo.lock rust-toolchain.toml | md5sum | cut -c1-12)"
|
||||
- export CARGO_TARGET_DIR="/var/cache/cargo-target/${CACHE_KEY}/${CI_JOB_NAME}"
|
||||
- mkdir -p "$CARGO_TARGET_DIR"
|
||||
- find /var/cache/cargo-target -mindepth 1 -maxdepth 1 -type d ! -name "${CACHE_KEY}" -exec rm -rf {} + 2>/dev/null || true
|
||||
- echo "CARGO_TARGET_DIR=$CARGO_TARGET_DIR (disk $(df -h /var/cache/cargo-target | tail -1 | awk '{print $3 "/" $2 " used, " $4 " free"}'))"
|
||||
cache: []
|
||||
timeout: 90m
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
@@ -340,7 +352,20 @@ test-no-try-runtime-2:
|
||||
|
||||
wasm-check:
|
||||
stage: test
|
||||
tags: [pezkuwi-runner]
|
||||
needs: [check-try-runtime]
|
||||
variables:
|
||||
CARGO_HOME: /root/.cargo
|
||||
before_script:
|
||||
- rustup show
|
||||
- rustc --version && cargo --version
|
||||
- rustup target add wasm32v1-none
|
||||
- export CACHE_KEY="$(cat Cargo.lock rust-toolchain.toml | md5sum | cut -c1-12)"
|
||||
- export CARGO_TARGET_DIR="/var/cache/cargo-target/${CACHE_KEY}/${CI_JOB_NAME}"
|
||||
- mkdir -p "$CARGO_TARGET_DIR"
|
||||
- find /var/cache/cargo-target -mindepth 1 -maxdepth 1 -type d ! -name "${CACHE_KEY}" -exec rm -rf {} + 2>/dev/null || true
|
||||
- echo "CARGO_TARGET_DIR=$CARGO_TARGET_DIR"
|
||||
cache: []
|
||||
script:
|
||||
- cargo check -p pezkuwichain-runtime --locked --target wasm32v1-none
|
||||
rules:
|
||||
@@ -372,13 +397,24 @@ runtime-migration:
|
||||
|
||||
test-doc:
|
||||
stage: docs
|
||||
tags: [pezkuwi-runner]
|
||||
needs: [clippy]
|
||||
variables:
|
||||
CARGO_HOME: /root/.cargo
|
||||
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
|
||||
SKIP_WASM_BUILD: "0"
|
||||
before_script:
|
||||
- rustup show
|
||||
- rustc --version && cargo --version
|
||||
- rustup target add wasm32v1-none
|
||||
- export CACHE_KEY="$(cat Cargo.lock rust-toolchain.toml | md5sum | cut -c1-12)"
|
||||
- export CARGO_TARGET_DIR="/var/cache/cargo-target/${CACHE_KEY}/${CI_JOB_NAME}"
|
||||
- mkdir -p "$CARGO_TARGET_DIR"
|
||||
- find /var/cache/cargo-target -mindepth 1 -maxdepth 1 -type d ! -name "${CACHE_KEY}" -exec rm -rf {} + 2>/dev/null || true
|
||||
- echo "CARGO_TARGET_DIR=$CARGO_TARGET_DIR"
|
||||
cache: []
|
||||
timeout: 5h
|
||||
script:
|
||||
- rustup target add wasm32v1-none
|
||||
- git config --global --add safe.directory '*'
|
||||
- |
|
||||
cargo test --doc --workspace --locked --all-features \
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
//!
|
||||
//! # Example
|
||||
//!
|
||||
//! ```
|
||||
//! ```no_run
|
||||
//! # use pezsc_basic_authorship::ProposerFactory;
|
||||
//! # use pezsp_consensus::{Environment, Proposer};
|
||||
//! # use pezsp_runtime::generic::BlockId;
|
||||
|
||||
Reference in new issue
Block a user