Skip to content

Commit

Permalink
[cicd] reduce parallelism to cut down on costs
Browse files Browse the repository at this point in the history
e2e tests take about 40 minutes total and about 15 minutes to setup:
1 runner -- 55 minutes
2 runners -- 35 minutes
3 runners -- 28 minutes

the better approach is to figure out how to clean up the shell script to
run two jobs at a time...

while the unit tests  can take up to an hour, they normally run really
quickly thanks to nextest

benchmarks take forever to compile and shouldn't be using non-standard
interfaces, so disabling just because
  • Loading branch information
davidiw committed Mar 2, 2022
1 parent 518174b commit d65ab25
Showing 1 changed file with 7 additions and 36 deletions.
43 changes: 7 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- run: cargo xclippy --workspace --all-targets
- run: cargo fmt
- run: cargo xfmt --check
e2e-test-0:
e2e-test:
machine:
image: ubuntu-2004:current
resource_class: xlarge
Expand All @@ -40,53 +40,24 @@ jobs:
- build-and-split
- run: mv /tmp/tests.0 /tmp/tests_to_run
- run-e2e-tests
e2e-test-1:
machine:
image: ubuntu-2004:current
resource_class: xlarge
steps:
- dev-setup
- build-and-split
- run: mv /tmp/tests.1 /tmp/tests_to_run
- run-e2e-tests
e2e-test-2:
machine:
image: ubuntu-2004:current
resource_class: xlarge
steps:
- dev-setup
- build-and-split
- run: mv /tmp/tests.2 /tmp/tests_to_run
- run-e2e-tests
unit-test-0:
unit-test:
machine:
image: ubuntu-2004:current
resource_class: xlarge
steps:
- dev-setup
- run: cargo xtest --package jsonrpc-integration-tests --changed-since "origin/main"
- run: cargo xtest --doc --jobs 8 --unit --changed-since "origin/main"
- run: cargo nextest --nextest-profile ci --partition hash:1/2 --jobs 6 --test-threads 8 --unit --exclude backup-cli --changed-since "origin/main"
unit-test-1:
machine:
image: ubuntu-2004:current
resource_class: xlarge
steps:
- dev-setup
- run: cargo nextest --nextest-profile ci --partition hash:2/2 --jobs 6 --test-threads 8 --unit --exclude backup-cli --changed-since "origin/main"
- run: cargo nextest --nextest-profile ci --partition hash:1/1 --jobs 6 --test-threads 8 --unit --exclude backup-cli --changed-since "origin/main"

workflows:
build-test-deploy:
jobs:
- build-benchmarks
# - build-benchmarks
- crypto
- e2e-test-0
- e2e-test-1
- e2e-test-2
- e2e-test
- lint
- unit-test-0
- unit-test-1

- unit-test
commands:
dev-setup:
steps:
Expand All @@ -100,7 +71,7 @@ commands:
- run: |
cargo x test --package smoke-test --jobs 8 -- --list | grep "::" | sed 's/: .*$//' > e2e_tests
echo -e "Found $(wc -l e2e_tests) tests."
split -n r/3 -d -a 1 e2e_tests /tmp/tests.
split -n r/1 -d -a 1 e2e_tests /tmp/tests.
run-e2e-tests:
steps:
- run: |
Expand Down

0 comments on commit d65ab25

Please sign in to comment.