build(deps): bump jinja2 from 3.1.4 to 3.1.6 in /docs (#18) #157
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| tags: [ "v0.*", "v1.*" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: {} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.11 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install isort==5.13.2 flake8==7.0.0 | |
| - name: Check coding style (flake8) | |
| run: "flake8 alsa_midi tests" | |
| - name: Check imports sorting (isort) | |
| run: "isort --check --dont-follow-links alsa_midi tests" | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install tox | |
| sudo apt update | |
| sudo apt install -y libasound2-dev | |
| - name: Run tests | |
| run: "tox -e py -- -vv" | |
| test-on-alsa-kernel: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install vagrant | |
| run: | | |
| sudo apt update | |
| sudo apt install -y vagrant libvirt-daemon libvirt-daemon-driver-qemu libvirt-clients libvirt-daemon-system | |
| sudo chmod a+rw /var/run/libvirt/libvirt-sock | |
| - name: Cache Vagrant boxes | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.vagrant.d/boxes | |
| key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vagrant- | |
| - name: Start vagrant VM | |
| run: | | |
| cp tests/Vagrantfile . | |
| vagrant up | |
| - name: Run tests in vagrant vm | |
| run: | | |
| vagrant ssh vm -c 'cd /vagrant && /venv/bin/tox -e py -- -vv' | |
| build-pure: | |
| needs: | |
| - test | |
| - test-on-alsa-kernel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python 3.8 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build twine | |
| sudo apt update | |
| - name: Build | |
| run: | | |
| export PY_ALSA_MIDI_NO_COMPILE=1 | |
| python -m build . | |
| twine check dist/* | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: dist-pure | |
| path: dist | |
| # separate jobs, as matrix does not work with 'uses: docker://' and 'container:' does not work well with 'actions/checkout' | |
| build-manylinux_2_12_x86_64: | |
| needs: | |
| - test | |
| - test-on-alsa-kernel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build and test ${{ matrix.manylinux-tag }} wheels | |
| uses: docker://quay.io/pypa/manylinux2010_x86_64 | |
| with: | |
| args: ./build-wheels.sh manylinux_2_12_x86_64 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: wheelhouse-manylinux_2_12_x86_64 | |
| path: wheelhouse | |
| build-manylinux_2_12_i686: | |
| needs: | |
| - test | |
| - test-on-alsa-kernel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build and test ${{ matrix.manylinux-tag }} wheels | |
| uses: docker://quay.io/pypa/manylinux2010_i686 | |
| with: | |
| args: linux32 ./build-wheels.sh manylinux_2_12_i686 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: wheelhouse-manylinux_2_12_i686 | |
| path: wheelhouse | |
| build-manylinux_2_17_x86_64: | |
| needs: | |
| - test | |
| - test-on-alsa-kernel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build and test ${{ matrix.manylinux-tag }} wheels | |
| uses: docker://quay.io/pypa/manylinux2014_x86_64 | |
| with: | |
| args: ./build-wheels.sh manylinux_2_17_x86_64 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: wheelhouse-manylinux_2_17_x86_64 | |
| path: wheelhouse | |
| build-manylinux_2_17_i686: | |
| needs: | |
| - test | |
| - test-on-alsa-kernel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build and test ${{ matrix.manylinux-tag }} wheels | |
| uses: docker://quay.io/pypa/manylinux2014_i686 | |
| with: | |
| args: linux32 ./build-wheels.sh manylinux_2_17_i686 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: wheelhouse-manylinux_2_17_i686 | |
| path: wheelhouse | |
| build-manylinux_2_28_x86_64: | |
| needs: | |
| - test | |
| - test-on-alsa-kernel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build and test ${{ matrix.manylinux-tag }} wheels | |
| uses: docker://quay.io/pypa/manylinux_2_28_x86_64 | |
| with: | |
| args: ./build-wheels.sh manylinux_2_28_x86_64 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: wheelhouse-manylinux_2_28_x86_64 | |
| path: wheelhouse | |
| publish: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| needs: | |
| - build-pure | |
| - build-manylinux_2_12_x86_64 | |
| - build-manylinux_2_12_i686 | |
| - build-manylinux_2_17_x86_64 | |
| - build-manylinux_2_17_i686 | |
| - build-manylinux_2_28_x86_64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v2 | |
| - name: Collect dist files | |
| run: | | |
| ls -lR . | |
| mkdir -p dist | |
| mv wheelhouse-*/*manylinux*.whl dist/ | |
| mv dist-pure/*-py3-none-any.whl dist/ | |
| mv dist-pure/*.tar.gz dist/ | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| # password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
| # repository_url: https://test.pypi.org/legacy/ |