From 129f85f652e79a555a79ee92e96eaf0a75baf52c Mon Sep 17 00:00:00 2001 From: Eric Seppanen Date: Sun, 2 May 2021 16:27:47 -0700 Subject: [PATCH] circleci: shallow clone the postgres repo Fetching the postgres submodule is one of the more expensive steps of the build. Doing a shallow clone ("--depth 1") should save some time and a lot of network bandwidth. --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0f0ca9bc32..2c6f4c0c57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,7 +45,8 @@ jobs: name: build postgres command: | if [ ! -e tmp_install/bin/postgres ]; then - git submodule update --init --recursive + # "depth 1" saves some time by not cloning the whole repo + git submodule update --init --depth 1 make postgres fi @@ -131,7 +132,7 @@ jobs: - when: condition: << parameters.needs_postgres_source >> steps: - - run: git submodule update --init --recursive + - run: git submodule update --init --depth 1 - run: pip install pytest psycopg2 - run: name: Run pytest