-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
729d467
commit b137891
Showing
3 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: asterisk build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'asterisk/cisco-usecallmanager-20.*.patch' | ||
- '.github/workflows/asterisk-20.yml' | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- 'asterisk/cisco-usecallmanager-20.*.patch' | ||
- '.github/workflows/asterisk-20.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-20.*.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 |
This file contains 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