Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Aug 3, 2024
1 parent cd4f0b4 commit dd9e18d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 126 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/.main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Reusable Workflow

on:
workflow_dispatch:
workflow_call:
inputs:
python-version:
Expand Down Expand Up @@ -42,7 +41,6 @@ jobs:
MM_BRANCH: ${{ inputs.mm-branch }}
RTPP_BRANCH: DOCKER
RTPPC_TYPE: ${{ inputs.rtppc-type }}
PYTHON_CMD: "python${{ inputs.python-version }}"
steps:
- uses: actions/checkout@v4

Expand All @@ -51,6 +49,11 @@ jobs:
with:
python-version: ${{ inputs.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: before_install
run: sh -x cibits/before_install.sh

Expand Down
142 changes: 18 additions & 124 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,149 +69,43 @@ jobs:

# Alice->Sippy Python B2B->Bob
sippy_py_b2bua:
if: false
runs-on: ubuntu-latest
container:
image: sippylabs/rtpproxy:latest-ubuntu_latest
options: --privileged
env:
MM_TYPE: b2bua
MM_BRANCH: ${{ matrix.mm-branch }}
RTPP_BRANCH: DOCKER
RTPPC_TYPE: ${{ matrix.rtppc-type }}

uses: ./.github/workflows/.main.yml
with:
mm-type: 'b2bua'
mm-branch: ${{ matrix.mm-branch }}
rtppc-type: ${{ matrix.rtppc-type }}
python-version: ${{ matrix.python-version }}
artifact-files: 'b2bua.log'
strategy:
matrix:
mm-branch: ['wip', 'PRACK']
rtppc-type: ['unix', 'cunix', 'udp', 'udp6', 'tcp', 'tcp6']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13-dev']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- 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: before_install
run: sh -x cibits/before_install.sh

- name: script
run: sh -x ./test_run.sh


- name: Test logs
uses: actions/upload-artifact@v4
with:
name: test-logs_sippy_py_b2bua_${{ matrix.python-version }}_${{ matrix.mm-branch }}_${{ matrix.rtppc-type }}
path: |
b2bua.log
bob.log
alice.log
rtpproxy.log
continue-on-error: true

# Alice->Sippy GO B2B->Bob
sippy_go_b2bua:
if: false
runs-on: ubuntu-latest
container:
image: sippylabs/rtpproxy:latest-ubuntu_latest
options: --privileged
env:
MM_TYPE: go-b2bua
MM_BRANCH: master
RTPP_BRANCH: DOCKER
RTPPC_TYPE: ${{ matrix.rtppc-type }}
python-version: '3.12'
PYTHON_CMD: "python3.12"

uses: ./.github/workflows/.main.yml
with:
mm-type: 'go-b2bua'
rtppc-type: ${{ matrix.rtppc-type }}
artifact-files: 'b2bua.log'
strategy:
matrix:
rtppc-type: ['unix', 'cunix', 'udp', 'udp6', 'tcp', 'tcp6']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}

- name: before_install
run: sh -x cibits/before_install.sh

- name: script
run: sh -x ./test_run.sh

- name: Test logs
uses: actions/upload-artifact@v4
with:
name: test-logs_sippy_go_b2bua_${{ matrix.rtppc-type }}
path: |
b2bua.log
bob.log
alice.log
rtpproxy.log
continue-on-error: true

# Alice->Kamailio->Bob
kamailio:
if: false
runs-on: ubuntu-latest
container:
image: sippylabs/rtpproxy:latest-ubuntu_latest
options: --privileged
env:
MM_TYPE: kamailio
MM_BRANCH: ${{ matrix.mm-branch }}
RTPP_BRANCH: DOCKER
RTPPC_TYPE: ${{ matrix.rtppc-type }}
python-version: '3.12'
PYTHON_CMD: "python3.12"

uses: ./.github/workflows/.main.yml
with:
mm-type: 'kamailio'
mm-branch: ${{ matrix.mm-branch }}
rtppc-type: ${{ matrix.rtppc-type }}
artifact-files: 'kamailio.cfg'
strategy:
matrix:
mm-branch: ['master', '5.8', '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0', '4.4']
rtppc-type: ['unix', 'udp', 'udp6']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}

- name: before_install
run: sh -x cibits/before_install.sh

- name: script
run: sh -x ./test_run.sh

- name: Test logs
uses: actions/upload-artifact@v4
with:
name: test-logs_kamailio_${{ matrix.mm-branch }}_${{ matrix.rtppc-type }}
path: |
kamailio.cfg
bob.log
alice.log
rtpproxy.log
continue-on-error: true

publish:
needs: [opensips, opensips_rfc8760, sippy_py_b2bua, sippy_go_b2bua, kamailio]
if: github.event_name == 'release' && github.event.action == 'created'
Expand Down

0 comments on commit dd9e18d

Please sign in to comment.