Skip to content

Commit

Permalink
install: Enhance CI and distro support and portability.
Browse files Browse the repository at this point in the history
* Add support for SUSE Linux and Arch Linux
* Use $AST_MAKE everywhere instead of make directly.
* Fix res_irc compilation if OpenSSL unavailable.
* Add CI for Ubuntu, Fedora, Rocky Linux, openSUSE, Arch Linux,
  and FreeBSD. This more thoroughly tests DAHDI compilation on
  a variety of kernels and distros, and also provides a variety
  of gcc versions which can catch more code issues earlier.
  • Loading branch information
InterLinked1 committed Sep 21, 2024
1 parent e8ce1d5 commit fe73e12
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 127 deletions.
148 changes: 105 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,137 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Retest weekly to ensure nothing has broken
schedule:
- cron: '0 1 15 * *'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# DAHDI not currently built in Fedora-based distros due to missing Azure kernel headers:
# kernel-devel mismatch has been detected. Package provides 6.12.0-0.rc0.20240918git4a39ac5b7d62, but running kernel is 6.8.0-1014-azure

jobs:
ubuntu-latest:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
runs-on: ubuntu-24.04
name: Ubuntu 24.04
steps:
# Runs a set of commands using the runners shell
- name: Run Ubuntu build
run: |
cd /usr/src
sudo apt-get update -y
sudo apt-get install -y wget procps
sudo wget https://raw.githubusercontent.com/InterLinked1/phreakscript/master/phreaknet.sh
sudo chmod +x phreaknet.sh
- name: Checkout
uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
sudo ./phreaknet.sh make
sudo phreaknet install --fast --dahdi --drivers --sip --devmode
ubuntu-stable:
runs-on: ubuntu-22.04
name: Ubuntu 22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
sudo ./phreaknet.sh make
sudo phreaknet install -d -s --devmode
# Skip tests on Ubuntu, since it takes the longest, and runtime doesn't vary by platform
sudo phreaknet install --fast --dahdi --drivers --sip --devmode
debian-stable-asterisk-lts:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Debian 12, Asterisk 20
container: debian:12
steps:
- name: Run Debian 12 build for Asterisk 20
- uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
cd /usr/src/
apt-get update -y
apt-get install -y wget procps
wget https://raw.githubusercontent.com/InterLinked1/phreakscript/master/phreaknet.sh
chmod +x phreaknet.sh
./phreaknet.sh make
phreaknet install -d -s -t --version=20
phreaknet install --fast --dahdi --drivers --sip --testsuite --version=20
- name: Run tests
run: |
phreaknet runtests
debian-stable-asterisk-latest:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Debian 12
container: debian:12
steps:
- name: Run Debian 12 build for Asterisk 21
- uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
cd /usr/src
apt-get update -y
apt-get install -y wget procps
wget https://raw.githubusercontent.com/InterLinked1/phreakscript/master/phreaknet.sh
chmod +x phreaknet.sh
./phreaknet.sh make
phreaknet install -d -s -t --drivers --wanpipe
phreaknet install --fast --dahdi --drivers --sip --testsuite
- name: Run tests
run: |
phreaknet runtests
debian-stable-asterisk-latest-unpatched:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Debian 12, vanilla Asterisk
container: debian:12
steps:
- name: Run Debian 12 build for vanilla Asterisk 21
- uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
./phreaknet.sh make
phreaknet install --fast --dahdi --devmode --sip --vanilla --user=asterisk
fedora-42:
runs-on: ubuntu-24.04
name: Fedora 42
container: fedora:42
steps:
- uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
./phreaknet.sh make
phreaknet install --fast --sip --devmode
rocky-9:
runs-on: ubuntu-24.04
name: Rocky Linux 9.3
container: rockylinux:9.3
steps:
- uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
./phreaknet.sh make
phreaknet install --fast --sip --devmode
rocky-8:
runs-on: ubuntu-24.04
name: Rocky Linux 8.9
container: rockylinux:8.9
steps:
- uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
./phreaknet.sh make
phreaknet install --fast --sip --devmode
opensuse:
runs-on: ubuntu-24.04
name: openSUSE Tumbleweed
container: opensuse/tumbleweed
steps:
- uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
./phreaknet.sh make
phreaknet install --fast --sip --devmode
archlinux:
runs-on: ubuntu-24.04
name: Arch Linux
container: archlinux:latest
steps:
- uses: actions/checkout@v4
- name: Build DAHDI and Asterisk
run: |
cd /usr/src
apt-get update -y
apt-get install -y wget procps
wget https://raw.githubusercontent.com/InterLinked1/phreakscript/master/phreaknet.sh
chmod +x phreaknet.sh
./phreaknet.sh make
phreaknet install -d --vanilla
phreaknet install --fast --dahdi --drivers --sip --devmode
# FreeBSD CI disabled since libuuid headers can't get installed in CI?
# freebsd-14:
# runs-on: ubuntu-24.04
# name: FreeBSD
# steps:
# - uses: actions/checkout@v4
# - name: Build Asterisk
# uses: vmactions/freebsd-vm@v1
# with:
# usesh: true
# run: |
# ./phreaknet.sh make
# phreaknet install --fast --sip --devmode
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ To install with DAHDI, run `phreaknet install --dahdi` (add `--drivers` to also

For a guided, interactive installation, you can also run `phreaknet wizard`. The wizard will determine what installation options are best for you, based on your preferences.

PhreakScript must be run as root, even if Asterisk does not run as root.
PhreakScript must be run as root, even if Asterisk will not be installed to run as root.

PhreakScript is primarily supported on Debian-based Linux systems. Support has also been added for FreeBSD. Pull requests to add support for other Linux distros or BSD are welcome.
PhreakScript is primarily supported on Debian-based Linux systems, and DAHDI and Asterisk are best supported on these platforms.
Limited support is available for other Linux distros (Fedora, RHEL, Rocky Linux, SUSE, Arch Linux, etc.).
Extremely limited support exists for FreeBSD, and BSDs (and UNIX in general) are not recommended for running Asterisk/DAHDI - use Linux instead if possible.

### License

Expand Down
Loading

0 comments on commit fe73e12

Please sign in to comment.