-
Notifications
You must be signed in to change notification settings - Fork 7
81 lines (61 loc) · 2.21 KB
/
asterisk.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
name: asterisk build
on:
push:
branches:
- master
paths:
- 'asterisk/cisco-usecallmanager-18.*.patch'
- '.github/workflows/asterisk-18.yml'
pull_request:
branches:
- master
paths:
- 'asterisk/cisco-usecallmanager-18.*.patch'
- '.github/workflows/asterisk-18.yml'
workflow_dispatch:
env:
ASTERISK_URL: https://downloads.asterisk.org/pub/telephony/asterisk
jobs:
build:
name: Patch and build asterisk
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install packages
run: |
sudo apt install wget patch build-essential zlib1g-dev libssl-dev \
libncurses-dev libreadline-dev libedit-dev uuid-dev libxml2-dev \
libsqlite3-dev libjansson-dev libsrtp2-dev pkg-config libxml2-utils
- name: Get patch version
run: |
PATCH_FILE=$(ls -1 -v asterisk/cisco-usecallmanager-18.*.patch | tail -1)
PATCH_FILE="${PATCH_FILE#asterisk/}"
echo "PATCH_FILE=$PATCH_FILE" >> $GITHUB_ENV
ASTERISK_VERSION="${PATCH_FILE#cisco-usecallmanager-}"
ASTERISK_VERSION="${ASTERISK_VERSION%.patch}"
echo "ASTERISK_VERSION=$ASTERISK_VERSION" >> $GITHUB_ENV
- name: Fetch source archive
run: |
mkdir downloads
cd downloads
wget ${{ env.ASTERISK_URL }}/asterisk-${{ env.ASTERISK_VERSION }}.tar.gz \
|| wget ${{ env.ASTERISK_URL }}/old-releases/asterisk-${{ env.ASTERISK_VERSION }}.tar.gz
- name: Extract source archive
run: |
cd downloads
tar -zxvf asterisk-${{ env.ASTERISK_VERSION }}.tar.gz
- name: Apply patch
run: |
cd downloads/asterisk-${{ env.ASTERISK_VERSION }}
patch -p1 < ../../asterisk/${{ env.PATCH_FILE }}
- name: Run configure and make
run: |
cd downloads/asterisk-${{ env.ASTERISK_VERSION }}
export CFLAGS="-DENABLE_SRTP_AES_GCM -DENABLE_SRTP_AES_256"
./configure --without-pjproject
make
- name: Validate documentaton
run: |
cd downloads/asterisk-${{ env.ASTERISK_VERSION }}
make validate-docs