Skip to content

Python build

Python build #230

Workflow file for this run

name: Python build
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
branches: [main]
create:
branches: [main]
tags: ['**']
schedule:
- cron: "0 4 1 * *"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel build
- uses: actions/checkout@v4
- name: Build sdist
run: python -m build --sdist
- name: Install sdist
run: pip install ./dist/pybv-*
- name: Clean up working directory
run: rm -rf ./*
- name: Try importing pybv
run: python -c 'import pybv; print(pybv.__version__)'
- name: Remove sdist install
run: pip uninstall -y pybv
- uses: actions/checkout@v4
- name: Build wheel
run: python -m build --wheel
- name: Install wheel
run: pip install ./dist/pybv-*.whl
- name: Clean up working directory
run: rm -rf ./*
- name: Try importing pybv
run: python -c 'import pybv; print(pybv.__version__)'
- name: Remove wheel install
run: pip uninstall -y pybv