Add patches for 18.24.0 and 20.9.0. #21
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
name: asterisk 18 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@main | |
- 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 |