Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8a1eefb
Update print statement from 'Hello' to 'Goodbye'
stutiibm Aug 3, 2026
d3fad93
Update currency-build.yaml
stutiibm Aug 3, 2026
c529edc
Add environment variables for CVE scanning
stutiibm Aug 3, 2026
4082a56
Update build_wheels.sh
stutiibm Aug 3, 2026
4226276
Refactor wheel wrapper script for dependency installation
stutiibm Aug 3, 2026
783405e
Refactor read_buildinfo.sh for clarity and functionality
stutiibm Aug 3, 2026
6d7638b
Refactor grype availability check and usage
stutiibm Aug 3, 2026
21b8341
Update grype_code_scan.sh
stutiibm Aug 3, 2026
962bc2e
Update grype_image_scan.sh
stutiibm Aug 3, 2026
c0a8f92
Update build_package.sh
stutiibm Aug 3, 2026
a7408c6
Change GITHUB_BUILD_SCRIPT_BASE_OWNER to stutiibm
stutiibm Aug 3, 2026
678bd97
Enhance version selection for changed scripts
stutiibm Aug 3, 2026
db4d89d
Update pr-build.yaml
stutiibm Aug 3, 2026
897f981
Update pr-build.yaml
stutiibm Aug 3, 2026
bee6e2e
Refactor UBI build scripts to use THIS_SCRIPT variable
stutiibm Aug 3, 2026
9eb5e01
Delete m/multidict/multidict_ubi_9.3.sh
stutiibm Aug 3, 2026
f9c2064
Delete s/scikit-learn/scikit-learn_1.9.0_ubi_10.1.sh
stutiibm Aug 3, 2026
0b9f3d4
Delete s/scikit-learn/scikit-learn_ubi_8.10.sh
stutiibm Aug 3, 2026
483a805
Delete s/scikit-learn/scikit-learn_1.7.0_ubi_9.3.sh
stutiibm Aug 3, 2026
d6a03b7
Update pr-build.yaml
stutiibm Aug 3, 2026
994b1ba
Fix wheel jobs: capture BUILD_SCRIPT and TESTED_ON before source vari…
stutiibm Aug 3, 2026
e24facd
Fix all 12 wheel jobs: capture BUILD_SCRIPT+TESTED_ON before source v…
stutiibm Aug 3, 2026
1444529
Update pr-build.yaml
stutiibm Aug 3, 2026
52d55ec
Update post_process_wheel.py
stutiibm Aug 3, 2026
47f4bc2
Add UBI10 build and wheel jobs, fix multi-UBI routing in PR workflow
stutiibm Aug 3, 2026
1028f53
Add UBI10 build and wheel jobs to currency build workflow
stutiibm Aug 3, 2026
a182de5
Add UBI10 support and multi-script bucketing to read_buildinfo.sh
stutiibm Aug 3, 2026
7986eee
Generalise UBI image resolution in build_package.sh to support UBI10
stutiibm Aug 3, 2026
94a3a43
Generalise UBI image resolution in build_wheels.sh to support UBI10
stutiibm Aug 3, 2026
1524849
Pass GRYPE_BIN and ENABLE_CVE_SCAN into wheel build container
stutiibm Aug 3, 2026
0d5a163
Add UBI10 GCC toolset support in create_wheel_wrapper.sh
stutiibm Aug 3, 2026
c25fd5c
Resolve grype binary via GRYPE_BIN env var in wheel scanner
stutiibm Aug 3, 2026
ddc26be
Improve COS configuration handling
stutiibm Aug 3, 2026
cc1b950
Use pre-cached grype binary in grype_code_scan.sh
stutiibm Aug 3, 2026
9b034ab
Use pre-cached grype binary in grype_image_scan.sh
stutiibm Aug 3, 2026
3c7b028
Restore GITHUB_BUILD_SCRIPT_BASE_OWNER to ppc64le
stutiibm Aug 3, 2026
388a3dc
Restore GITHUB_BUILD_SCRIPT_BASE_OWNER to ppc64le
stutiibm Aug 4, 2026
08fbf1f
Remove wheel_build_ubi8_py314: Python 3.14 not supported on UBI8
stutiibm Aug 4, 2026
b4f179c
Remove wheel_build_ubi8_py313: Python 3.13 not supported on UBI8
stutiibm Aug 4, 2026
b6d4c3f
Remove wheel_build_ubi8_py310: Python 3.10 not supported on UBI8
stutiibm Aug 4, 2026
c57336f
Removed python3.10, 3.13, 3.14 support for wheel_build ubi8
stutiibm Aug 4, 2026
7e875f9
Remove UBI8 wheel build jobs for Python 3.10 and 3.13
stutiibm Aug 4, 2026
4f35a99
Merge branch 'master' into ubi10-pipeline-changes
stutiibm Aug 4, 2026
e2b84f6
Merge pull request #218 from stutiibm/ubi10-pipeline-changes
stutiibm Aug 4, 2026
b3074b0
Update validate_builds.py
stutiibm Aug 4, 2026
9015b53
Update build_info.json
stutiibm Aug 4, 2026
2478d06
Update and rename duckdb_1.5.4_ubi_9.6.sh to duckdb_1.5.4_ubi_10.2.sh
stutiibm Aug 4, 2026
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
1,965 changes: 1,135 additions & 830 deletions .github/workflows/currency-build.yaml

