Skip to content

Commit

Permalink
Merge pull request #39 from WannabeSmith/build-wheels-gh-actions
Browse files Browse the repository at this point in the history
Build wheels gh actions
  • Loading branch information
WannabeSmith authored Dec 31, 2021
2 parents 4d01d41 + bb82608 commit 6e228b1
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# This workflow will install boost dependencies, lint, run unit tests, and build wheels with a variety of OS/Python configurations.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package
Expand All @@ -8,17 +8,16 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
pull_request_target:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand All @@ -29,13 +28,17 @@ jobs:
- name: Install dependencies
run: |
# Install boost library to OS
sudo apt-get update
sudo apt-get install libboost-all-dev
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install -y libboost-all-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install boost
fi
python -m pip install --upgrade pip
python -m pip install flake8 pytest
- name: Install confseq package
run: |
pip install -e ./
pip install ./
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -48,3 +51,11 @@ jobs:
make -C test runtests
# Run python unit tests, but ignore googletest library
pytest -m "not random" --ignore=test/googletest-1.8.1/
- name: Build and upload wheels
run: |
pip wheel --no-deps ./
- uses: actions/upload-artifact@v2
with:
name: built_wheels
path: ./confseq-*.whl

0 comments on commit 6e228b1

Please sign in to comment.