Use rtp.io from the github and voiptests from @wip. #413
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: Build & Test Python Wheels | |
| on: | |
| push: | |
| # branches: [ master ] | |
| pull_request: | |
| # branches: [ master ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| # Cancels previous runs of this workflow for the same PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' || startsWith(github.ref_name, 'codex/') || github.ref_name == 'wip' }} | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-22.04] | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Define PYTHON_CMD | |
| run: | | |
| PYTHON_VER="`echo ${{ matrix.python-version }} | sed 's|-dev$||'`" | |
| echo "PYTHON_CMD=python${PYTHON_VER}" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: | | |
| ${PYTHON_CMD} -m pip install --upgrade pip | |
| pip install --upgrade setuptools wheel | |
| pip install -r requirements.txt | |
| - name: Build, Install & Test | |
| run: | | |
| ${PYTHON_CMD} setup.py build | |
| ${PYTHON_CMD} setup.py sdist | |
| sudo "`which ${PYTHON_CMD}`" setup.py install | |
| pip install dist/sippy*.gz | |
| ${PYTHON_CMD} -m unittest | |
| voiptests: | |
| name: VoIPTests | |
| uses: ./.github/workflows/.voiptests.yml | |
| with: | |
| rtpp-image-tag: latest-${{ matrix.rtpp-image-tag }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rtpp-image-tag: ['debian_13-slim', 'ubuntu_latest'] | |
| publish_wheels: | |
| name: Publish Puthon Wheels | |
| needs: [build, voiptests] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/sippy | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --upgrade setuptools wheel | |
| pip install -r requirements.txt | |
| - name: build | |
| run: python setup.py sdist | |
| - name: Publish package distributions to PyPI | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| roll_release: | |
| name: Release | |
| needs: [publish_wheels] | |
| permissions: | |
| contents: write | |
| uses: sippy/cimagic/.github/workflows/RollReleaseDraft.yml@v2 |