1- name : package extension (deb)
1+ name : Ubuntu packages and Docker image
22
33on :
44 workflow_dispatch :
55 inputs :
66 packageVersion :
77 default : " 2.7.4"
8- pythonVersion :
9- default : " 3.10"
10-
118jobs :
12- extension :
9+ #
10+ # PostgresML extension.
11+ #
12+ postgresml-pgml :
1313 strategy :
1414 fail-fast : false # Let the other job finish
1515 matrix :
16- os : ["buildjet-16vcpu-ubuntu-2204-arm ", "buildjet-16vcpu-ubuntu-2204-arm"]
16+ os : ["buildjet-16vcpu-ubuntu-2204", "buildjet-16vcpu-ubuntu-2204-arm"]
1717 runs-on : ${{ matrix.os }}
1818 defaults :
1919 run :
@@ -131,68 +131,32 @@ jobs:
131131 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
132132 AWS_DEFAULT_REGION : ${{ vars.AWS_DEFAULT_REGION }}
133133 run : |
134- for pg in {11..15}; do
135- export PACKAGE_VERSION=${{ inputs.packageVersion }}
136- export PGVERSION=${pg}
137-
138- if [[ $(arch) == "x86_64" ]]; then
139- export ARCH=amd64
140- else
141- export ARCH=arm64
142- fi
143-
144- mkdir -p target/release/pgml-pg${pg}/DEBIAN
145- (cat control | envsubst) > target/release/pgml-pg${pg}/DEBIAN/control
146- dpkg-deb --root-owner-group --build target/release/pgml-pg${pg} postgresql-pgml-${pg}_${PACKAGE_VERSION}-ubuntu22.04-${ARCH}.deb
134+ bash packages/postgresql-pgml/release.sh ${{ inputs.packageVersion }}
147135
148- deb-s3 upload \
149- --bucket apt.postgresml.org \
150- postgresql-pgml-${pg}_${PACKAGE_VERSION}-ubuntu22.04-${ARCH}.deb \
151- --codename $(lsb_release -cs)
152- done
153- package :
154- needs : extension
136+ #
137+ # PostgresML meta package which installs
138+ # all the necessary dependencies.
139+ #
140+ postgresml :
141+ needs : postgresml-pgml
155142 strategy :
156- max-parallel : 1
157- fail-fast : false # Let the other job finish, or they can lock each other out
158143 matrix :
159- os : ["ubuntu-22.04", "buildjet-4vcpu-ubuntu-2204-arm" ]
144+ os : ["ubuntu-22.04"]
160145 runs-on : ${{ matrix.os }}
161146 steps :
162147 - uses : actions/checkout@v3
163- - name : Install dependencies
164- env :
165- DEBIAN_FRONTEND : noninteractive
166- TZ : Etc/UTC
167- run : |
168- curl -sLO https://github.com/deb-s3/deb-s3/releases/download/0.11.4/deb-s3-0.11.4.gem
169- sudo gem install deb-s3-0.11.4.gem
170- dpkg-deb --version
171- sudo apt install -y python3-pip python3 python3-virtualenv
172148 - name : Build and release package
173149 env :
174150 AWS_ACCESS_KEY_ID : ${{ vars.AWS_ACCESS_KEY_ID }}
175151 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
176152 AWS_DEFAULT_REGION : ${{ vars.AWS_DEFAULT_REGION }}
177153 run : |
178- if [[ $(arch) == "x86_64" ]]; then
179- export ARCH=amd64
180- else
181- export ARCH=arm64
182- fi
154+ bash packages/postgresml/release.sh ${{ inputs.packageVersion }}
183155
184- for pg in {11..15}; do
185- bash packages/postgresml/build.sh ${pg} v${{ inputs.packageVersion }}-1 ${{ inputs.pythonVersion }}
186-
187- deb-s3 upload \
188- --lock \
189- --bucket apt.postgresml.org \
190- postgresml-${pg}-${{ inputs.packageVersion }}-1-ubuntu22.04-${ARCH}.deb \
191- --codename $(lsb_release -cs)
192-
193- rm -f postgresml-${pg}-${{ inputs.packageVersion }}-1-ubuntu22.04-${ARCH}.deb
194- done
195- dashboard :
156+ #
157+ # PostgresML dashboard.
158+ #
159+ postgresml-dashboard :
196160 strategy :
197161 fail-fast : false # Let the other job finish
198162 matrix :
@@ -203,35 +167,21 @@ jobs:
203167 - uses : actions-rs/toolchain@v1
204168 with :
205169 toolchain : stable
206- - name : Install dependencies
207- env :
208- DEBIAN_FRONTEND : noninteractive
209- TZ : Etc/UTC
210- run : |
211- curl -sLO https://github.com/deb-s3/deb-s3/releases/download/0.11.4/deb-s3-0.11.4.gem
212- sudo gem install deb-s3-0.11.4.gem
213- dpkg-deb --version
214170 - name : Build and release package
215171 env :
216172 AWS_ACCESS_KEY_ID : ${{ vars.AWS_ACCESS_KEY_ID }}
217173 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
218174 AWS_DEFAULT_REGION : ${{ vars.AWS_DEFAULT_REGION }}
219175 run : |
220- if [[ $(arch) == "x86_64" ]]; then
221- export ARCH=amd64
222- else
223- export ARCH=arm64
224- fi
225-
226- bash packages/postgresml-dashboard/build.sh ${{ inputs.packageVersion }}
176+ bash packages/postgresml-dashboard/release.sh ${{ inputs.packageVersion }}
227177
228- deb-s3 upload \
229- --lock \
230- --bucket apt.postgresml.org \
231- postgresml-dashboard-${{ inputs.packageVersion }}-ubuntu22.04-${ARCH}.deb \
232- --codename $(lsb_release -cs)
178+ #
179+ # PostgresML Docker image.
180+ #
233181 publish-extension-docker-image :
234- needs : package
182+ needs :
183+ - postgresml
184+ - postgresml-dashboard
235185 strategy :
236186 matrix :
237187 os : ["buildjet-4vcpu-ubuntu-2204"]
0 commit comments