Skip to content

Change python version #652

Change python version

Change python version #652

Workflow file for this run

name: Deploy
on:
push:
tags:
- "v*"
jobs:
build_wheels:
name: |
Build wheels on ${{ matrix.os }} with
windows_cross_compile=${{ matrix.windows_cross_compile }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, ubuntu-latest]
# windows_cross_compile: [false, true]
include:
- os: ubuntu-latest
windows_cross_compile: false
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y mingw-w64
if: matrix.windows_cross_compile
- name: Checkout source
uses: actions/checkout@v3
- name: Build wheels
run: bash build.sh
env:
WINDOWS_CROSS_COMPILE: ${{ matrix.windows_cross_compile }}
- name: Upload artefacts
uses: actions/upload-artifact@v3
with:
name: artefacts
path: |
btrack/libs/*
if-no-files-found: error
deploy-to-testpypi:
needs: build_wheels
runs-on: "ubuntu-latest"
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Download artefacts
uses: actions/download-artifact@v3
with:
name: artefacts
path: btrack/libs
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build distributions
run: python -m build
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TESTPYPI_SECRET }}
repository-url: https://test.pypi.org/legacy/
verify-testpypi-contains-binary:
needs: deploy-to-testpypi
runs-on: "ubuntu-latest"
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install package from TestPyPI
run: |
python -m pip install --upgrade pip
python -m pip install \
-i https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
--upgrade btrack
- name: Create BayesianTracker instance
run: |
import btrack
btrack.BayesianTracker()
shell: python
deploy-to-pypi:
needs: verify-testpypi-contains-binary
runs-on: "ubuntu-latest"
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Download artefacts
uses: actions/download-artifact@v3
with:
name: artefacts
path: btrack/libs
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build distributions
run: python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_PASSWORD }}