Skip to content

Commit

Permalink
Attempt to build CoolProp on Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanwweber committed Apr 12, 2020
1 parent a736ac8 commit 4d3e695
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
49 changes: 47 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false

Expand All @@ -41,11 +41,56 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

# CoolProp has to be built from the master branch for Python 3.8
build-py38:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Don't want to figure out compiling CoolProp on Windows for tests.
# These OS should be good enough
os: [ubuntu-latest, macos-latest]
fail-fast: false
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Clone CoolProp
uses: actions/checkout@v2
with:
repository: CoolProp/CoolProp
path: ext
- name: Install CoolProp dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install cython
- name: Build CoolProp wheel
env:
MACOSX_DEPLOYMENT_TARGET: 10.13
run: |
pushd ext/CoolProp/wrappers/Python
python setup.py bdist_wheel
- name: Install test dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install tox tox-venv
- name: Test with tox
env:
CP_PACKAGE_DIST_DIR: ${{ github.workspace }}/ext/CoolProp/wrappers/Python/dist
run: tox -v -e py38
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

notebooks:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ requires = tox-venv
python =
3.6: py36
3.7: py37
3.8: py38

[testenv]
description = run the tests with pytest under {basepython}
Expand All @@ -25,6 +24,9 @@ download = true

[testenv:py38]
description = run the tests with pytest under {basepython}, allowing failures due to CoolProp
install_command=python -m pip install --find-links={env:CP_PACKAGE_DIST_DIR:} {opts} {packages}
pip_pre = true

[testenv:notebooks]
description = run the Notebooks in the docs folder
deps =
Expand Down

0 comments on commit 4d3e695

Please sign in to comment.