From b8de70add89f431611e6d97eaa455cef94cc3447 Mon Sep 17 00:00:00 2001 From: mircea-c Date: Fri, 4 Jan 2019 10:40:39 -0500 Subject: [PATCH] Merge PR #3220: Extended running time for multi-sim test * Added dependencies block anchor to simplify * Increased blocks to 1000 and removed cache restore * Made the period a parameter in the script * Renamed the jobs because git is confused * Specify period on long sim --- .circleci/config.yml | 98 ++++++++++++++++++-------------------------- PENDING.md | 4 +- scripts/multisim.sh | 5 ++- 3 files changed, 46 insertions(+), 61 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e63e36974..c9a9dc0635 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,30 +39,28 @@ docs_update: &docs_deploy environment: AWS_REGION: us-east-1 - ############ -jobs: +deps: &dependencies + run: + name: dependencies + command: | + export PATH="$GOBIN:$PATH" + make get_vendor_deps +jobs: setup_dependencies: <<: *linux_defaults steps: - run: mkdir -p /tmp/workspace/bin - run: mkdir -p /tmp/workspace/profiles - checkout - - restore_cache: - keys: - - v1-pkg-cache - run: name: tools command: | export PATH="$GOBIN:$PATH" make tools - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: name: binaries command: | @@ -82,11 +80,7 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: name: Get metalinter command: | @@ -105,11 +99,7 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: name: Test cli command: | @@ -124,11 +114,7 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: name: Test individual module simulations command: | @@ -142,11 +128,7 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: name: Test full Gaia simulation command: | @@ -160,11 +142,7 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: name: Test Gaia import/export simulation command: | @@ -178,17 +156,27 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: name: Test Gaia import/export simulation command: | export PATH="$GOBIN:$PATH" make test_sim_gaia_simulation_after_import + test_sim_gaia_multi_seed_long: + <<: *linux_defaults + parallelism: 1 + steps: + - attach_workspace: + at: /tmp/workspace + - checkout + - *dependencies + - run: + name: Test multi-seed Gaia simulation long + command: | + export PATH="$GOBIN:$PATH" + scripts/multisim.sh 800 50 TestFullGaiaSimulation + test_sim_gaia_multi_seed: <<: *linux_defaults parallelism: 1 @@ -196,16 +184,12 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout + - *dependencies - run: - name: dependencies + name: Test multi-seed Gaia simulation short command: | export PATH="$GOBIN:$PATH" - make get_vendor_deps - - run: - name: Test multi-seed Gaia simulation - command: | - export PATH="$GOBIN:$PATH" - scripts/multisim.sh 25 TestFullGaiaSimulation + scripts/multisim.sh 50 10 TestFullGaiaSimulation test_cover: <<: *linux_defaults @@ -214,11 +198,7 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: mkdir -p /tmp/logs - run: name: Run tests @@ -244,11 +224,7 @@ jobs: - attach_workspace: at: /tmp/workspace - checkout - - run: - name: dependencies - command: | - export PATH="$GOBIN:$PATH" - make get_vendor_deps + - *dependencies - run: name: gather command: | @@ -368,6 +344,14 @@ workflows: - test_sim_gaia_multi_seed: requires: - setup_dependencies + - test_sim_gaia_multi_seed_long: + requires: + - setup_dependencies + filters: + branches: + only: + - master + - develop - test_cover: requires: - setup_dependencies diff --git a/PENDING.md b/PENDING.md index d2c9b4bddf..557ac6072b 100644 --- a/PENDING.md +++ b/PENDING.md @@ -74,8 +74,8 @@ IMPROVEMENTS * Tendermint * CI - * \#2498 Added macos CI job to CircleCI - + * \#2498 Added macos CI job to CircleCI + * [#142](https://github.com/tendermint/devops/issues/142) Increased the number of blocks to be tested during multi-sim BUG FIXES diff --git a/scripts/multisim.sh b/scripts/multisim.sh index b8d30772a4..dbd1a9e9ac 100755 --- a/scripts/multisim.sh +++ b/scripts/multisim.sh @@ -3,7 +3,8 @@ seeds=(1 2 4 7 9 20 32 123 124 582 1893 2989 3012 4728 37827 981928 87821 891823782 989182 89182391 \ 11 22 44 77 99 2020 3232 123123 124124 582582 18931893 29892989 30123012 47284728 37827) blocks=$1 -testname=$2 +period=$2 +testname=$3 echo "Running multi-seed simulation with seeds ${seeds[@]}" echo "Running $blocks blocks per seed" @@ -22,7 +23,7 @@ sim() { file="$tmpdir/gaia-simulation-seed-$seed-date-$(date -u +"%Y-%m-%dT%H:%M:%S+00:00").stdout" echo "Writing stdout to $file..." go test ./cmd/gaia/app -run $testname -SimulationEnabled=true -SimulationNumBlocks=$blocks \ - -SimulationVerbose=true -SimulationCommit=true -SimulationSeed=$seed -SimulationPeriod=5 -v -timeout 24h > $file + -SimulationVerbose=true -SimulationCommit=true -SimulationSeed=$seed -SimulationPeriod=$period -v -timeout 24h | tee $file } i=0