Skip to content
Snippets Groups Projects
Unverified Commit 0662dd9e authored by bgallois's avatar bgallois
Browse files

use git shallow copy

parent cdbff371
No related branches found
No related tags found
No related merge requests found
Pipeline #36663 passed
[alias] [alias]
sanity-gdev = "test -p duniter-live-tests --test sanity_gdev -- --nocapture" sanity-gdev = "test -Zgit=shallow-deps -p duniter-live-tests --test sanity_gdev -- --nocapture"
tu = "test --workspace --exclude duniter-end2end-tests --exclude duniter-live-tests --features constant-fees" tu = "test -Zgit=shallow-deps --workspace --exclude duniter-end2end-tests --exclude duniter-live-tests --features constant-fees"
# `te` and `cucumber` are synonyms # `te` and `cucumber` are synonyms
te = "test -p duniter-end2end-tests --test cucumber_tests --features constant-fees --" te = "test -p duniter-end2end-tests --test cucumber_tests --features constant-fees --"
cucumber-build = "build --features constant-fees" cucumber-build = "build -Zgit=shallow-deps --features constant-fees"
cucumber = "test -p duniter-end2end-tests --test cucumber_tests --" cucumber = "test -Zgit=shallow-deps -p duniter-end2end-tests --test cucumber_tests --"
ta = "test --workspace --exclude duniter-live-tests --features constant-fees" ta = "test -Zgit=shallow-deps --workspace --exclude duniter-live-tests --features constant-fees"
tb = "test --features runtime-benchmarks -p" tb = "test -Zgit=shallow-deps --features runtime-benchmarks -p"
rbp = "run --release --features runtime-benchmarks -- benchmark pallet --chain=dev --steps=50 --repeat=20 --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=. --pallet" rbp = "run -Zgit=shallow-deps --release --features runtime-benchmarks -- benchmark pallet --chain=dev --steps=50 --repeat=20 --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=. --pallet"
xtask = "run --package xtask --" xtask = "run -Zgit=shallow-deps --package xtask --"
cucumber-node = "run -- --chain=gdev_dev --execution=Native --sealing=manual --force-authoring --rpc-cors=all --tmp --ws-port 9944 --alice --features constant-fees" cucumber-node = "run -Zgit=shallow-deps -- --chain=gdev_dev --execution=Native --sealing=manual --force-authoring --rpc-cors=all --tmp --ws-port 9944 --alice --features constant-fees"
...@@ -70,10 +70,10 @@ fmt_and_clippy: ...@@ -70,10 +70,10 @@ fmt_and_clippy:
- when: manual - when: manual
stage: quality stage: quality
script: script:
- cargo fmt -- --version - cargo fmt -- --version
- cargo fmt -- --check - cargo fmt -- --check
- cargo clippy -- -V - cargo clippy -- -V
- cargo clippy --features runtime-benchmarks --all --tests -- -D warnings - cargo clippy -Zgit=shallow-deps --features runtime-benchmarks --all --tests -- -D warnings
run_benchmarks: run_benchmarks:
extends: .env extends: .env
...@@ -86,7 +86,7 @@ run_benchmarks: ...@@ -86,7 +86,7 @@ run_benchmarks:
- if: '$CI_MERGE_REQUEST_ID || $CI_COMMIT_BRANCH == "master"' - if: '$CI_MERGE_REQUEST_ID || $CI_COMMIT_BRANCH == "master"'
- when: manual - when: manual
script: script:
- cargo build --release --features runtime-benchmarks - cargo build -Zgit=shallow-deps --release --features runtime-benchmarks
- target/release/duniter benchmark storage --chain=dev --mul=2 --state-version=1 - target/release/duniter benchmark storage --chain=dev --mul=2 --state-version=1
- target/release/duniter benchmark overhead --chain=dev --wasm-execution=compiled --warmup=1 --repeat=100 - target/release/duniter benchmark overhead --chain=dev --wasm-execution=compiled --warmup=1 --repeat=100
- target/release/duniter benchmark pallet --chain=dev --steps=5 --repeat=2 --pallet="*" --extrinsic="*" --wasm-execution=compiled - target/release/duniter benchmark pallet --chain=dev --steps=5 --repeat=2 --pallet="*" --extrinsic="*" --wasm-execution=compiled
...@@ -108,7 +108,7 @@ gdev_build: ...@@ -108,7 +108,7 @@ gdev_build:
script: script:
- apt-get update - apt-get update
- apt-get install -y clang cmake protobuf-compiler - apt-get install -y clang cmake protobuf-compiler
- cargo build --no-default-features --features gtest - cargo build -Zgit=shallow-deps --no-default-features --features gtest
gdev_srtool_build: gdev_srtool_build:
stage: build stage: build
...@@ -314,8 +314,8 @@ create_g1_data: ...@@ -314,8 +314,8 @@ create_g1_data:
script: script:
- apt-get update - apt-get update
- apt-get install -y clang cmake protobuf-compiler - apt-get install -y clang cmake protobuf-compiler
- cargo run ${FEATURES} -- build-spec --chain=${RUNTIME}_live > release/${RUNTIME}.json - cargo run -Zgit=shallow-deps ${FEATURES} -- build-spec --chain=${RUNTIME}_live > release/${RUNTIME}.json
- cargo run ${FEATURES} -- build-spec --chain=release/${RUNTIME}.json --disable-default-bootnode --raw > release/${RUNTIME}-raw.json - cargo run -Zgit=shallow-deps ${FEATURES} -- build-spec --chain=release/${RUNTIME}.json --disable-default-bootnode --raw > release/${RUNTIME}-raw.json
- cp node/specs/${RUNTIME}_client-specs.yaml release/ - cp node/specs/${RUNTIME}_client-specs.yaml release/
artifacts: artifacts:
name: "runtime" name: "runtime"
......
This diff is collapsed.
...@@ -48,8 +48,8 @@ ARG chain="gdev" ...@@ -48,8 +48,8 @@ ARG chain="gdev"
RUN set -x && \ RUN set -x && \
cat /root/dynenv && \ cat /root/dynenv && \
. /root/dynenv && \ . /root/dynenv && \
cargo build --locked $CARGO_OPTIONS --no-default-features $BENCH_OPTIONS --features $chain --target "$RUST_ARCH_TRIPLET" && \ cargo build -Zgit=shallow-deps --locked $CARGO_OPTIONS --no-default-features $BENCH_OPTIONS --features $chain --target "$RUST_ARCH_TRIPLET" && \
cargo build --locked $CARGO_OPTIONS --target "$RUST_ARCH_TRIPLET" --package distance-oracle && \ cargo build -Zgit=shallow-deps --locked $CARGO_OPTIONS --target "$RUST_ARCH_TRIPLET" --package distance-oracle && \
mkdir -p build && \ mkdir -p build && \
mv target/$RUST_ARCH_TRIPLET/$TARGET_FOLDER/duniter build/ && \ mv target/$RUST_ARCH_TRIPLET/$TARGET_FOLDER/duniter build/ && \
mv target/$RUST_ARCH_TRIPLET/$TARGET_FOLDER/distance-oracle build/ mv target/$RUST_ARCH_TRIPLET/$TARGET_FOLDER/distance-oracle build/
...@@ -58,7 +58,7 @@ RUN set -x && \ ...@@ -58,7 +58,7 @@ RUN set -x && \
ARG cucumber=0 ARG cucumber=0
RUN if [ "$cucumber" != 0 ] && [ "$TARGETPLATFORM" = "$BUILDPLATFORM" ]; then \ RUN if [ "$cucumber" != 0 ] && [ "$TARGETPLATFORM" = "$BUILDPLATFORM" ]; then \
cargo ta && \ cargo ta && \
cargo test --workspace --exclude duniter-end2end-tests --exclude duniter-live-tests --features=runtime-benchmarks,constant-fees \ cargo test -Zgit=shallow-deps --workspace --exclude duniter-end2end-tests --exclude duniter-live-tests --features=runtime-benchmarks,constant-fees \
cd target/debug/deps/ && \ cd target/debug/deps/ && \
rm cucumber_tests-*.d && \ rm cucumber_tests-*.d && \
mv cucumber_tests* ../../../build/duniter-cucumber; \ mv cucumber_tests* ../../../build/duniter-cucumber; \
......
...@@ -10,6 +10,8 @@ ParityTech frequently releases upgrades of the polkadot-sdk. For each upgrade, D ...@@ -10,6 +10,8 @@ ParityTech frequently releases upgrades of the polkadot-sdk. For each upgrade, D
* Create a new branch: `git checkout -b duniter-polkadot-v1.9.0` * Create a new branch: `git checkout -b duniter-polkadot-v1.9.0`
* Rebase the branch, keeping only specific commits: "fix treasury benchmarks when no SpendOrigin", "allow manual seal to produce non-empty blocks with BABE", "add custom pallet-balance GenesisConfig", and "remove pallet-balances upgrade_account extrinsic". * Rebase the branch, keeping only specific commits: "fix treasury benchmarks when no SpendOrigin", "allow manual seal to produce non-empty blocks with BABE", "add custom pallet-balance GenesisConfig", and "remove pallet-balances upgrade_account extrinsic".
* Push the new branch: `git push` * Push the new branch: `git push`
* Create the lightweight branch that drops the non-Substrate parts of the repository using the command `git subtree split --prefix substrate/ --branch duniter-substrate-light-v1.9.0`.
* Checkout and push the new branch.
## 2. Upgrade duniter subxt ## 2. Upgrade duniter subxt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment