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
This commit is part of merge request !236. Comments created here will be created in the context of that merge request.
...@@ -76,10 +76,8 @@ fmt_and_clippy: ...@@ -76,10 +76,8 @@ fmt_and_clippy:
- cargo clippy --features runtime-benchmarks --all --tests -- -D warnings - cargo clippy --features runtime-benchmarks --all --tests -- -D warnings
run_benchmarks: run_benchmarks:
extends: .env
stage: tests 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: rules:
- if: $CI_COMMIT_REF_NAME =~ /^wip*$/ - if: $CI_COMMIT_REF_NAME =~ /^wip*$/
when: manual when: manual
...@@ -87,13 +85,11 @@ run_benchmarks: ...@@ -87,13 +85,11 @@ run_benchmarks:
when: never when: never
- if: '$CI_MERGE_REQUEST_ID || $CI_COMMIT_BRANCH == "master"' - if: '$CI_MERGE_REQUEST_ID || $CI_COMMIT_BRANCH == "master"'
- when: manual - when: manual
variables: script:
IMAGE_NAME: "duniter/duniter-v2s-test" - cargo build --release --features runtime-benchmarks
IMAGE_TAG: "debug-sha-$CI_COMMIT_SHORT_SHA" - target/release/duniter benchmark storage --chain=dev --mul=2 --state-version=1
PODMAN_BUILD_OPTIONS: "--target build --build-arg benchmarks=1" - target/release/duniter benchmark overhead --chain=dev --wasm-execution=compiled --warmup=1 --repeat=100
tags: - target/release/duniter benchmark pallet --chain=dev --steps=5 --repeat=2 --pallet="*" --extrinsic="*" --wasm-execution=compiled
- podman
# FIXME: "gtest_build" # FIXME: "gtest_build"
gdev_build: gdev_build:
stage: build stage: build
......
...@@ -33,11 +33,6 @@ RUN if [ "$debug" = 0 ]; then \ ...@@ -33,11 +33,6 @@ RUN if [ "$debug" = 0 ]; then \
echo "TARGET_FOLDER=debug" >>/root/dynenv; \ echo "TARGET_FOLDER=debug" >>/root/dynenv; \
fi 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 # Configure cross-build environment if need be
RUN set -x && \ RUN set -x && \
if [ "$TARGETPLATFORM" != "$BUILDPLATFORM" ]; then \ if [ "$TARGETPLATFORM" != "$BUILDPLATFORM" ]; then \
...@@ -69,11 +64,6 @@ RUN if [ "$cucumber" != 0 ] && [ "$TARGETPLATFORM" = "$BUILDPLATFORM" ]; then \ ...@@ -69,11 +64,6 @@ RUN if [ "$cucumber" != 0 ] && [ "$TARGETPLATFORM" = "$BUILDPLATFORM" ]; then \
mv cucumber_tests* ../../../build/duniter-cucumber; \ mv cucumber_tests* ../../../build/duniter-cucumber; \
fi 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 # 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