Skip to content

Commit 8483192

Browse files
authored
Silas final pipelines (#934)
1 parent bb09bae commit 8483192

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+9542
-3508
lines changed

.github/workflows/python-sdk.yml

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: deploy python sdk
22
on:
33
workflow_dispatch:
4+
inputs:
5+
deploy_to_pypi:
6+
description: "Whether to deploy to PyPI (true) or TestPyPI (false)"
7+
required: false
8+
default: "false"
49
jobs:
510
deploy-python-sdk-linux:
611
strategy:
@@ -24,31 +29,33 @@ jobs:
2429
DEBIAN_FRONTEND: noninteractive
2530
TZ: Etc/UTC
2631
run: |
27-
sudo apt update
28-
sudo apt-get -y install software-properties-common
29-
sudo add-apt-repository -y ppa:deadsnakes/ppa
30-
sudo add-apt-repository -y ppa:apt-fast/stable
31-
sudo apt update
32-
sudo apt-get -y install apt-fast
33-
sudo apt-fast -y install \
34-
python3.7 python3.7-dev \
35-
python3.8 python3.8-dev \
36-
python3.9 python3.9-dev \
37-
python3.10 python3.10-dev \
38-
python3.11 python3.11-dev \
39-
python3-pip \
40-
git
41-
pip install maturin
42-
pip install patchelf
43-
- name: Create dist directory
44-
run: mkdir ../../python/dist
45-
- name: Build wheels
46-
run: maturin build --release --strip -i python3.7 -i python3.8 -i python3.9 -i python3.10 -i python3.11 -o ../../python/pgml/dist -F python
47-
- name: Deploy wheels
32+
sudo apt update
33+
sudo apt-get -y install software-properties-common
34+
sudo add-apt-repository -y ppa:deadsnakes/ppa
35+
sudo add-apt-repository -y ppa:apt-fast/stable
36+
sudo apt update
37+
sudo apt-get -y install apt-fast
38+
sudo apt-fast -y install \
39+
python3.7 python3.7-dev \
40+
python3.8 python3.8-dev \
41+
python3.9 python3.9-dev \
42+
python3.10 python3.10-dev \
43+
python3.11 python3.11-dev \
44+
python3-pip \
45+
git
46+
pip install maturin
47+
pip install patchelf
48+
- name: Build and deploy wheels to TestPyPI
49+
if: github.event.inputs.deploy_to_pypi == 'false'
50+
env:
51+
MATURIN_PYPI_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
52+
run: maturin publish -r testpypi -i python3.7 -i python3.8 -i python3.9 -i python3.10 -i python3.11 --skip-existing -F python
53+
- name: Build and deploy wheels to PyPI
54+
if: github.event.inputs.deploy_to_pypi == 'true'
4855
env:
4956
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
50-
working-directory: pgml-sdks/python/pgml
51-
run: maturin upload --skip-existing dist/*
57+
run: maturin publish -i python3.7 -i python3.8 -i python3.9 -i python3.10 -i python3.11 --skip-existing -F python
58+
5259
deploy-python-sdk-mac:
5360
runs-on: macos-latest
5461
defaults:
@@ -72,15 +79,17 @@ jobs:
7279
brew install python@3.10
7380
brew install python@3.11
7481
pip3 install maturin
75-
- name: Create dist directory
76-
run: mkdir ../../python/dist
77-
- name: Build wheels
78-
run: maturin build --release --strip -i python3.8 -i python3.9 -i python3.10 -i python3.11 -o ../../python/pgml/dist -F python
79-
- name: Deploy wheels
82+
- name: Build and deploy wheels to TestPyPI
83+
if: github.event.inputs.deploy_to_pypi == 'false'
84+
env:
85+
MATURIN_PYPI_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
86+
run: maturin publish -r testpypi -i python3.8 -i python3.9 -i python3.10 -i python3.11 --skip-existing -F python
87+
- name: Build and deploy wheels to PyPI
88+
if: github.event.inputs.deploy_to_pypi == 'true'
8089
env:
8190
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
82-
working-directory: pgml-sdks/python/pgml
83-
run: maturin upload --skip-existing dist/*
91+
run: maturin publish -i python3.8 -i python3.9 -i python3.10 -i python3.11 --skip-existing -F python
92+
8493
deploy-python-sdk-windows:
8594
runs-on: windows-latest
8695
strategy:
@@ -101,17 +110,18 @@ jobs:
101110
- name: Set up Python ${{ matrix.python-version }}
102111
uses: actions/setup-python@v4
103112
with:
104-
python-version: ${{ matrix.python-version }}
113+
python-version: ${{ matrix.python-version }}
105114
- name: Install dependencies
106115
run: |
107116
python -m pip install --upgrade pip
108117
pip3 install maturin
109-
- name: Create dist directory
110-
run: mkdir ..\..\python\dist
111-
- name: Build wheels
112-
run: maturin build --release --strip -o ..\..\python\pgml\dist -F python
113-
- name: Deploy wheels
118+
- name: Build and deploy wheels to TestPyPI
119+
if: github.event.inputs.deploy_to_pypi == 'false'
120+
env:
121+
MATURIN_PYPI_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
122+
run: maturin publish -r testpypi -i python3.8 -i python3.9 -i python3.10 -i python3.11 --skip-existing -F python
123+
- name: Build and deploy wheels to PyPI
124+
if: github.event.inputs.deploy_to_pypi == 'true'
114125
env:
115126
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
116-
working-directory: pgml-sdks\python\pgml
117-
run: maturin upload --skip-existing dist\*
127+
run: maturin publish -i python3.8 -i python3.9 -i python3.10 -i python3.11 --skip-existing -F python
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Drop the constraint on snapshot_id for models
2+
ALTER TABLE pgml.models ALTER COLUMN snapshot_id DROP NOT NULL;
3+
4+
-- Add openai option to pgml.runtime
5+
ALTER TYPE pgml.runtime ADD VALUE IF NOT EXISTS 'openai';
6+
7+
-- Add embedding option to pgml.task
8+
ALTER TYPE pgml.task ADD VALUE IF NOT EXISTS 'embedding';

0 commit comments

Comments
 (0)