diff --git a/ci/scripts/build-linux.sh b/ci/scripts/build-linux.sh index a591fbda..3ba50b91 100755 --- a/ci/scripts/build-linux.sh +++ b/ci/scripts/build-linux.sh @@ -34,23 +34,6 @@ function setup_postgres() { echo "port = 5432" >> /etc/postgresql/$PG_VERSION/main/postgresql.conf } -function setup_rust() { - if [ ! -f /tmp/rustup.sh ]; then - curl -k -o /tmp/rustup.sh https://sh.rustup.rs - chmod +x /tmp/rustup.sh - /tmp/rustup.sh -y --default-toolchain=1.78.0 - fi - . "$HOME/.cargo/env" -} - -function setup_cargo_deps() { - if [ ! -d .cargo ]; then - mkdir .cargo - fi - echo "[target.$(rustc -vV | sed -n 's|host: ||p')]" >> .cargo/config - cargo install cargo-pgrx --version 0.11.3 - cargo pgrx init "--pg$PG_VERSION" /usr/bin/pg_config -} function install_platform_specific_dependencies() { # Currently lantern_extras binaries are only available for Linux x86_64 diff --git a/ci/scripts/utils.sh b/ci/scripts/utils.sh index ba9d237b..74387a09 100644 --- a/ci/scripts/utils.sh +++ b/ci/scripts/utils.sh @@ -12,6 +12,24 @@ function setup_environment() { export PG_CRON_COMMIT_SHA=7e91e72b1bebc5869bb900d9253cc9e92518b33f } +function setup_rust() { + if [ ! -f /tmp/rustup.sh ]; then + curl -k -o /tmp/rustup.sh https://sh.rustup.rs + chmod +x /tmp/rustup.sh + /tmp/rustup.sh -y --default-toolchain=1.78.0 + fi + . "$HOME/.cargo/env" +} + +function setup_cargo_deps() { + if [ ! -d .cargo ]; then + mkdir .cargo + fi + echo "[target.$(rustc -vV | sed -n 's|host: ||p')]" >> .cargo/config + cargo install cargo-pgrx --version 0.11.3 + cargo pgrx init "--pg$PG_VERSION" /usr/bin/pg_config +} + function clone_or_use_source() { if [ -z ${USE_SOURCE} ]; then # Clone from git