1- name : ' Test and Release Yakut '
1+ name : ' Test & Release'
22on : push
33
4- # Ensures that only one workflow is running at a time
5- concurrency :
6- group : ${{ github.workflow_sha }}
7- cancel-in-progress : true
8-
94jobs :
10- yakut- test :
11- name : Test Yakut
5+ test :
6+ name : Test
127 strategy :
138 fail-fast : false
149 matrix :
15- # The Windows NPcap runner is an ordinary Windows machine with the NPcap driver installed manually.
16- # We chose to do it this way because NPcap driver installation requires a reboot, which is difficult to
17- # automate. The NPcap driver is required for the Cyphal/UDP transport tests to work.
18- os : [ubuntu-22.04, windows-2019-npcap]
19- python : ['3.8', '3.9', '3.10', '3.11']
20- exclude : # We don't test Windows with old Python versions because it takes too much effort.
21- - os : windows-2019-npcap
22- python : 3.8
23- - os : windows-2019-npcap
24- python : 3.9
10+ os : [ ubuntu-latest ]
11+ py : [ '3.10', '3.11', '3.12', '3.13' ]
12+ # On Windows, we select the configurations we test manually because we only have a few runners,
13+ # and because the infrastructure is hard to maintain using limited resources.
14+ include :
15+ - { os: win-pcap, py: '3.12' }
2516 runs-on : ${{ matrix.os }}
17+ env :
18+ FORCE_COLOR : 1
2619 steps :
27- - name : Check out
28- uses : actions/checkout@v3
20+ - uses : actions/checkout@v4
21+ with :
22+ submodules : true
2923
30- - name : Install Python3
31- uses : actions/setup-python@v4
24+ - uses : actions/setup-python@v5
3225 with :
3326 python-version : ${{ matrix.python }}
3427
35- - name : Log Python version
36- run : python --version
37-
38- - name : Install dependencies
28+ - name : Configure environment -- GNU/Linux
29+ if : ${{ runner.os == 'Linux' }}
3930 # language=bash
4031 run : |
41- if [ "$RUNNER_OS" == "Linux" ]; then
42- sudo apt-get --ignore-missing update || true
43- sudo apt-get install -y linux-*-extra-$(uname -r) ncat
44- sudo apt-get install -y libsdl2-2.0-0 # For PySDL2. On Windows/macOS the binaries are pulled from PyPI.
45- sudo apt-get install -y libasound2-dev # For RtMidi.
46- fi
47- git submodule update --init --recursive
48- python -m pip install --upgrade pip setuptools nox
49- shell : bash
32+ python --version
33+ sudo apt-get --ignore-missing update || true
34+ sudo apt-get install -y linux-*-extra-$(uname -r) ncat
35+ sudo apt-get install -y libsdl2-2.0-0 # For PySDL2. On Windows/macOS the binaries are pulled from PyPI.
36+ sudo apt-get install -y libasound2-dev # For RtMidi.
5037
51- - name : Run build and test
52- # language=bash
53- run : |
54- nox --non-interactive --session test --python ${{ matrix.python }}
55- nox --non-interactive --session lint
56- shell : bash
57- env :
58- FORCE_COLOR : 1
38+ # Only one statement per step to ensure the error codes are not ignored by PowerShell.
39+ - run : python -m pip install --upgrade pip setuptools nox
40+ - run : nox --non-interactive --session test --python ${{ matrix.python }}
41+ - run : nox --non-interactive --session lint
5942
60- - name : Upload diagnostics
61- uses : actions/upload-artifact@v3
43+ - uses : actions/upload-artifact@v4
6244 if : (success() || failure())
6345 with :
6446 # The matrix is shown for convenience but this is fragile because the values may not be string-convertible.
@@ -68,20 +50,21 @@ jobs:
6850 path : " **/*.log"
6951 retention-days : 90
7052
71- yakut- release :
72- name : Release Yakut
53+ release :
54+ name : Release
7355 runs-on : ubuntu-latest
7456 if : contains(github.event.head_commit.message, '#release') || contains(github.ref, '/main')
75- needs : yakut- test
57+ needs : test
7658 steps :
7759 - name : Check out
78- uses : actions/checkout@v3
60+ uses : actions/checkout@v4
61+ with :
62+ submodules : true
7963
8064 - name : Create distribution wheel
8165 # language=bash
8266 run : |
83- git submodule update --init --recursive
84- python -m pip install --upgrade pip setuptools wheel twine
67+ python -m pip install --upgrade packaging pip setuptools wheel twine
8568 python setup.py sdist bdist_wheel
8669
8770 - name : Get release version
9578 TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN_YAKUT }}
9679
9780 - name : Push version tag
98- uses : mathieudutour/github-tag-action@v6.1
81+ uses : mathieudutour/github-tag-action@v6.2
9982 with :
10083 github_token : ${{ secrets.GITHUB_TOKEN }}
10184 custom_tag : ${{ env.yakut_version }}
0 commit comments