diff --git a/docker/ci/Dockerfile b/docker/ci/Dockerfile index b089b627..e42c657b 100644 --- a/docker/ci/Dockerfile +++ b/docker/ci/Dockerfile @@ -4,18 +4,15 @@ RUN apt-get update \ && apt-get install -y clang libclang1 sudo bash cmake \ && rm -rf /var/lib/apt/lists/* -# install cargo pgx -RUN cargo install cargo-pgx --version '^0.2' --root /pgx/0.2 \ - && cargo install cargo-pgx --version '^0.4' --root /pgx/0.4 - -ENV PATH "/pgx/0.2/bin/:${PATH}" - -# install doctester -RUN cargo install --git https://github.com/timescale/timescaledb-toolkit.git --branch main sql-doctester - RUN useradd -ms /bin/bash postgres USER postgres +# install cargo pgx +RUN cargo install cargo-pgx --version '^0.2' --root /home/postgres/pgx/0.2 \ + && cargo install cargo-pgx --version '^0.4' --root /home/postgres/pgx/0.4 + +ENV PATH "/home/postgres/pgx/0.2/bin/:${PATH}" + RUN set -ex \ && cargo pgx init --pg12 download --pg13 download --pg14 download \ && cargo pgx start pg12 \ @@ -34,21 +31,21 @@ RUN set -ex \ && cd timescaledb \ && git checkout 2.5.x \ && cd ~/timescaledb \ - && ./bootstrap -DPG_CONFIG=~/.pgx/12.10/pgx-install/bin/pg_config -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_OPENSSL=false -DSEND_TELEMETRY_DEFAULT=false -DREGRESS_CHECKS=false \ + && ./bootstrap -DPG_CONFIG=~/.pgx/12.11/pgx-install/bin/pg_config -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_OPENSSL=false -DSEND_TELEMETRY_DEFAULT=false -DREGRESS_CHECKS=false \ && cd build \ && make -j4 \ && make -j4 install \ && echo "shared_preload_libraries = 'timescaledb'" >> ~/.pgx/data-12/postgresql.conf \ && cd .. \ && rm -rf ./build \ - && ./bootstrap -DPG_CONFIG=~/.pgx/13.6/pgx-install/bin/pg_config -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_OPENSSL=false -DSEND_TELEMETRY_DEFAULT=false -DREGRESS_CHECKS=false \ + && ./bootstrap -DPG_CONFIG=~/.pgx/13.7/pgx-install/bin/pg_config -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_OPENSSL=false -DSEND_TELEMETRY_DEFAULT=false -DREGRESS_CHECKS=false \ && cd build \ && make -j4 \ && make -j4 install \ && echo "shared_preload_libraries = 'timescaledb'" >> ~/.pgx/data-13/postgresql.conf \ && cd .. \ && rm -rf ./build \ - && ./bootstrap -DPG_CONFIG=~/.pgx/14.2/pgx-install/bin/pg_config -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_OPENSSL=false -DSEND_TELEMETRY_DEFAULT=false -DREGRESS_CHECKS=false \ + && ./bootstrap -DPG_CONFIG=~/.pgx/14.3/pgx-install/bin/pg_config -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_OPENSSL=false -DSEND_TELEMETRY_DEFAULT=false -DREGRESS_CHECKS=false \ && cd build \ && make -j4 \ && make -j4 install \ @@ -56,6 +53,9 @@ RUN set -ex \ && cd ~ \ && rm -rf ~/timescaledb +# install doctester +RUN cargo install --git https://github.com/timescale/timescaledb-toolkit.git --branch main sql-doctester + # add clippy RUN rustup component add clippy