Large diffs are not rendered by default.

853 changes: 563 additions & 290 deletions .github/workflows/pr-build.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions d/duckdb/build_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"version": "v1.5.4",
"default_branch": "main",
"package_dir": "d/duckdb",
"build_script": "duckdb_1.5.4_ubi_9.6.sh",
"build_script": "duckdb_1.5.4_ubi_10.2.sh",
"docker_build": false,
"validate_build_script": true,
"wheel_build" : true,
"use_non_root_user": false,
"1.5.4": {
"build_script": "duckdb_1.5.4_ubi_9.6.sh"
"build_script": "duckdb_1.5.4_ubi_10.2.sh"
},
"*": {
"build_script": "duckdb_ubi_9.6.sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Package : duckdb
# Version : v1.5.4
# Source repo : https://github.com/duckdb/duckdb-python.git
# Tested on : UBI:9.6
# Tested on : UBI:10.2
# Language : Python, C++
# Ci-Check : True
# Script License: Apache License, Version 2 or later
Expand All @@ -23,42 +23,41 @@ PACKAGE_VERSION=${1:-v1.5.4}
PACKAGE_DIR=duckdb-python
PACKAGE_URL=https://github.com/duckdb/duckdb-python.git
PYTHON_VERSION=3.12
SOURCE_ROOT="$(pwd)"

# Install necessary system packages
dnf install -y gcc-toolset-13 make cmake ninja-build libomp-devel git python${PYTHON_VERSION} python${PYTHON_VERSION}-pip python${PYTHON_VERSION}-devel
dnf install -y \
gcc-toolset-15 \
cmake \
ninja-build \
python3.12 \
python3.12-devel \
python3.12-pip

# Enable GCC toolset
source /opt/rh/gcc-toolset-13/enable
export CXX=/opt/rh/gcc-toolset-13/root/usr/bin/g++
export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:$PATH"
gcc --version

python3.12 -m pip install --upgrade pip setuptools

python${PYTHON_VERSION} -m pip install build wheel setuptools ninja pybind11
# -- Build wheel --------------------------------------------------------------
python3.12 -m pip wheel . --no-deps -w "${CURRENT_DIR}/dist/"

# Clone the repository
git clone ${PACKAGE_URL}
cd ${PACKAGE_NAME}
git checkout ${PACKAGE_VERSION}

git submodule update --init --recursive

export DUCKDB_BUILD_PYTHON=1
export DUCKDB_BUILD_STATIC=1

echo "Building duckdb wheel..."
if ! python${PYTHON_VERSION} -m build --wheel; then
echo "------------------$PACKAGE_NAME: build_fail------------------"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Build_Fail"
WHEEL=$(find "${CURRENT_DIR}/dist" -name "duckdb-*.whl" | head -1)
if [ -z "$WHEEL" ]; then
echo "ERROR: wheel not found after build"
exit 1
fi
echo "Wheel: $WHEEL"

echo "Installing duckdb wheel..."
WHEEL_FILE=$(find dist -name "*.whl" | head -n1)
if [ -n "$WHEEL_FILE" ]; then
python${PYTHON_VERSION} -m pip install "$WHEEL_FILE"
# Copy wheel to /home/tester so the wrapper script can locate it without rebuilding
if [ -d /home/tester ]; then
cp "${WHEEL}" /home/tester/
fi

# Run tests
cd /
cd "${SOURCE_ROOT}"

# -- Install ------------------------------------------------------------------
pip3.12 install "$WHEEL"

if ! python${PYTHON_VERSION} - <<EOF
import duckdb
Expand Down Expand Up @@ -89,4 +88,3 @@ else
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success"
exit 0
fi

101 changes: 69 additions & 32 deletions gha-script/build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,81 @@ echo "**************************************************************************

docker_image=""

# the below function is used for building a custom docker image, it will be called only when non root user build is set to true.
# function accepts one argument, which is the base image value.
# Builds a custom non-root wrapper image on top of the given base image.
# Sets docker_image to "docker_non_root_image" on success.
docker_build_non_root() {
echo "building docker image for non root user build"
docker build --build-arg BASE_IMAGE="$1" -t docker_non_root_image -f gha-script/dockerfile_non_root .
docker_image="docker_non_root_image"
}

#Below conditions are used to select the base image based on the 2 flags, tested_on and non_root_build.
#A docker_build_non_root function is called when non root build is true.
if [[ "$TESTED_ON" == UBI:9* || "$TESTED_ON" == UBI9* ]];
then
ubi_version=$(echo "$TESTED_ON" | grep -oE '[0-9]+\.[0-9]+')
docker pull registry.access.redhat.com/ubi9/ubi:$ubi_version
docker_image="registry.access.redhat.com/ubi9/ubi:$ubi_version"
if [[ "$NON_ROOT_BUILD" == "true" ]];
then
docker_build_non_root "registry.access.redhat.com/ubi9/ubi:$ubi_version"
fi
elif [[ "$TESTED_ON" == UBI:10* || "$TESTED_ON" == UBI10* ]];
then
ubi_version=$(echo "$TESTED_ON" | grep -oE '[0-9]+\.[0-9]+')
# Fallback to 10.0 if no minor version found
ubi_version=${ubi_version:-10.0}
docker pull registry.access.redhat.com/ubi10/ubi:$ubi_version
docker_image="registry.access.redhat.com/ubi10/ubi:$ubi_version"
if [[ "$NON_ROOT_BUILD" == "true" ]];
then
docker_build_non_root "registry.access.redhat.com/ubi10/ubi:$ubi_version"
fi
else
docker pull registry.access.redhat.com/ubi8/ubi:8.7
docker_image="registry.access.redhat.com/ubi8/ubi:8.7"
if [[ "$NON_ROOT_BUILD" == "true" ]];
then
docker_build_non_root "registry.access.redhat.com/ubi8/ubi:8.7"
fi
fi
# Resolves the correct UBI registry image from the TESTED_ON string and
# sets the global docker_image variable. Supports UBI8, UBI9, UBI10+.
# The TESTED_ON value is normalised before parsing so all of the following
# formats work: "UBI:9.3" "UBI 9.3" "ubi9.3" "UBI: 9.3" "UBI 10"
resolve_docker_image() {
local raw="$1"
local upper
upper=$(echo "$raw" | tr '[:lower:]' '[:upper:]')

# Collapse "UBI : 9.3" / "UBI:9.3" / "UBI 9.3" / "UBI9.3" -> "UBI9.3"
# Uses sed only - no grep -P (absent on ppc64le runners).
local norm
norm=$(echo "$upper" | sed 's/UBI[[:space:]]*[: ][[:space:]]*/UBI/g')

# Extract the major UBI version integer immediately after "UBI"
local major
major=$(echo "$norm" | sed 's/.*UBI\([0-9][0-9]*\).*/\1/')
case "$major" in
''|*[!0-9]*) major="" ;;
esac

if [ -z "$major" ]; then
echo "ERROR: Cannot determine UBI major version from TESTED_ON='$raw'"
exit 1
fi

# Extract the full version string e.g. "9.3", "10.3" (first X.Y found)
local full
full=$(echo "$upper" | grep -oE '[0-9]+\.[0-9]+' | head -1)

if [ -z "$full" ]; then
# No minor version supplied - use per-major defaults
case "$major" in
8) full="8.7" ;;
9) full="9.3" ;;
10) full="10.0" ;;
*) full="${major}.0" ;;
esac
echo "WARNING: No minor version in TESTED_ON='$raw', defaulting to UBI ${full}"
fi

