Skip to content

Silas python test deploy #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jun 20, 2023
Merged
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
115 changes: 115 additions & 0 deletions .github/workflows/python-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: deploy python sdk
on:
workflow_dispatch:
jobs:
deploy-python-sdk-linux:
strategy:
matrix:
os: ["ubuntu-22.04", "buildjet-4vcpu-ubuntu-2204-arm"]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: pgml-sdks/rust/pgml
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Validate cargo is working
uses: postgresml/gh-actions-cargo@master
with:
command: version
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
run: |
sudo apt update
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo add-apt-repository -y ppa:apt-fast/stable
sudo apt update
sudo apt-get -y install apt-fast
sudo apt-fast -y install \
python3.8 python3.8-dev \
python3.9 python3.9-dev \
python3.10 python3.10-dev \
python3.11 python3.11-dev \
python3-pip \
git
pip install maturin
pip install patchelf
- name: Create dist directory
run: mkdir ../../python/dist
- name: Build wheels
run: maturin build --release --strip -i python3.8 -i python3.9 -i python3.10 -i python3.11 -o ../../python/pgml/dist
- name: Deploy wheels
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
working-directory: pgml-sdks/python/pgml
run: maturin upload --skip-existing dist/*
deploy-python-sdk-mac:
runs-on: macos-latest
defaults:
run:
working-directory: pgml-sdks/rust/pgml
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Validate cargo is working
uses: postgresml/gh-actions-cargo@master
with:
command: version
- name: Install dependencies
run: |
brew update
brew install python@3.8
brew install python@3.9
brew install python@3.10
brew install python@3.11
pip3 install maturin
- name: Create dist directory
run: mkdir ../../python/dist
- name: Build wheels
run: maturin build --release --strip -i python3.8 -i python3.9 -i python3.10 -i python3.11 -o ../../python/pgml/dist
- name: Deploy wheels
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
working-directory: pgml-sdks/python/pgml
run: maturin upload --skip-existing dist/*
deploy-python-sdk-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
defaults:
run:
working-directory: pgml-sdks\rust\pgml
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Validate cargo is working
uses: postgresml/gh-actions-cargo@master
with:
command: version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install maturin
- name: Create dist directory
run: mkdir ..\..\python\dist
- name: Build wheels
run: maturin build --release --strip -o ..\..\python\pgml\dist
- name: Deploy wheels
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
working-directory: pgml-sdks\python\pgml
run: maturin upload --skip-existing dist\*
7 changes: 0 additions & 7 deletions pgml-sdks/python/pgml/pgml/__init__.py

This file was deleted.

Loading