Test Self Hosted #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8"] | |
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 | |
- name: Build and publish | |
working-directory: ./extensions/underthesea_core | |
env: | |
PYTHON: /Users/anhv/anaconda3/envs/python${{ matrix.python-version }}/bin/python${{ matrix.python-version }} | |
MATURIN_PASSWORD: ${{ secrets.PYPI_UNDERTHESEA_CORE_API_TOKEN }} | |
run: | | |
export PATH="${PWD}/poetry/bin:${PATH}" | |
$PYTHON --version | |
poetry run maturin build --release --no-sdist --strip --interpreter $PYTHON | |
find ./target/wheels/ | |
poetry run maturin publish --username __token__ --no-sdist --interpreter $PYTHON |