Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fd379ad

Browse filesBrowse files
committed
update build matrix
1 parent 49babb6 commit fd379ad
Copy full SHA for fd379ad

File tree

Expand file treeCollapse file tree

9 files changed

+348
-203
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+348
-203
lines changed

‎.github/workflows/ubuntu-packages-and-docker-image.yml

Copy file name to clipboardExpand all lines: .github/workflows/ubuntu-packages-and-docker-image.yml
+80-7Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,28 @@ jobs:
1313
strategy:
1414
fail-fast: false # Let the other job finish
1515
matrix:
16-
os: ["buildjet-4vcpu-ubuntu-2204", "buildjet-8vcpu-ubuntu-2204-arm"]
16+
include:
17+
# Ubuntu 24.04 LTS (Noble)
18+
- os: "buildjet-4vcpu-ubuntu-2404"
19+
ubuntu_version: "noble"
20+
arch: "amd64"
21+
- os: "buildjet-8vcpu-ubuntu-2404-arm"
22+
ubuntu_version: "noble"
23+
arch: "arm64"
24+
# Ubuntu 22.04 LTS (Jammy)
25+
- os: "buildjet-4vcpu-ubuntu-2204"
26+
ubuntu_version: "jammy"
27+
arch: "amd64"
28+
- os: "buildjet-8vcpu-ubuntu-2204-arm"
29+
ubuntu_version: "jammy"
30+
arch: "arm64"
31+
# Ubuntu 20.04 LTS (Focal) - Consider removing after April 2025
32+
- os: "buildjet-4vcpu-ubuntu-2004"
33+
ubuntu_version: "focal"
34+
arch: "amd64"
35+
- os: "buildjet-8vcpu-ubuntu-2004-arm"
36+
ubuntu_version: "focal"
37+
arch: "arm64"
1738
runs-on: ${{ matrix.os }}
1839
steps:
1940
- uses: actions/checkout@v3
@@ -78,12 +99,14 @@ jobs:
7899
postgresql-14 \
79100
postgresql-13 \
80101
postgresql-12 \
102+
postgresql-11 \
81103
postgresql-server-dev-17 \
82104
postgresql-server-dev-16 \
83105
postgresql-server-dev-15 \
84106
postgresql-server-dev-14 \
85107
postgresql-server-dev-13 \
86108
postgresql-server-dev-12 \
109+
postgresql-server-dev-11 \
87110
lsb-release \
88111
python3.10 \
89112
python3-pip \
@@ -106,7 +129,13 @@ jobs:
106129
with:
107130
working-directory: pgml-extension
108131
command: pgrx
109-
args: init --pg12=/usr/lib/postgresql/12/bin/pg_config --pg13=/usr/lib/postgresql/13/bin/pg_config --pg14=/usr/lib/postgresql/14/bin/pg_config --pg15=/usr/lib/postgresql/15/bin/pg_config --pg16=/usr/lib/postgresql/16/bin/pg_config --pg17=/usr/lib/postgresql/17/bin/pg_config
132+
args: init --pg11/usr/lib/postgresql/11/bin/pg_config --pg12=/usr/lib/postgresql/12/bin/pg_config --pg13=/usr/lib/postgresql/13/bin/pg_config --pg14=/usr/lib/postgresql/14/bin/pg_config --pg15=/usr/lib/postgresql/15/bin/pg_config --pg16=/usr/lib/postgresql/16/bin/pg_config --pg17=/usr/lib/postgresql/17/bin/pg_config
133+
- name: Build Postgres 11
134+
uses: postgresml/gh-actions-cargo@master
135+
with:
136+
working-directory: pgml-extension
137+
command: pgrx
138+
args: package --pg-config /usr/lib/postgresql/11/bin/pg_config
110139
- name: Build Postgres 12
111140
uses: postgresml/gh-actions-cargo@master
112141
with:
@@ -161,9 +190,30 @@ jobs:
161190
postgresml:
162191
needs: postgresml-pgml
163192
strategy:
164-
fail-fast: false # Let the other job finish
193+
fail-fast: false
165194
matrix:
166-
os: ["ubuntu-22.04"]
195+
include:
196+
# Ubuntu 24.04 LTS (Noble)
197+
- os: "buildjet-4vcpu-ubuntu-2404"
198+
ubuntu_version: "noble"
199+
arch: "amd64"
200+
- os: "buildjet-8vcpu-ubuntu-2404-arm"
201+
ubuntu_version: "noble"
202+
arch: "arm64"
203+
# Ubuntu 22.04 LTS (Jammy)
204+
- os: "buildjet-4vcpu-ubuntu-2204"
205+
ubuntu_version: "jammy"
206+
arch: "amd64"
207+
- os: "buildjet-8vcpu-ubuntu-2204-arm"
208+
ubuntu_version: "jammy"
209+
arch: "arm64"
210+
# Ubuntu 20.04 LTS (Focal) - Consider removing after April 2025
211+
- os: "buildjet-4vcpu-ubuntu-2004"
212+
ubuntu_version: "focal"
213+
arch: "amd64"
214+
- os: "buildjet-8vcpu-ubuntu-2004-arm"
215+
ubuntu_version: "focal"
216+
arch: "arm64"
167217
runs-on: ${{ matrix.os }}
168218
steps:
169219
- uses: actions/checkout@v3
@@ -180,9 +230,30 @@ jobs:
180230
#
181231
postgresml-dashboard:
182232
strategy:
183-
fail-fast: false # Let the other job finish
233+
fail-fast: false
184234
matrix:
185-
os: ["ubuntu-22.04", "buildjet-4vcpu-ubuntu-2204-arm"]
235+
include:
236+
# Ubuntu 24.04 LTS (Noble)
237+
- os: "buildjet-4vcpu-ubuntu-2404"
238+
ubuntu_version: "noble"
239+
arch: "amd64"
240+
- os: "buildjet-8vcpu-ubuntu-2404-arm"
241+
ubuntu_version: "noble"
242+
arch: "arm64"
243+
# Ubuntu 22.04 LTS (Jammy)
244+
- os: "buildjet-4vcpu-ubuntu-2204"
245+
ubuntu_version: "jammy"
246+
arch: "amd64"
247+
- os: "buildjet-8vcpu-ubuntu-2204-arm"
248+
ubuntu_version: "jammy"
249+
arch: "arm64"
250+
# Ubuntu 20.04 LTS (Focal) - Consider removing after April 2025
251+
- os: "buildjet-4vcpu-ubuntu-2004"
252+
ubuntu_version: "focal"
253+
arch: "amd64"
254+
- os: "buildjet-8vcpu-ubuntu-2004-arm"
255+
ubuntu_version: "focal"
256+
arch: "arm64"
186257
runs-on: ${{ matrix.os }}
187258
steps:
188259
- uses: actions/checkout@v3
@@ -208,7 +279,9 @@ jobs:
208279
strategy:
209280
fail-fast: false # Let the other job finish
210281
matrix:
211-
os: ["buildjet-4vcpu-ubuntu-2204"]
282+
include:
283+
- os: "buildjet-4vcpu-ubuntu-2404"
284+
ubuntu_version: "noble"
212285
runs-on: ${{ matrix.os }}
213286
defaults:
214287
run:

