mirror of
https://github.com/vee1e/lancelot.git
synced 2026-09-01 10:48:44 +00:00
158 lines
4 KiB
YAML
158 lines
4 KiB
YAML
on:
|
|
release:
|
|
types: [created, edited]
|
|
|
|
name: publish
|
|
|
|
jobs:
|
|
crate:
|
|
name: publish to crates.io
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- name: login
|
|
run: cargo login ${CARGO_TOKEN}
|
|
env:
|
|
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
|
|
|
|
- name: publish flirt
|
|
run: |
|
|
cd flirt
|
|
cargo publish
|
|
cd ..
|
|
|
|
- name: publish core
|
|
run: |
|
|
sleep 60 # give a moment for crates.io to propagate
|
|
cd core
|
|
cargo publish
|
|
cd ..
|
|
|
|
- name: publish bin
|
|
run: |
|
|
sleep 60 # give a moment for crates.io to propagate
|
|
cd bin
|
|
cargo publish
|
|
cd ..
|
|
|
|
whl-other:
|
|
name: build python wheels for ${{ matrix.os }}
|
|
needs: [crate]
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: windows-latest
|
|
plat: win_amd64
|
|
- os: macos-latest
|
|
plat: macosx_x86_64
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install stable toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.6"
|
|
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.7"
|
|
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.8"
|
|
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.9"
|
|
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name : invoke maturin pylancelot
|
|
run: |
|
|
pip install maturin
|
|
maturin build --release --strip --manifest-path=./pylancelot/Cargo.toml
|
|
ls -R target/wheels/
|
|
|
|
- name : invoke maturin pyflirt
|
|
run: |
|
|
pip install maturin
|
|
maturin build --release --strip --manifest-path=./pyflirt/Cargo.toml
|
|
ls -R target/wheels/
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pylancelot-${{ matrix.plat }}-whl
|
|
path: target/wheels/*.whl
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: python-flirt-${{ matrix.plat }}-whl
|
|
path: target/wheels/*.whl
|
|
|
|
- name: install twine
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools twine
|
|
|
|
- name: publish to pypi
|
|
env:
|
|
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
run: |
|
|
twine upload --skip-existing target/wheels/*
|
|
|
|
whl-linux:
|
|
name: build python wheels for manylinux2010
|
|
needs: [crate]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.8"
|
|
|
|
- name: build wheels pylancelot
|
|
# see Dockerfile for this image
|
|
run: |
|
|
docker run --rm -v $(pwd):/io --workdir=/io williballenthin/maturin build --release --strip --manifest-path=./pylancelot/Cargo.toml --manylinux 2010
|
|
|
|
- name: build wheels pyflirt
|
|
run: |
|
|
docker run --rm -v $(pwd):/io --workdir=/io williballenthin/maturin build --release --strip --manifest-path=./pyflirt/Cargo.toml --manylinux 2010
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pylancelot-manylinux2010_x86_64-whl
|
|
path: target/wheels/*.whl
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: python-flirt-manylinux2010_x86_64-whl
|
|
path: target/wheels/*.whl
|
|
|
|
- name: install twine
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools twine
|
|
|
|
- name: publish to pypi
|
|
env:
|
|
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
run: |
|
|
twine upload --skip-existing target/wheels/*
|