-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
198 additions
and
304 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build package on different OSs and Python versions | ||
|
||
on : [push, pull_request] | ||
|
||
jobs: | ||
|
||
build_package: | ||
name: Build ${{ github.event.repository.name }} on ${{ matrix.os }} for Python-${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.7, 3.8, 3.9, '3.10'] | ||
include: | ||
- os: ubuntu-latest | ||
path: ~/.cache/pip | ||
- os: macos-latest | ||
path: ~/Library/Caches/pip | ||
- os: windows-latest | ||
path: ~\AppData\Local\pip\Cache | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
name: Install Python-${{ matrix.python-version }} | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Activating Python cache | ||
uses: actions/cache@v2 | ||
id: cache_python | ||
continue-on-error: true | ||
with: | ||
path: ${{ matrix.path }} | ||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- name: Build ${{ github.event.repository.name }} | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install -e ".[doc, tests]" | ||
- name: Install and run flake8 on Mac | ||
if: ${{ runner.os == 'macOS' }} | ||
run: | | ||
flake8 | ||
- name: Run test on Mac with coverage generated | ||
if: ${{ runner.os == 'macOS' }} | ||
run: | | ||
pytest --cov pyflagser --cov-report xml | ||
- name: Run test on Linux and Windows with no coverage generated | ||
if: ${{ runner.os != 'macOS' }} | ||
run: | | ||
python -m pytest --no-cov --no-coverage-upload | ||
- name: Build sphinx doc on Linux | ||
if: ${{ runner.os == 'Linux' }} | ||
run: | | ||
cd doc | ||
python -m pip install -r requirements.txt | ||
sphinx-build -b html . build | ||
- name: Upload built documentation and coverage as artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ArtifactsCI | ||
if-no-files-found: ignore | ||
path: | | ||
doc/build | ||
coverage.xml | ||
htmlcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build Wheels | ||
|
||
on : workflow_dispatch | ||
|
||
jobs: | ||
|
||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} for ${{ github.event.repository.name }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build wheels | ||
uses: pypa/cibuildwheel@v2.3.1 | ||
env: | ||
# Specify which Python versions to build wheels | ||
# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip | ||
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-*" | ||
# Skip 32 bit architectures, musllinux, and i686, and macOS x86_64 wheels for CP3.8 -- CP3.10 | ||
CIBW_SKIP: "*-win32 *-musllinux_x86_64 *_i686 cp38-macosx_x86_64 cp39-macosx_x86_64 cp310-macosx_x86_64" | ||
CIBW_BEFORE_BUILD_WINDOWS: python -m pip install cmake && python -m pip install --upgrade pip setuptools && sed -i $'s/\r$//' README.rst && python -m pip install delvewheel | ||
CIBW_BEFORE_BUILD_LINUX: python -m pip install cmake && python -m pip install --upgrade pip setuptools | ||
CIBW_BEFORE_BUILD_MACOS: python -m pip install cmake && python -m pip install --upgrade pip setuptools | ||
CIBW_TEST_COMMAND: python -m pyflagser.tests --webdl | ||
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -vv -w {dest_dir} {wheel}" | ||
CIBW_TEST_REQUIRES: pytest hypothesis | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | ||
# Should generate universal2 wheels for CP3.8 -- CP3.10 | ||
CIBW_ARCHS_MACOS: x86_64 universal2 | ||
|
||
- uses: actions/upload-artifact@v2 | ||
name: Upload wheels | ||
with: | ||
path: ./wheelhouse/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,3 +110,10 @@ venv.bak/ | |
|
||
# Pybind11 | ||
pybind11 | ||
|
||
# macOS | ||
*.DS_Store | ||
|
||
# IDEs | ||
.idea/* | ||
.vscode/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.