‎.github/workflows/ubuntu-postgresml-python-package.yaml

Copy file name to clipboardExpand all lines: .github/workflows/ubuntu-postgresml-python-package.yaml
+23-2Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,35 @@ on:
44
workflow_dispatch:
55
inputs:
66
packageVersion:
7-
default: "2.8.4"
7+
default: "2.10.0"
88

99
jobs:
1010
postgresml-python:
1111
strategy:
1212
fail-fast: false # Let the other job finish
1313
matrix:
14-
os: ["buildjet-4vcpu-ubuntu-2204", "buildjet-4vcpu-ubuntu-2204-arm", "ubuntu-24.04"]
14+
include:
15+
# Ubuntu 24.04 LTS (Noble)
16+
- os: "buildjet-4vcpu-ubuntu-2404"
17+
ubuntu_version: "noble"
18+
arch: "amd64"
19+
- os: "buildjet-8vcpu-ubuntu-2404-arm"
20+
ubuntu_version: "noble"
21+
arch: "arm64"
22+
# Ubuntu 22.04 LTS (Jammy)
23+
- os: "buildjet-4vcpu-ubuntu-2204"
24+
ubuntu_version: "jammy"
25+
arch: "amd64"
26+
- os: "buildjet-8vcpu-ubuntu-2204-arm"
27+
ubuntu_version: "jammy"
28+
arch: "arm64"
29+
# Ubuntu 20.04 LTS (Focal) - Consider removing after April 2025
30+
- os: "buildjet-4vcpu-ubuntu-2004"
31+
ubuntu_version: "focal"
32+
arch: "amd64"
33+
- os: "buildjet-8vcpu-ubuntu-2004-arm"
34+
ubuntu_version: "focal"
35+
arch: "arm64"
1536
runs-on: ${{ matrix.os }}
1637
steps:
1738
- uses: actions/checkout@v3

