diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4270de6cdb65efb070a89a564099a62c0acd3065..7355dbfebd3f8bdc14a8041e1a94c7cc2ad02d9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/docker/Dockerfile b/docker/Dockerfile index 1ec17eb32138d4bf75d33da34eff401c65ebf18e..62f423629f7fe37f117f0921f5f119843f633237 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 # ------------------------------------------------------------------------------