-
Notifications
You must be signed in to change notification settings - Fork 22
57 lines (53 loc) · 1.46 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
ITK_VERSION: [5.3.0, pre]
steps:
- name: Checkout github repo
uses: actions/checkout@v2
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ ${{ matrix.ITK_VERSION }} == 'pre' ];
then pip install itk --pre;
else pip install itk==${{ matrix.ITK_VERSION }};
fi
pip install -e .
pip install uproot3
pip freeze
- name: Run the tests
run: |
python -m unittest gatetools -v
python -m unittest gatetools.phsp -v
- name: Create wheel
if: startsWith(github.ref, 'refs/tags')
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true