mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
edd95b3749
Add [forklift caching](https://gitlab.parity.io/parity/infrastructure/ci_cd/forklift/forklift) to remainig jobs by .sh and .py scripts: - cargo-check-each-crate x6 (`.gitlab/check-each-crate.py`) - build-linux-stable (`polkadot/scripts/build-only-wasm.sh`) by before_script: - build-linux-substrate - build-subkey-linux (with `.build-subkey` job) - cargo-check-benches x2 **To disable feature set FORKLIFT_BYPASS variable to true in [project settings in gitlab](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/settings/ci_cd)** (forklift now handles FORKLIFT_BYPASS by itself)
38 lines
834 B
Bash
Executable File
38 lines
834 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
# Script for building only the WASM binary of the given project.
|
|
|
|
set -e
|
|
|
|
PROJECT_ROOT=`git rev-parse --show-toplevel`
|
|
|
|
if [ "$#" -lt 1 ]; then
|
|
echo "You need to pass the name of the crate you want to compile!"
|
|
exit 1
|
|
fi
|
|
|
|
WASM_BUILDER_RUNNER="$PROJECT_ROOT/target/release/wbuild-runner/$1"
|
|
|
|
fl_cargo () {
|
|
if command -v forklift >/dev/null 2>&1; then
|
|
forklift cargo "$@";
|
|
else
|
|
cargo "$@";
|
|
fi
|
|
}
|
|
|
|
if [ -z "$2" ]; then
|
|
export WASM_TARGET_DIRECTORY=$(pwd)
|
|
else
|
|
export WASM_TARGET_DIRECTORY=$2
|
|
fi
|
|
|
|
if [ -d $WASM_BUILDER_RUNNER ]; then
|
|
export DEBUG=false
|
|
export OUT_DIR="$PROJECT_ROOT/target/release/build"
|
|
fl_cargo run --release --manifest-path="$WASM_BUILDER_RUNNER/Cargo.toml" \
|
|
| grep -vE "cargo:rerun-if-|Executing build command"
|
|
else
|
|
fl_cargo build --release -p $1
|
|
fi
|