Skip to content

Commit 7db45d8

Browse files
committed
install: Enhance CI and distro support and portability.
* 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.
1 parent e8ce1d5 commit 7db45d8

File tree

4 files changed

+293
-126
lines changed

4 files changed

+293
-126
lines changed

.github/workflows/main.yml

Lines changed: 106 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,139 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: CI
42

5-
# Controls when the workflow will run
63
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
84
push:
95
branches: [ master ]
106
pull_request:
117
branches: [ master ]
8+
# Retest weekly to ensure nothing has broken
9+
schedule:
10+
- cron: '0 1 15 * *'
1211

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

16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
# DAHDI not currently built in Fedora-based distros due to missing Azure kernel headers:
16+
# kernel-devel mismatch has been detected. Package provides 6.12.0-0.rc0.20240918git4a39ac5b7d62, but running kernel is 6.8.0-1014-azure
17+
1718
jobs:
1819
ubuntu-latest:
19-
# The type of runner that the job will run on
20-
runs-on: ubuntu-latest
21-
22-
# Steps represent a sequence of tasks that will be executed as part of the job
20+
runs-on: ubuntu-24.04
21+
name: Ubuntu 24.04
2322
steps:
24-
# Runs a set of commands using the runners shell
25-
- name: Run Ubuntu build
26-
run: |
27-
cd /usr/src
28-
sudo apt-get update -y
29-
sudo apt-get install -y wget procps
30-
sudo wget https://raw.githubusercontent.com/InterLinked1/phreakscript/master/phreaknet.sh
31-
sudo chmod +x phreaknet.sh
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
- name: Build DAHDI and Asterisk
26+
run: |
27+
sudo ./phreaknet.sh make
28+
sudo phreaknet install --fast --dahdi --drivers --devmode
29+
# Skip tests on Ubuntu, since it takes the longest, and runtime doesn't vary by platform
30+
ubuntu-stable:
31+
runs-on: ubuntu-22.04
32+
name: Ubuntu 22.04
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Build DAHDI and Asterisk
37+
run: |
3238
sudo ./phreaknet.sh make
33-
sudo phreaknet install -d -s --devmode
39+
sudo phreaknet install --fast --dahdi --drivers --sip --devmode
3440
# Skip tests on Ubuntu, since it takes the longest, and runtime doesn't vary by platform
3541
debian-stable-asterisk-lts:
36-
runs-on: ubuntu-latest
42+
runs-on: ubuntu-24.04
43+
name: Debian 12, Asterisk 20
3744
container: debian:12
3845
steps:
39-
- name: Run Debian 12 build for Asterisk 20
46+
- uses: actions/checkout@v4
47+
- name: Build DAHDI and Asterisk
4048
run: |
41-
cd /usr/src/
42-
apt-get update -y
43-
apt-get install -y wget procps
44-
wget https://raw.githubusercontent.com/InterLinked1/phreakscript/master/phreaknet.sh
45-
chmod +x phreaknet.sh
4649
./phreaknet.sh make
47-
phreaknet install -d -s -t --version=20
50+
phreaknet install --fast --dahdi --drivers --sip --testsuite --version=20
51+
- name: Run tests
52+
run: |
4853
phreaknet runtests
4954
debian-stable-asterisk-latest:
50-
runs-on: ubuntu-latest
55+
runs-on: ubuntu-24.04
56+
name: Debian 12
5157
container: debian:12
5258
steps:
53-
- name: Run Debian 12 build for Asterisk 21
59+
- uses: actions/checkout@v4
60+
- name: Build DAHDI and Asterisk
5461
run: |
55-
cd /usr/src
56-
apt-get update -y
57-
apt-get install -y wget procps
58-
wget https://raw.githubusercontent.com/InterLinked1/phreakscript/master/phreaknet.sh
59-
chmod +x phreaknet.sh
6062
./phreaknet.sh make
61-
phreaknet install -d -s -t --drivers --wanpipe
63+
phreaknet install --fast --dahdi --drivers --sip --testsuite
64+
- name: Run tests
65+
run: |
6266
phreaknet runtests
6367
debian-stable-asterisk-latest-unpatched:
64-
runs-on: ubuntu-latest
68+
runs-on: ubuntu-24.04
69+
name: Debian 12, vanilla Asterisk
6570
container: debian:12
6671
steps:
67-
- name: Run Debian 12 build for vanilla Asterisk 21
72+
- uses: actions/checkout@v4
73+
- name: Build DAHDI and Asterisk
74+
run: |
75+
./phreaknet.sh make
76+
phreaknet install --fast --dahdi --devmode --vanilla --user=asterisk
77+
fedora-42:
78+
runs-on: ubuntu-24.04
79+
name: Fedora 42
80+
container: fedora:42
81+
steps:
82+
- uses: actions/checkout@v4
83+
- name: Build DAHDI and Asterisk
84+
run: |
85+
./phreaknet.sh make
86+
phreaknet install --fast --devmode
87+
rocky-9:
88+
runs-on: ubuntu-24.04
89+
name: Rocky Linux 9.3
90+
container: rockylinux:9.3
91+
steps:
92+
- uses: actions/checkout@v4
93+
- name: Build DAHDI and Asterisk
94+
run: |
95+
./phreaknet.sh make
96+
phreaknet install --fast --sip --devmode
97+
rocky-8:
98+
runs-on: ubuntu-24.04
99+
name: Rocky Linux 8.9
100+
container: rockylinux:8.9
101+
steps:
102+
- uses: actions/checkout@v4
103+
- name: Build DAHDI and Asterisk
104+
run: |
105+
./phreaknet.sh make
106+
phreaknet install --fast --sip --devmode
107+
opensuse:
108+
runs-on: ubuntu-24.04
109+
name: openSUSE Tumbleweed
110+
container: opensuse/tumbleweed
111+
steps:
112+
- uses: actions/checkout@v4
113+
- name: Build DAHDI and Asterisk
114+
run: |
115+
./phreaknet.sh make
116+
phreaknet install --fast --devmode
117+
archlinux:
118+
runs-on: ubuntu-24.04
119+
name: Arch Linux
120+
container: archlinux:latest
121+
steps:
122+
- uses: actions/checkout@v4
123+
- name: Build DAHDI and Asterisk
68124
run: |
69-
cd /usr/src
70-
apt-get update -y
71-
apt-get install -y wget procps
72-
wget https://raw.githubusercontent.com/InterLinked1/phreakscript/master/phreaknet.sh
73-
chmod +x phreaknet.sh
74125
./phreaknet.sh make
75-
phreaknet install -d --vanilla
126+
phreaknet install --fast --dahdi --drivers --devmode
127+
# FreeBSD CI disabled since libuuid headers can't get installed in CI?
128+
# freebsd-14:
129+
# runs-on: ubuntu-24.04
130+
# name: FreeBSD
131+
# steps:
132+
# - uses: actions/checkout@v4
133+
# - name: Build Asterisk
134+
# uses: vmactions/freebsd-vm@v1
135+
# with:
136+
# usesh: true
137+
# run: |
138+
# ./phreaknet.sh make
139+
# phreaknet install --fast --sip --devmode

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ To install with DAHDI, run `phreaknet install --dahdi` (add `--drivers` to also
140140

141141
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.
142142

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

145-
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.
145+
PhreakScript is primarily supported on Debian-based Linux systems, and DAHDI and Asterisk are best supported on these platforms.
146+
Limited support is available for other Linux distros (Fedora, RHEL, Rocky Linux, SUSE, Arch Linux, etc.).
147+
Extremely limited support exists for FreeBSD, and BSDs (and UNIX in general) are not recommended for running Asterisk/DAHDI - use Linux instead if possible.
146148

147149
### License
148150

0 commit comments

Comments
 (0)