‎packages/postgresml-dashboard/build.sh

Copy file name to clipboardExpand all lines: packages/postgresml-dashboard/build.sh
+16-12Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#!/bin/bash
22
set -e
33

4-
# Parse arguments
5-
PACKAGE_VERSION=${1:-"2.10.0"}
6-
UBUNTU_VERSION=${2:-"22.04"}
4+
# Parse arguments with environment variable fallbacks
5+
PACKAGE_VERSION=${1:-${PACKAGE_VERSION:-"2.10.0"}}
6+
UBUNTU_VERSION=${2:-${ubuntu_version:-$(lsb_release -rs)}}
7+
ARCH=${3:-${ARCH:-$(arch | sed 's/x86_64/amd64/; s/aarch64/arm64/')}}
78

89
if [[ -z "$PACKAGE_VERSION" ]]; then
910
echo "postgresml dashboard build script"
10-
echo "Usage: $0 <package version> [ubuntu version]"
11-
echo "Example: $0 2.10.0 22.04"
11+
echo "Usage: $0 <package version> [ubuntu version] [arch]"
12+
echo "Example: $0 2.10.0 22.04 amd64"
1213
exit 1
1314
fi
1415

@@ -19,12 +20,16 @@ source_dir="$dir/source"
1920

2021
export PACKAGE_VERSION
2122
export UBUNTU_VERSION
22-
export GITHUB_STARS=$(curl -s "https://api.github.com/repos/postgresml/postgresml" | grep stargazers_count | cut -d : -f 2 | tr -d " " | tr -d ",")
23-
if [[ $(arch) == "x86_64" ]]; then
24-
export ARCH=amd64
25-
else
26-
export ARCH=arm64
27-
fi
23+
export ARCH
24+
25+
# Fetch GitHub stars count with error handling
26+
GITHUB_STARS=$(curl -s "https://api.github.com/repos/postgresml/postgresml" | grep stargazers_count | cut -d : -f 2 | tr -d " " | tr -d "," || echo "0")
27+
export GITHUB_STARS
28+
29+
echo "Building dashboard package:"
30+
echo "- Version: ${PACKAGE_VERSION}"
31+
echo "- Ubuntu: ${UBUNTU_VERSION}"
32+
echo "- Architecture: ${ARCH}"
2833

