-
Notifications
You must be signed in to change notification settings - Fork 4
80 lines (80 loc) · 2.25 KB
/
github-actions.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
name: Test and Build
on:
push:
branches: master
pull_request:
branches: master
jobs:
unit-testing:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.6', '3.7', '3.8', '3.9']
steps:
- name: Checkout Repository And Submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set Up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python Version
run: python -c "import sys; print(sys.version)"
shell: bash
- name: Install Pydivsufsort And Other Dependencies
run: |
bash ./cibw_before_build.sh
python -m pip install .
shell: bash
- name: Run Flake8
run: flake8 .
shell: bash
- name: Run Unit Tests
run: |
pytest tests
shell: bash
build_wheels:
needs: unit-testing
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout Repository And Submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set Up Python
uses: actions/setup-python@v2
- name: Install Build
run: python -m pip install build
shell: bash
- name: Build Sdist
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
python -m build --sdist
fi
shell: bash
- name: Install Cibuildwheel
run: python -m pip install cibuildwheel
shell: bash
- name: Build Wheels
env:
CIBW_BEFORE_BUILD: bash ./cibw_before_build.sh
CIBW_SKIP: pp*
run: |
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse/*
shell: bash
- name: Upload Builds
run: |
python -m pip install twine
if [ "$RUNNER_OS" == "Linux" ]; then
# Replace/remove echo
echo "python -m twine upload --skip-existing dist/*"
fi
# Replace/remove echo
echo "python -m twine upload --skip-existing wheelhouse/*.whl"
shell: bash