|
1 | 1 | name: Test/build |
2 | 2 |
|
3 | | -on: [push, pull_request] |
| 3 | +on: |
| 4 | + workflow_dispatch: # Allows manual triggering |
| 5 | + push: # only build on pusheess to the main branch |
| 6 | + branches: |
| 7 | + - master |
| 8 | + pull_request: |
| 9 | + |
| 10 | +# Stop current actions if there is a new push to the same branch |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
4 | 14 |
|
5 | 15 | jobs: |
6 | 16 | build: |
|
9 | 19 | max-parallel: 4 |
10 | 20 | fail-fast: false |
11 | 21 | matrix: |
12 | | - python-version: [3.8, 3.9, '3.10', 3.11] |
| 22 | + python-version: [3.11, 3.12] |
13 | 23 | platform: [ubuntu-latest, macos-latest, windows-latest] |
| 24 | + # The include below adds jobs on older versions of python, |
| 25 | + # but just on one platform. Windows is probably the most widely |
| 26 | + # used for vpython, so test on that. |
| 27 | + include: |
| 28 | + - python-version: "3.8" |
| 29 | + platform: windows-latest |
| 30 | + - python-version: "3.9" |
| 31 | + platform: windows-latest |
| 32 | + - python-version: "3.10" |
| 33 | + platform: windows-latest |
14 | 34 | runs-on: ${{ matrix.platform }} |
15 | 35 |
|
16 | 36 | steps: |
|
62 | 82 | strategy: |
63 | 83 | fail-fast: false |
64 | 84 | matrix: |
65 | | - python-version: [cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311] |
| 85 | + python-version: [cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312] |
66 | 86 | runs-on: ubuntu-latest |
67 | 87 | env: |
68 | 88 | py: /opt/python/${{ matrix.python-version }}/bin/python |
|
84 | 104 | source .env/bin/activate && \ |
85 | 105 | echo -e "\e[1;34m Install dependencies \e[0m" && \ |
86 | 106 | python -m pip install --upgrade pip && \ |
87 | | - pip install pytest Cython wheel && \ |
| 107 | + pip install pytest Cython wheel build && \ |
88 | 108 | echo -e "\e[1;34m Build wheel \e[0m" && \ |
89 | | - python setup.py bdist_wheel && \ |
| 109 | + python -m build && \ |
90 | 110 | echo -e "\e[1;34m Install vpython \e[0m" && \ |
91 | 111 | pip install . && \ |
92 | 112 | echo -e "\e[1;34m Run tests \e[0m" && \ |
|
0 commit comments