Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ jobs:
- name: Prepare directories
run: bash ci/prepare-dirs.sh

- name: Cache installed dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ~/local
key: ${{ inputs.cache_key }}

- name: Cache Arrow third-party downloads
id: cache-arrow-thirdparty
uses: actions/cache@v4
Expand All @@ -62,21 +55,14 @@ jobs:
run: bash ci/free-disk-space.sh

- name: Build and install Greenplum
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash ci/build-gpdb.sh "${{ inputs.gpdb_repo }}" "${{ inputs.gpdb_ref }}" ${{ inputs.open_gpdb && 'open-gpdb' || '' }}

- name: Build and install Arrow 15
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash ci/build-arrow.sh

- name: Build and install gRPC
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash ci/build-grpc.sh

- name: Verify open-gpdb defines OPENGPDB
if: inputs.open_gpdb
run: bash ci/verify-opengpdb-define.sh

- name: Build Tea
run: bash ci/build-tea.sh

Expand Down
57 changes: 11 additions & 46 deletions ci/build-gpdb.sh
Original file line number Diff line number Diff line change
@@ -1,52 +1,17 @@
#!/usr/bin/env bash
# Build and install Greenplum 6 into $HOME/local/gpdb.
#
# Usage: build-gpdb.sh <repo-url> <ref> [open-gpdb]
#
# Passing "open-gpdb" as the third argument enables the fixups needed for the
# open-gpdb fork (see the inline comments below); arenadata/gpdb builds without
# them.
set -eo pipefail

repo="$1"
ref="$2"
mode="${3:-}"
TARGET_DIR="$HOME/local/gpdb"
PACKAGE_URL="https://github.com/GreengageDB/greengage/releases/download/6.29.2/greengage6.deb"

git clone "$repo" -b "$ref" --depth 1 gpdb
cd gpdb
git submodule update --init
deb_file=$(mktemp --suffix=.deb)
curl -sL -o "$deb_file" "$PACKAGE_URL"
mkdir -p "$TARGET_DIR"
sudo dpkg -x "$deb_file" "$TARGET_DIR"
rm -f "$deb_file"

configure_extra=()
if [ "$mode" = "open-gpdb" ]; then
# ORCA in open-gpdb still builds with -std=c++98/gnu++98, but the system
# Xerces-C 3.2 (Ubuntu 22.04) requires C++11 (char16_t); bump the ORCA C++
# standard to gnu++14 (gnu++17 would reject ORCA's deprecated throw() specs).
# gnu++14 + -Wextra then surfaces -Wdeprecated-copy / -Wnonnull-compare which
# ORCA's -Werror turns fatal, so append -Wno-error=... last (wins over it).
for mk in src/backend/gpopt/gpopt.mk \
src/backend/gporca/gporca.mk \
src/backend/gporca/libgpos/src/common/Makefile; do
sed -i 's/-std=gnu++98/-std=gnu++14/g; s/-std=c++98/-std=gnu++14/g' "$mk"
printf '\noverride CPPFLAGS := $(CPPFLAGS) -Wno-error=deprecated-copy -Wno-error=nonnull-compare\n' >> "$mk"
done
# open-gpdb defaults --with-mdblocales=yes and hard-requires the mdblocales
# lib/header, which is not available on the CI image.
configure_extra+=(--without-mdblocales)
fi
sudo chown -R "$USER:$USER" "$TARGET_DIR"

# TODO(gmusya): consider using --enable-cassert
./configure --with-perl --with-python --with-libxml --with-gssapi \
--with-pythonsrc-ext "${configure_extra[@]}" --prefix="$HOME/local/gpdb"

if [ "$mode" = "open-gpdb" ]; then
# src/common (FRONTEND) includes the backend-generated utils/errcodes.h but
# has no order-only dep on it, so -j8 races ("errcodes.h: No such file").
# Force the generated header first.
make -C src/backend submake-errcodes
fi

make -j8
make -j8 install

cd ..
rm -rf gpdb
mv "$TARGET_DIR/opt/greengagedb/greengage"/* "$TARGET_DIR/" 2>/dev/null || true
mv "$TARGET_DIR/opt/greengagedb/greengage"/.* "$TARGET_DIR/" 2>/dev/null || true
rm -rf "$TARGET_DIR/opt"
2 changes: 1 addition & 1 deletion ci/deploy-tea-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -eo pipefail

config="${1:-test/config/tea-config.json}"

source "$HOME/local/gpdb/greenplum_path.sh"
source "$HOME/local/gpdb/greengage_path.sh"
mkdir -p "$GPHOME/tea"
cp "$config" "$GPHOME/tea/tea-config.json"
cp test/config/tea-config-schema.json "$GPHOME/tea/tea-config-schema.json"
2 changes: 1 addition & 1 deletion ci/run-smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Usage: run-smoke.sh <metadata_type> <table_type> <profile>
set -eo pipefail

source "$HOME/local/gpdb/greenplum_path.sh"
source "$HOME/local/gpdb/greengage_path.sh"
export MASTER_DATA_DIRECTORY=/gpdata/master/gpsne-1
build/tea/smoke_test/smoke_test \
--metadata_type="$1" \
Expand Down
2 changes: 1 addition & 1 deletion ci/start-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sudo locale-gen "ru_RU.CP1251"
sudo mkdir -p /gpdata
sudo chown "$USER" /gpdata

source "$HOME/local/gpdb/greenplum_path.sh"
source "$HOME/local/gpdb/greengage_path.sh"
export MASTER_DATA_DIRECTORY=/gpdata/master/gpsne-1
NUM_SEGS=2 bash test/start-gp.sh "$HOME/local/gpdb" /gpdata

Expand Down
7 changes: 0 additions & 7 deletions ci/verify-opengpdb-define.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test/start-gp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ done

# Not following ...: does not exist
# shellcheck disable=SC1091
source "$gp_root"/greenplum_path.sh
source "$gp_root"/greengage_path.sh

mkdir "$config_dir" "$master_dir" "${seg_dirs[@]}"
readonly hostlist="$config_dir/hostlist"
Expand Down
Loading