Skip to content

Commit

Permalink
Add Asterisk 20 workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
gareth-palmer committed Sep 17, 2023
1 parent 729d467 commit b137891
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 2 deletions.
File renamed without changes.
81 changes: 81 additions & 0 deletions .github/workflows/asterisk-20.yml
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Asterisk Build](https://img.shields.io/github/actions/workflow/status/usecallmanagernz/patches/asterisk.yml?branch=master&label=asterisk%20build)](https://github.com/usecallmanagernz/patches/actions/workflows/asterisk.yml) [![Licence](https://img.shields.io/github/license/usecallmanagernz/patches?color=red)](LICENSE)
[![Asterisk 18 Build](https://img.shields.io/github/actions/workflow/status/usecallmanagernz/patches/asterisk-18.yml?branch=master&label=asterisk%2018%20build)](https://github.com/usecallmanagernz/patches/actions/workflows/asterisk-18.yml) [![Asterisk 20 Build](https://img.shields.io/github/actions/workflow/status/usecallmanagernz/patches/asterisk-20.yml?branch=master&label=asterisk%2020%20build)](https://github.com/usecallmanagernz/patches/actions/workflows/asterisk-20.yml) [![Licence](https://img.shields.io/github/license/usecallmanagernz/patches?color=red)](LICENSE)

# Asterisk Patch

Expand All @@ -18,8 +18,8 @@ for more information.

## Latest Patch Versions

* Asterisk 20: [cisco-usecallmanager-20.4.0.patch](asterisk/cisco-usecallmanager-20.4.0.patch).
* Asterisk 18: [cisco-usecallmanager-18.19.0.patch](asterisk/cisco-usecallmanager-18.19.0.patch).
* Asterisk 20: [cisco-usecallmanager-20.4.0.patch](asterisk/cisco-usecallmanager-20.4.0.patch).

## OpenConnect Patch

Expand Down

0 comments on commit b137891

Please sign in to comment.