Skip to content

Build Wheel

Build Wheel #3

Workflow file for this run

name: Build Wheel
on:
workflow_dispatch:
# if a new request comes through, cancel previous workflow and start again
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
run-tests:
strategy:
matrix:
os: [ "windows-latest", "macos-latest" ]
name: Build Wheel
runs-on: ${{ matrix.os }}
timeout-minutes: 8
defaults:
run:
shell: bash
# Build the test suite
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: develop
- run: git pull origin develop
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.9.13'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- run: |
source $VENV
pytest --version
# Run wheel build and install
- name: Build wheel and install
run: |
poetry build --repository ./dist/${{ runner.os }}/
- name: Configure Git
run: |
git config --global user.email "47286380+harveyf2801@users.noreply.github.com"
git config --global user.name "harveyf2801"
- name: Commit and push wheel
run: |
git add -f ./dist/${{ runner.os }}/*.whl
git commit -m 'pushing new wheel for ${{ runner.os }}'
git push