From 05fa1d787e854a2fa9a3faf6b5f058868a834e2f Mon Sep 17 00:00:00 2001 From: dkijania Date: Tue, 3 Oct 2023 18:58:24 +0200 Subject: [PATCH] use predeployed test executive fix fix path change base docker debug one more fix rename bin fix paths compilation fix add minima run in CI --- .../scripts/run-test-executive-minimina.sh | 49 +++++++++++++++++++ buildkite/src/Command/TestExecutive.dhall | 16 ++++++ .../Jobs/Test/TestnetIntegrationTests.dhall | 27 +--------- 3 files changed, 66 insertions(+), 26 deletions(-) create mode 100755 buildkite/scripts/run-test-executive-minimina.sh diff --git a/buildkite/scripts/run-test-executive-minimina.sh b/buildkite/scripts/run-test-executive-minimina.sh new file mode 100755 index 000000000000..16358ca907f0 --- /dev/null +++ b/buildkite/scripts/run-test-executive-minimina.sh @@ -0,0 +1,49 @@ +#!/bin/bash +set -o pipefail -x + +TEST_NAME="$1" +$MINA_DOCKER_TAG="2.0.0rampup4-14047c5-bullseye" +MINA_IMAGE="gcr.io/o1labs-192920/mina-daemon:$MINA_DOCKER_TAG-berkeley" +ARCHIVE_IMAGE="gcr.io/o1labs-192920/mina-archive:$MINA_DOCKER_TAG" + +if [[ "${TEST_NAME:0:15}" == "block-prod-prio" ]] && [[ "$RUN_OPT_TESTS" == "" ]]; then + echo "Skipping $TEST_NAME" + exit 0 +fi + +# Don't prompt for answers during apt-get install +export DEBIAN_FRONTEND=noninteractive + +apt-get update +apt-get install -y git apt-transport-https ca-certificates tzdata curl + +TESTNET_NAME="berkeley" + +git config --global --add safe.directory /workdir + +source buildkite/scripts/export-git-env-vars.sh + +echo "Installing mina daemon package: mina-test-executive" +echo "deb [trusted=yes] http://packages.o1test.net ubuntu stable" | tee /etc/apt/sources.list.d/mina.list +apt-get update +apt-get install --allow-downgrades -y "minimina" + +echo "Installing mina daemon package: mina-test-executive=${MINA_DEB_VERSION}" +echo "deb [trusted=yes] http://packages.o1test.net $MINA_DEB_CODENAME $MINA_DEB_RELEASE" | tee /etc/apt/sources.list.d/mina.list +apt-get update +apt-get install --allow-downgrades -y "mina-test-executive=2.0.0rampup3-abstract-engine-5bbaf69" + + +mina-test-executive_2.0.0rampup3-abstract-engine-5bbaf69.deb + +git clone https://github.com/MinaFoundation/lucy-keypairs.git + +mina-test-executive abstract "$TEST_NAME" \ + --network-runner /usr/bin/minimina \ + --config /var/lib/mina/minimina.json \ + --keypairs-path lucy-keypairs + --mina-image "$MINA_IMAGE" \ + --archive-image "$ARCHIVE_IMAGE" \ + --mina-automation-location ./automation \ + | tee "$TEST_NAME.test.log" \ + | logproc -i inline -f '!(.level in ["Debug", "Spam"])' diff --git a/buildkite/src/Command/TestExecutive.dhall b/buildkite/src/Command/TestExecutive.dhall index 8e7eaa2b1646..19d946eae158 100644 --- a/buildkite/src/Command/TestExecutive.dhall +++ b/buildkite/src/Command/TestExecutive.dhall @@ -55,6 +55,22 @@ in depends_on = dependsOn }, + executeMinimina = \(testName : Text) -> + Command.build + Command.Config::{ + commands = [ + Cmd.runInDocker + Cmd.Docker::{ + image = (../Constants/ContainerImages.dhall).ubuntu2004 + } + "./buildkite/scripts/run-test-executive-minimina.sh ${testName}" + ], + artifact_paths = [SelectFiles.exactly "." "${testName}.test.log"], + label = "${testName} integration test minimina", + key = "integration-test-${testName}-minimina", + target = Size.Integration + }, + buildJs = \(duneProfile : Text) -> Command.build Command.Config::{ diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall index be2e42fee414..8635805dd4e5 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall @@ -5,18 +5,6 @@ let Pipeline = ../../Pipeline/Dsl.dhall let PipelineMode = ../../Pipeline/Mode.dhall let TestExecutive = ../../Command/TestExecutive.dhall -let dependsOn = [ - { name = "TestnetIntegrationTests", key = "build-test-executive" }, - { name = "MinaArtifactBullseye", key = "daemon-berkeley-bullseye-docker-image" }, - { name = "MinaArtifactBullseye", key = "archive-bullseye-docker-image" } -] -let dependsOnJs = [ - { name = "TestnetIntegrationTests", key = "build-test-executive" }, - { name = "TestnetIntegrationTests", key = "build-js-tests" }, - { name = "MinaArtifactBullseye", key = "daemon-berkeley-bullseye-docker-image" }, - { name = "MinaArtifactBullseye", key = "archive-bullseye-docker-image" } -] - in Pipeline.build Pipeline.Config::{ spec = JobSpec::{ @@ -33,19 +21,6 @@ in Pipeline.build Pipeline.Config::{ mode = PipelineMode.Type.Stable }, steps = [ - TestExecutive.build "integration_tests", - TestExecutive.buildJs "integration_tests", - TestExecutive.execute "peers-reliability" dependsOn, - TestExecutive.execute "chain-reliability" dependsOn, - TestExecutive.execute "payment" dependsOn, - TestExecutive.execute "gossip-consis" dependsOn, - TestExecutive.execute "block-prod-prio" dependsOn, - TestExecutive.execute "medium-bootstrap" dependsOn, - TestExecutive.execute "block-reward" dependsOn, - TestExecutive.execute "zkapps" dependsOn, - TestExecutive.execute "zkapps-timing" dependsOn, - TestExecutive.execute "zkapps-nonce" dependsOn, - TestExecutive.execute "verification-key" dependsOn, - TestExecutive.executeWithJs "snarkyjs" dependsOnJs + TestExecutive.executeMinimina "gossip-consis" ] }