-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (93 loc) · 2.9 KB
/
test_publish.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Test brainmaze
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
python-version: '3.9'
architecture: 'x64'
- os: ubuntu-latest
python-version: '3.10'
architecture: 'x64'
- os: ubuntu-latest
python-version: '3.11'
architecture: 'x64'
- os: ubuntu-latest
python-version: '3.12'
architecture: 'x64'
- os: macos-latest
python-version: '3.11'
- os: macos-latest
python-version: '3.12'
- os: windows-latest
python-version: '3.11'
- os: windows-latest
python-version: '3.12'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install numpy
pip install wheel
- name: Setup package
run:
python setup.py bdist_wheel sdist
- name: Install package
run:
pip install .
- name: Test package
run:
pytest
release:
if: contains(github.ref, 'refs/tags/')
needs: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
python-version: '3.11'
docker_python_version: 'cp36-cp36m'
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
# Set up python after manylinux build otherwise it interferes with auditwheel in the image
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install twine
pip install wheel
- name: Setup package
run:
python setup.py bdist_wheel sdist
- name: Publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_Token_General }}
run: |
twine upload --skip-existing dist/*