-
Notifications
You must be signed in to change notification settings - Fork 16
92 lines (84 loc) · 2.46 KB
/
.main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Reusable Workflow
on:
workflow_call:
inputs:
python-version:
required: false
type: string
default: '3.12'
mm-type:
required: true
type: string
mm-branch:
required: false
type: string
default: 'master'
mm-auth:
required: false
type: string
default: ''
rtppc-type:
required: true
type: string
rtpp-image:
required: false
type: string
default: 'ghcr.io/sippy/rtpproxy'
rtpp-image-tag:
required: false
type: string
default: 'latest-ubuntu_latest'
artifact-files:
required: false
type: string
default: ''
jobs:
test:
runs-on: ubuntu-latest
container:
image: ${{ inputs.rtpp-image }}:${{ inputs.rtpp-image-tag }}
options: --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0
env:
MM_TYPE: ${{ inputs.mm-type }}
MM_BRANCH: ${{ inputs.mm-branch }}
RTPP_BRANCH: DOCKER
RTPPC_TYPE: ${{ inputs.rtppc-type }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
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
- name: transform_var
id: transform_var
run: |
ARTNAME="test-logs_${{ inputs.mm-type }}_${{ inputs.mm-branch }}_${{ inputs.rtppc-type }}"
MM_AUTH="`echo "${{ inputs.mm-auth }}" | sed 's|/|.|g'`"
if [ "${MM_AUTH}" != "" ]
then
ARTNAME="${ARTNAME}_${MM_AUTH}"
echo "MM_AUTH=${{ inputs.mm-auth }}" >> $GITHUB_ENV
fi
if [ "${{ inputs.mm-type }}" = "b2bua" ]
then
ARTNAME="${ARTNAME}_${{ inputs.python-version }}"
fi
echo "ARTNAME=${ARTNAME}" >> $GITHUB_OUTPUT
- name: script
run: sh -x ./test_run.sh
- name: Test logs
uses: actions/upload-artifact@v4
with:
name: ${{ steps.transform_var.outputs.ARTNAME }}
path: |
bob.log
alice.log
rtpproxy.log
${{ inputs.artifact-files }}
continue-on-error: true