# Select the registry image by major version
case "$major" in
8)
docker_image="registry.access.redhat.com/ubi8/ubi:${full}"
;;
9)
docker_image="registry.access.redhat.com/ubi9/ubi:${full}"
;;
10)
docker_image="registry.access.redhat.com/ubi10/ubi:${full}"
;;
*)
echo "ERROR: Unsupported UBI major version '${major}' in TESTED_ON='$raw'"
exit 1
;;
esac

echo " Resolved Docker image: $docker_image (TESTED_ON='$raw')"

if [[ "$NON_ROOT_BUILD" == "true" ]]; then
docker_build_non_root "$docker_image"
fi
}

resolve_docker_image "$TESTED_ON"
docker pull "$docker_image"


python3 gha-script/validate_builds_currency.py "$PKG_DIR_PATH$BUILD_SCRIPT" "$VERSION" "$docker_image" 2>&1 | tee build_log
Expand Down
9 changes: 9 additions & 0 deletions gha-script/build_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ def trigger_build_wheel(wrapper_file, python_version, image_name, file_name, ver
"GHA_CURRENCY_SERVICE_ID_API_KEY": os.getenv("GHA_CURRENCY_SERVICE_ID_API_KEY"),
"GHA_CURRENCY_SERVICE_ID": os.getenv("GHA_CURRENCY_SERVICE_ID"),
"AUDITWHEEL_EXCLUDE": os.getenv("AUDITWHEEL_EXCLUDE", ""),
# Grype is installed on the host runner at scan-tools-bin/grype.
# The workspace is volume-mounted at /home/tester/ inside the
# container, so the binary is reachable at that in-container path.
# Passing GRYPE_BIN lets generalized_wheel_scanner.py find it via
# os.environ without relying on $PATH (which is host-only).
"GRYPE_BIN": "/home/tester/scan-tools-bin/grype",
# Set to "false" by pr-build.yaml to skip the CVE scan in PR builds.
# Defaults to "true" (scan runs) when unset (currency-build.yaml).
"ENABLE_CVE_SCAN": os.getenv("ENABLE_CVE_SCAN", "true"),
}
)