2934
rm -rf "$dir"
3035
mkdir -p "$deb_dir"
@@ -33,7 +38,6 @@ cp -R ${SCRIPT_DIR}/* "$deb_dir"
3338
rm "$deb_dir/build.sh"
3439
rm "$deb_dir/release.sh"
3540

36-
3741
( cd ${SCRIPT_DIR}/../../pgml-dashboard && \
3842
cargo build --release && \
3943
cp target/release/pgml-dashboard "$deb_dir/usr/bin/pgml-dashboard" && \

‎packages/postgresml-dashboard/release.sh

Copy file name to clipboardExpand all lines: packages/postgresml-dashboard/release.sh
+46-37Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,64 @@ if [[ -z "$package_version" ]]; then
1010
exit 1
1111
fi
1212

13-
# Active LTS Ubuntu versions and their codenames
14-
declare -A ubuntu_versions=(
15-
["20.04"]="focal"
16-
["22.04"]="jammy"
17-
["24.04"]="noble"
18-
)
13+
# Set architecture based on system unless overridden by environment
14+
if [[ -z "${ARCH}" ]]; then
15+
if [[ $(arch) == "x86_64" ]]; then
16+
export ARCH=amd64
17+
else
18+
export ARCH=arm64
19+
fi
20+
fi
21+
22+
# Get Ubuntu version from environment or try to detect it
23+
if [[ -z "${ubuntu_version}" ]]; then
24+
ubuntu_version=$(lsb_release -rs)
25+
echo "No ubuntu_version specified, detected: ${ubuntu_version}"
26+
fi
1927

20-
# Supported architectures
21-
declare -a architectures=("amd64" "arm64")
28+
# Map version number to codename
29+
case "${ubuntu_version}" in
30+
"20.04")
31+
export CODENAME="focal"
32+
;;
33+
"22.04")
34+
export CODENAME="jammy"
35+
;;
36+
"24.04")
37+
export CODENAME="noble"
38+
;;
39+
*)
40+
echo "Error: Unsupported Ubuntu version: ${ubuntu_version}"
41+
exit 1
42+
;;
43+
esac
2244

23-
# Install deb-s3 if not present
2445
if ! which deb-s3; then
2546
curl -sLO https://github.com/deb-s3/deb-s3/releases/download/0.11.4/deb-s3-0.11.4.gem
2647
sudo gem install deb-s3-0.11.4.gem
2748
deb-s3
2849
fi
2950

3051
function package_name() {
31-
local ubuntu_version=$1
32-
local arch=$2
33-
echo "postgresml-dashboard-${package_version}-ubuntu${ubuntu_version}-${arch}.deb"
52+
echo "postgresml-dashboard-${package_version}-ubuntu${ubuntu_version}-${ARCH}.deb"
3453
}
3554

36-
# Loop through Ubuntu versions
37-
for ubuntu_version in "${!ubuntu_versions[@]}"; do
38-
codename=${ubuntu_versions[$ubuntu_version]}
39-
echo "Building packages for Ubuntu ${ubuntu_version} (${codename})"
55+
echo "Building package for Ubuntu ${ubuntu_version} (${CODENAME}) ${ARCH}"
4056

41-
# Loop through architectures
42-
for arch in "${architectures[@]}"; do
43-
echo "Building for architecture: ${arch}"
44-
export ARCH=${arch}
57+
# Build the package
58+
bash ${SCRIPT_DIR}/build.sh "$package_version" "$ubuntu_version" "$ARCH"
4559

46-
# Build the dashboard package
47-
bash ${SCRIPT_DIR}/build.sh "$package_version" "$ubuntu_version"
48-
49-
if [[ ! -f $(package_name ${ubuntu_version} ${arch}) ]]; then
50-
echo "File $(package_name ${ubuntu_version} ${arch}) doesn't exist"
51-
exit 1
52-
fi
60+
if [[ ! -f $(package_name) ]]; then
61+
echo "File $(package_name) doesn't exist"
62+
exit 1
63+
fi
5364

54-
# Upload to S3
55-
deb-s3 upload \
56-
--lock \
57-
--bucket apt.postgresml.org \
58-
$(package_name ${ubuntu_version} ${arch}) \
59-
--codename ${codename}
65+
# Upload to S3
66+
deb-s3 upload \
67+
--lock \
68+
--bucket apt.postgresml.org \
69+
$(package_name) \
70+
--codename ${CODENAME}
6071

61-
# Clean up the package file
62-
rm $(package_name ${ubuntu_version} ${arch})
63-
done
64-
done
72+
# Clean up the package file
73+
rm $(package_name)

‎packages/postgresml-python/build.sh

Copy file name to clipboardExpand all lines: packages/postgresml-python/build.sh
+20-20Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,25 @@ set -e
44
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
55
deb_dir="/tmp/postgresml-python/deb-build"
66

7-
# Parse arguments with defaults
8-
export PACKAGE_VERSION=${1:-"2.10.0"}
9-
export UBUNTU_VERSION=${2:-"22.04"}
10-
export PYTHON_VERSION=${3:-"3.10"}
7+
# Parse arguments with environment variable fallbacks
8+
export PACKAGE_VERSION=${1:-${PACKAGE_VERSION:-"2.10.0"}}
9+
export UBUNTU_VERSION=${2:-${ubuntu_version:-$(lsb_release -rs)}}
10+
export PYTHON_VERSION=${3:-${PYTHON_VERSION:-"3.10"}}
1111

12-
# Handle architecture
13-
if [[ $(arch) == "x86_64" ]]; then
14-
export ARCH=amd64
15-
else
16-
export ARCH=arm64
12+
# Set architecture from environment or detect it
13+
if [[ -z "${ARCH}" ]]; then
14+
if [[ $(arch) == "x86_64" ]]; then
15+
export ARCH=amd64
16+
else
17+
export ARCH=arm64
18+
fi
1719
fi
1820

19-
# Map Ubuntu versions to Python versions if needed
20-
# For example: Ubuntu 20.04 uses Python 3.8 by default
21-
declare -A ubuntu_python_versions=(
22-
["20.04"]="3.8"
23-
["22.04"]="3.10"
24-
["24.04"]="3.11"
25-
)
26-
27-
if [[ -z "$3" ]]; then
28-
PYTHON_VERSION=${ubuntu_python_versions[$UBUNTU_VERSION]:-"3.10"}
29-
fi
21+
echo "Building package:"
22+
echo "- Package Version: ${PACKAGE_VERSION}"
23+
echo "- Ubuntu Version: ${UBUNTU_VERSION}"
24+
echo "- Python Version: ${PYTHON_VERSION}"
25+
echo "- Architecture: ${ARCH}"
3026

3127
rm -rf "$deb_dir"
3228
mkdir -p "$deb_dir"
@@ -35,17 +31,21 @@ cp -R ${SCRIPT_DIR}/* "$deb_dir"
3531
rm "$deb_dir/build.sh"
3632
rm "$deb_dir/release.sh"
3733

34+
# Process template files
3835
(cat ${SCRIPT_DIR}/DEBIAN/control | envsubst '${PACKAGE_VERSION} ${UBUNTU_VERSION} ${ARCH} ${PYTHON_VERSION}') > "$deb_dir/DEBIAN/control"
3936
(cat ${SCRIPT_DIR}/DEBIAN/postinst | envsubst '${PGVERSION} ${PYTHON_VERSION}') > "$deb_dir/DEBIAN/postinst"
4037
(cat ${SCRIPT_DIR}/DEBIAN/prerm | envsubst '${PGVERSION} ${PYTHON_VERSION}') > "$deb_dir/DEBIAN/prerm"
4138
(cat ${SCRIPT_DIR}/DEBIAN/postrm | envsubst '${PGVERSION} ${PYTHON_VERSION}') > "$deb_dir/DEBIAN/postrm"
4239

40+
# Copy appropriate requirements file based on architecture
4341
if [[ "$ARCH" == "amd64" ]]; then
4442
cp ${SCRIPT_DIR}/../../pgml-extension/requirements.linux.txt "$deb_dir/etc/postgresml-python/requirements.txt"
4543
else
4644
cp ${SCRIPT_DIR}/../../pgml-extension/requirements.macos.txt "$deb_dir/etc/postgresml-python/requirements.txt"
4745
fi
4846

47+
# Create and populate virtualenv
48+
echo "Creating Python virtual environment with Python ${PYTHON_VERSION}"
4949
virtualenv --python="python${PYTHON_VERSION}" "$deb_dir/var/lib/postgresml-python/pgml-venv"
5050
source "$deb_dir/var/lib/postgresml-python/pgml-venv/bin/activate"
5151

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.