Track which tests are running and produce the list if any are #916
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: Alice->SSUT->Bob | |
| on: | |
| push: | |
| pull_request: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "30 0 * * 0" | |
| jobs: | |
| buildkit_image: | |
| name: Prepare BuildKit Image | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image: ${{ steps.meta.outputs.image }} | |
| image-artifact: ${{ steps.meta.outputs.image-artifact }} | |
| env: | |
| BUILDKIT_IMAGE: moby/buildkit:buildx-stable-1 | |
| steps: | |
| - name: Compute BuildKit image metadata | |
| id: meta | |
| run: | | |
| IMAGE_SAFE="$(printf '%s' "${BUILDKIT_IMAGE}" | sed 's|[^a-zA-Z0-9_.-]|-|g')" | |
| IMAGE_HASH="$(printf '%s' "${BUILDKIT_IMAGE}" | sha256sum | cut -c1-16)" | |
| CACHE_DIR="${RUNNER_TEMP}/buildkit-image-cache" | |
| IMAGE_TAR="${CACHE_DIR}/buildkit-image.tar" | |
| IMAGE_ARTIFACT="buildkit-image-${IMAGE_SAFE}-${IMAGE_HASH}" | |
| echo "image=${BUILDKIT_IMAGE}" >> "$GITHUB_OUTPUT" | |
| echo "image-artifact=${IMAGE_ARTIFACT}" >> "$GITHUB_OUTPUT" | |
| echo "image-hash=${IMAGE_HASH}" >> "$GITHUB_OUTPUT" | |
| echo "cache-dir=${CACHE_DIR}" >> "$GITHUB_OUTPUT" | |
| echo "image-tar=${IMAGE_TAR}" >> "$GITHUB_OUTPUT" | |
| mkdir -p "${CACHE_DIR}" | |
| - name: Restore BuildKit image cache | |
| id: buildkit_cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.meta.outputs.cache-dir }} | |
| key: buildkit-image-${{ runner.os }}-${{ steps.meta.outputs.image-hash }} | |
| - name: Load cached BuildKit image | |
| if: ${{ steps.buildkit_cache.outputs.cache-hit == 'true' }} | |
| id: load_buildkit_cache | |
| shell: bash | |
| continue-on-error: true | |
| run: docker load --input "${{ steps.meta.outputs.image-tar }}" | |
| - name: Pull and save BuildKit image | |
| if: ${{ steps.buildkit_cache.outputs.cache-hit != 'true' || steps.load_buildkit_cache.outcome != 'success' }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| for attempt in 1 2 3 4 5 6 7 | |
| do | |
| if docker pull "${BUILDKIT_IMAGE}" | |
| then | |
| docker save "${BUILDKIT_IMAGE}" --output "${{ steps.meta.outputs.image-tar }}" | |
| exit 0 | |
| fi | |
| STIME="`python -c "from random import random; print(1 + int(random() * (2 ** ${attempt})))"`" | |
| sleep "${STIME}" | |
| done | |
| docker pull "${BUILDKIT_IMAGE}" | |
| docker save "${BUILDKIT_IMAGE}" --output "${{ steps.meta.outputs.image-tar }}" | |
| - name: Upload BuildKit image artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ steps.meta.outputs.image-artifact }} | |
| path: ${{ steps.meta.outputs.image-tar }} | |
| retention-days: 1 | |
| compression-level: 0 | |
| # Alice->OpenSIPS->Bob | |
| opensips: | |
| name: OpenSIPS (${{ matrix.mm-branch }}) | |
| needs: buildkit_image | |
| uses: ./.github/workflows/.main.yml | |
| with: | |
| mm-type: 'opensips' | |
| mm-branch: ${{ matrix.mm-branch }} | |
| mm-auths: ${{ matrix.mm-auths }} | |
| rtppc-types: ${{ matrix.rtppc-types }} | |
| use-local-image: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }} | |
| artifact-files: 'opensips.cfg' | |
| buildkit-image: ${{ needs.buildkit_image.outputs.image }} | |
| buildkit-image-artifact: ${{ needs.buildkit_image.outputs.image-artifact }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mm-branch: ['master', '4.0'] | |
| mm-auths: ['["", "passtr", "UAC", "UAS/auth", "UAS/auth_db/calculate_ha1", "UAS/auth_db/ha1"]',] | |
| rtppc-types: ['["unix", "udp", "udp6", "tcp", "tcp6"]',] | |
| include: | |
| - mm-branch: '3.6' | |
| mm-auths: '[""]' | |
| rtppc-types: '["unix", "udp", "udp6", "tcp", "tcp6"]' | |
| - mm-branch: '3.5' | |
| mm-auths: '[""]' | |
| rtppc-types: '["unix", "udp", "udp6", "tcp", "tcp6"]' | |
| - mm-branch: '3.4' | |
| mm-auths: '[""]' | |
| rtppc-types: '["unix", "udp", "udp6", "tcp", "tcp6"]' | |
| - mm-branch: '3.3' | |
| mm-auths: '[""]' | |
| rtppc-types: '["unix", "udp", "udp6", "tcp", "tcp6"]' | |
| - mm-branch: '3.2' | |
| mm-auths: '[""]' | |
| rtppc-types: '["unix", "udp", "udp6", "tcp", "tcp6"]' | |
| - mm-branch: '3.1' | |
| mm-auths: '[""]' | |
| rtppc-types: '["unix", "udp", "udp6"]' | |
| - mm-branch: '3.0' | |
| mm-auths: '[""]' | |
| rtppc-types: '["unix", "udp", "udp6"]' | |
| # Alice->Sippy Python B2B->Bob | |
| sippy_py_b2bua: | |
| name: Sippy Py-B2BUA (${{ matrix.mm-branch }}) | |
| needs: buildkit_image | |
| uses: ./.github/workflows/.main.yml | |
| with: | |
| mm-type: 'b2bua' | |
| mm-branch: ${{ matrix.mm-branch }} | |
| python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' | |
| rtppc-types: '["unix", "cunix", "udp", "udp6", "tcp", "tcp6"]' | |
| use-local-image: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }} | |
| artifact-files: 'b2bua.log' | |
| buildkit-image: ${{ needs.buildkit_image.outputs.image }} | |
| buildkit-image-artifact: ${{ needs.buildkit_image.outputs.image-artifact }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mm-branch: ['master', 'PRACK'] | |
| # Alice->Sippy GO B2B->Bob | |
| sippy_go_b2bua: | |
| name: Sippy GO-B2BUA (${{ matrix.mm-branch }}) | |
| needs: buildkit_image | |
| uses: ./.github/workflows/.main.yml | |
| with: | |
| mm-type: 'go-b2bua' | |
| mm-branch: ${{ matrix.mm-branch }} | |
| rtppc-types: '["unix", "cunix", "udp", "udp6", "tcp", "tcp6"]' | |
| use-local-image: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }} | |
| artifact-files: 'b2bua.log' | |
| buildkit-image: ${{ needs.buildkit_image.outputs.image }} | |
| buildkit-image-artifact: ${{ needs.buildkit_image.outputs.image-artifact }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mm-branch: ['master'] | |
| # Alice->Kamailio->Bob | |
| kamailio: | |
| name: Kamailio (${{ matrix.mm-branch }}) | |
| needs: buildkit_image | |
| uses: ./.github/workflows/.main.yml | |
| with: | |
| mm-type: 'kamailio' | |
| mm-branch: ${{ matrix.mm-branch }} | |
| rtppc-types: '["unix", "udp", "udp6"]' | |
| use-local-image: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }} | |
| artifact-files: 'kamailio.cfg' | |
| buildkit-image: ${{ needs.buildkit_image.outputs.image }} | |
| buildkit-image-artifact: ${{ needs.buildkit_image.outputs.image-artifact }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mm-branch: ['master', '6.1', '6.0', '5.8', '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1'] | |
| publish: | |
| needs: [opensips, sippy_py_b2bua, sippy_go_b2bua, kamailio] | |
| if: github.event_name == 'release' && github.event.action == 'created' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install setuptools wheel twine | |
| - name: Build and publish | |
| env: | |
| TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
| run: | | |
| python setup.py sdist | |
| twine upload dist/* |