Skip to content

Test Self Hosted

Test Self Hosted #18

on:
push:
branches: [ core ]
jobs:
macos-arm-build-rust:
name: "Build Rust MacOS"
if: "contains(github.event.head_commit.message, 'Test Self Hosted')"
runs-on: macos-arm64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install poetry
working-directory: ./extensions/underthesea_core
run: |
mkdir "${PWD}/poetry"
curl -sSL https://install.python-poetry.org | POETRY_HOME=${PWD}/poetry python -
- name: Install package deps
working-directory: ./extensions/underthesea_core
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_UNDERTHESEA_CORE_API_TOKEN }}
run: |
# add poetry to path
export PATH="${PWD}/poetry/bin:${PATH}"
poetry install
macos-arm-publish-pypi:
name: "Build and Publish MacOS"
if: "contains(github.event.head_commit.message, 'Test Self Hosted')"
runs-on: macos-arm64
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Check python
working-directory: ./extensions/underthesea_core
env:
PYTHON: python${{ matrix.python-version }}
MATURIN_PASSWORD: ${{ secrets.PYPI_UNDERTHESEA_CORE_API_TOKEN }}
run: |
ls
python --version
# add poetry to path
alias python3.8=~/anaconda3/envs/python3.8/bin/python3.8
alias python3.9=~/anaconda3/envs/python3.8/bin/python3.9
python3.8
# poetry run maturin build --release --no-sdist --strip --interpreter python
# find ./target/wheels/
# poetry run maturin publish --username __token__ --no-sdist --interpreter python
# ls