Expand Down
114 changes: 68 additions & 46 deletions gha-script/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,83 @@ echo "**************************************************************************

docker_image=""

# the below function is used for building a custom docker image, it will be called only when non root user build is set to true.
# function accepts one argument, which is the base image value.
# Builds a custom non-root wrapper image on top of the given base image.
# Sets docker_image to "docker_non_root_image" on success.
docker_build_non_root() {
echo "building docker image for non root user build"
docker build --build-arg BASE_IMAGE="$1" -t docker_non_root_image -f gha-script/dockerfile_non_root .
docker_image="docker_non_root_image"
}

#Below conditions are used to select the base image based on the 2 flags, tested_on and non_root_build.
#A docker_build_non_root function is called when non root build is true.
if [[ "$TESTED_ON" == UBI:9* || "$TESTED_ON" == UBI9* ]];
then
ubi_version=$(echo "$TESTED_ON" | grep -oE '[0-9]+\.[0-9]+')
docker pull registry.access.redhat.com/ubi9/ubi:$ubi_version
docker_image="registry.access.redhat.com/ubi9/ubi:$ubi_version"
if [[ "$NON_ROOT_BUILD" == "true" ]];
then
docker_build_non_root "registry.access.redhat.com/ubi9/ubi:$ubi_version"
fi
elif [[ "$TESTED_ON" == UBI:10* || "$TESTED_ON" == UBI10* ]];
then
ubi_version=$(echo "$TESTED_ON" | grep -oE '[0-9]+\.[0-9]+')
# Fallback to 10.0 if no minor version found
ubi_version=${ubi_version:-10.0}
docker pull registry.access.redhat.com/ubi10/ubi:$ubi_version
docker_image="registry.access.redhat.com/ubi10/ubi:$ubi_version"
if [[ "$NON_ROOT_BUILD" == "true" ]];
then
docker_build_non_root "registry.access.redhat.com/ubi10/ubi:$ubi_version"
fi
else
docker pull registry.access.redhat.com/ubi8/ubi:8.7
docker_image="registry.access.redhat.com/ubi8/ubi:8.7"
if [[ "$NON_ROOT_BUILD" == "true" ]];
then
docker_build_non_root "registry.access.redhat.com/ubi8/ubi:8.7"
fi
fi
# Resolves the correct UBI registry image from the TESTED_ON string and
# sets the global docker_image variable. Supports UBI8, UBI9, UBI10+.
# The TESTED_ON value is normalised before parsing so all of the following
# formats work: "UBI:9.3" "UBI 9.3" "ubi9.3" "UBI: 9.3" "UBI 10"
resolve_docker_image() {
local raw="$1"
local upper
upper=$(echo "$raw" | tr '[:lower:]' '[:upper:]')

# UBI 10 does not ship Python 3.10 or 3.11 in its repos.
# Building 3.10 from source is not supported for UBI 10 wheel builds.
# Skip those Python versions early to avoid false-positive successes.
if [[ "$TESTED_ON" == UBI:10* || "$TESTED_ON" == UBI10* ]]; then
if [[ "$PYTHON_VERSION" == "3.10" || "$PYTHON_VERSION" == "3.11" ]]; then
echo "Skipping wheel build for Python $PYTHON_VERSION — not supported on UBI 10"
exit 0
fi
fi
# Collapse "UBI : 9.3" / "UBI:9.3" / "UBI 9.3" / "UBI9.3" -> "UBI9.3"
# Uses sed only - no grep -P (absent on ppc64le runners).
local norm
norm=$(echo "$upper" | sed 's/UBI[[:space:]]*[: ][[:space:]]*/UBI/g')

WHEEL_SCRIPT=gha-script/create_wheel_wrapper.sh
# Extract the major UBI version integer immediately after "UBI"
local major
major=$(echo "$norm" | sed 's/.*UBI\([0-9][0-9]*\).*/\1/')
case "$major" in
''|*[!0-9]*) major="" ;;
esac

