From a5db6881b88f7156e2c8478e50a59161d964dc01 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Thu, 11 Aug 2022 22:41:08 -0700 Subject: [PATCH] Speed up CI a bit (#119) * Sleep for 1s * use premade image * quicker * revert shutdown timeout --- .circleci/config.yml | 2 +- .circleci/run_tests.sh | 2 ++ Dockerfile.ci | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.ci diff --git a/.circleci/config.yml b/.circleci/config.yml index 337dcdc..1d3449a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor docker: - - image: cimg/rust:1.62.0 + - image: levkk/pgcat-ci:latest environment: RUST_LOG: info RUSTFLAGS: "-C instrument-coverage" diff --git a/.circleci/run_tests.sh b/.circleci/run_tests.sh index 12e2036..835bd10 100644 --- a/.circleci/run_tests.sh +++ b/.circleci/run_tests.sh @@ -122,6 +122,8 @@ sed -i 's/pool_mode = "transaction"/pool_mode = "session"/' .circleci/pgcat.toml # Reload config test kill -SIGHUP $(pgrep pgcat) +sleep 1 + # Prepared statements that will only work in session mode pgbench -U sharding_user -h 127.0.0.1 -p 6432 -t 500 -c 2 --protocol prepared diff --git a/Dockerfile.ci b/Dockerfile.ci new file mode 100644 index 0000000..8f8ab94 --- /dev/null +++ b/Dockerfile.ci @@ -0,0 +1,8 @@ +FROM cimg/rust:1.62.0 +RUN sudo apt-get update && \ + sudo apt-get install -y psmisc postgresql-contrib-12 postgresql-client-12 ruby ruby-dev libpq-dev python3 python3-pip lcov llvm-11 && \ + sudo apt-get upgrade curl +RUN cargo install cargo-binutils rustfilt && \ + rustup component add llvm-tools-preview +RUN pip3 install psycopg2 && \ + sudo gem install bundler