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

fix benchmarks in ci

parent a24d42f0
No related branches found
No related tags found
1 merge request!236Upgrade Polkadot-v1.6.0
Pipeline #36028 passed
......@@ -76,10 +76,8 @@ fmt_and_clippy:
- cargo clippy --features runtime-benchmarks --all --tests -- -D warnings
run_benchmarks:
extends: .env
stage: tests
script:
- echo podman build --layers --tag "$IMAGE_NAME:$IMAGE_TAG" -f docker/Dockerfile $PODMAN_BUILD_OPTIONS .
- podman build --layers --tag "$IMAGE_NAME:$IMAGE_TAG" -f docker/Dockerfile $PODMAN_BUILD_OPTIONS .
rules:
- if: $CI_COMMIT_REF_NAME =~ /^wip*$/
when: manual
......@@ -87,13 +85,11 @@ run_benchmarks:
when: never
- if: '$CI_MERGE_REQUEST_ID || $CI_COMMIT_BRANCH == "master"'
- when: manual
variables:
IMAGE_NAME: "duniter/duniter-v2s-test"
IMAGE_TAG: "debug-sha-$CI_COMMIT_SHORT_SHA"
PODMAN_BUILD_OPTIONS: "--target build --build-arg benchmarks=1"
tags:
- podman
script:
- cargo build --release --features runtime-benchmarks
- 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 pallet --chain=dev --steps=5 --repeat=2 --pallet="*" --extrinsic="*" --wasm-execution=compiled
# FIXME: "gtest_build"
gdev_build:
stage: build
......
......@@ -33,11 +33,6 @@ RUN if [ "$debug" = 0 ]; then \
echo "TARGET_FOLDER=debug" >>/root/dynenv; \
fi
ARG benchmarks=0
RUN if [ "$benchmarks" != 0 ]; then \
echo "BENCH_OPTIONS=--features\ runtime-benchmarks" >>/root/dynenv; \
fi
# Configure cross-build environment if need be
RUN set -x && \
if [ "$TARGETPLATFORM" != "$BUILDPLATFORM" ]; then \
......@@ -69,11 +64,6 @@ RUN if [ "$cucumber" != 0 ] && [ "$TARGETPLATFORM" = "$BUILDPLATFORM" ]; then \
mv cucumber_tests* ../../../build/duniter-cucumber; \
fi
# Run runtime benchmarks
RUN if [ "$benchmarks" != 0 ]; then \
build/duniter benchmark pallet --chain dev --wasm-execution=compiled --pallet "*" --extrinsic "*" --steps 2 --repeat 1; \
fi
# ------------------------------------------------------------------------------
# Final Stage
# ------------------------------------------------------------------------------
......
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