if [ -z "$major" ]; then
echo "ERROR: Cannot determine UBI major version from TESTED_ON='$raw'"
exit 1
fi

# Ensure the wrapper script is readable and executable by all users.
# Required for non-root container builds where the mounted volume is owned
# by the host runner user but executed as test_user inside the container.
chmod a+rx "$WHEEL_SCRIPT"
# Extract the full version string e.g. "9.3", "10.3" (first X.Y found)
local full
full=$(echo "$upper" | grep -oE '[0-9]+\.[0-9]+' | head -1)

if [ -z "$full" ]; then
# No minor version supplied - use per-major defaults
case "$major" in
8) full="8.7" ;;
9) full="9.3" ;;
10) full="10.0" ;;
*) full="${major}.0" ;;
esac
echo "WARNING: No minor version in TESTED_ON='$raw', defaulting to UBI ${full}"
fi

# Select the registry image by major version
case "$major" in
8)
docker_image="registry.access.redhat.com/ubi8/ubi:${full}"
;;
9)
docker_image="registry.access.redhat.com/ubi9/ubi:${full}"
;;
10)
docker_image="registry.access.redhat.com/ubi10/ubi:${full}"
;;
*)
echo "ERROR: Unsupported UBI major version '${major}' in TESTED_ON='$raw'"
exit 1
;;
esac

echo " Resolved Docker image: $docker_image (TESTED_ON='$raw')"

if [[ "$NON_ROOT_BUILD" == "true" ]]; then
docker_build_non_root "$docker_image"
fi
}

resolve_docker_image "$TESTED_ON"
docker pull "$docker_image"

WHEEL_SCRIPT=gha-script/create_wheel_wrapper.sh

# path to post_process_wheel script (suffix addition, license addition, metadata addition)
POST_PROCESS_SCRIPT_PATH=gha-script/post_process_wheel.py
Expand Down
Loading
Loading