-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
3e23112
commit 904f2fa
Showing
5 changed files
with
114 additions
and
119 deletions.
There are no files selected for viewing
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 @@ | ||
repo_token: DtQcYGAe3jLrJRcrzliM3lstQJiqIP930 |
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,109 @@ | ||
# CI for this library is a bit tricky, as an working display/GFX card is | ||
# expected to do the rendering. We use a fake display for Windows/Linux, and | ||
# don't run CI on Mac. Running tests locally is simpler! | ||
on: push | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-ver: [3.6, 3.7] | ||
experimental: [false] | ||
include: | ||
- python-ver: 3.8 | ||
os: ubuntu-latest | ||
experimental: true | ||
- python-ver: 3.8 | ||
os: windows-latest | ||
experimental: true | ||
- python-ver: 3.8 | ||
os: macos-latest | ||
experimental: true | ||
|
||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.experimental }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-ver }} | ||
|
||
# VTK uses OpenGL 2.0, but the windows Server version used on | ||
# GitHub actions only has 1.1, so need to setup software rendering | ||
# with Mesa. | ||
# https://github.com/pal1000/mesa-dist-win | ||
- name: Setup Mesa (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
curl --output mesa.7z -L https://github.com/pal1000/mesa-dist-win/releases/download/20.1.1-2/mesa3d-20.1.1-release-mingw.7z | ||
7z x mesa.7z -omesa -y | ||
# The script requires user input (choice of options) so need to | ||
# fiddle to get it to run automatically. Not a clean way to do it, | ||
# but works. | ||
sed -i 's/@echo Please make a deployment choice:/@GOTO desktopgl/g' mesa\systemwidedeploy.cmd | ||
sed -i 's/@echo Desktop OpenGL drivers deploy complete./@exit/g' mesa\systemwidedeploy.cmd | ||
mesa\systemwidedeploy.cmd | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pip-tools | ||
pip-compile requirements-dev.txt | ||
pip install -r requirements-dev.txt | ||
- name: Run tests using xvfb (Ubuntu) | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt-get install xvfb libxkbcommon-x11-0 | ||
sudo Xvfb :1 -screen 0 1024x768x24 </dev/null & | ||
export DISPLAY=":1" | ||
export LD_LIBRARY_PATH=$pythonLocation"/lib/python3.6/site-packages/PySide2/Qt/plugins/platfoms" | ||
coverage erase | ||
coverage run -a --source ./sksurgeryeval -m pytest | ||
coverage report -m | ||
- name: Run tests Windows/Mac | ||
if: contains(matrix.os, 'o') | ||
run: | | ||
coverage erase | ||
coverage run -a --source ./sksurgeryeval -m pytest | ||
coverage report -m | ||
- name: Linting | ||
run: | | ||
pylint --rcfile=tests/pylintrc sksurgeryeval | ||
- name: Run coveralls | ||
run: | | ||
coveralls | ||
deploy: | ||
runs-on: ubuntu-18.04 | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@master | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
# TODO: python version for deploy? | ||
python-version: 3.6 | ||
|
||
- name: Install dependencies | ||
run: python -m pip install wheel twine setuptools | ||
|
||
- name: Build wheel | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish package if tagged release | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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 |
---|---|---|
|
@@ -14,3 +14,5 @@ sphinx_rtd_theme | |
pyinstaller | ||
pytest | ||
tox | ||
coveralls | ||
pyyaml |
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