Skip to content

Commit fe73e12

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 fe73e12

File tree

4 files changed

+294
-127
lines changed

4 files changed

+294
-127
lines changed

.github/workflows/main.yml

Lines changed: 105 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,137 @@
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 --sip --devmode
29+
ubuntu-stable:
30+
runs-on: ubuntu-22.04
31+
name: Ubuntu 22.04
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
- name: Build DAHDI and Asterisk
36+
run: |
3237
sudo ./phreaknet.sh make
33-
sudo phreaknet install -d -s --devmode
34-
# Skip tests on Ubuntu, since it takes the longest, and runtime doesn't vary by platform
38+
sudo phreaknet install --fast --dahdi --drivers --sip --devmode
3539
debian-stable-asterisk-lts:
36-
runs-on: ubuntu-latest
40+
runs-on: ubuntu-24.04
41+
name: Debian 12, Asterisk 20
3742
container: debian:12
3843
steps:
39-
- name: Run Debian 12 build for Asterisk 20
44+
- uses: actions/checkout@v4
45+
- name: Build DAHDI and Asterisk
4046
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
4647
./phreaknet.sh make
47-
phreaknet install -d -s -t --version=20
48+
phreaknet install --fast --dahdi --drivers --sip --testsuite --version=20
49+
- name: Run tests
50+
run: |
4851
phreaknet runtests
4952
debian-stable-asterisk-latest:
50-
runs-on: ubuntu-latest
53+
runs-on: ubuntu-24.04
54+
name: Debian 12
5155
container: debian:12
5256
steps:
53-
- name: Run Debian 12 build for Asterisk 21
57+
- uses: actions/checkout@v4
58+
- name: Build DAHDI and Asterisk
5459
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
6060
./phreaknet.sh make
61-
phreaknet install -d -s -t --drivers --wanpipe
61+
phreaknet install --fast --dahdi --drivers --sip --testsuite
62+
- name: Run tests
63+
run: |
6264
phreaknet runtests
6365
debian-stable-asterisk-latest-unpatched:
64-
runs-on: ubuntu-latest
66+
runs-on: ubuntu-24.04
67+
name: Debian 12, vanilla Asterisk
6568
container: debian:12
6669
steps:
67-
- name: Run Debian 12 build for vanilla Asterisk 21
70+
- uses: actions/checkout@v4
71+
- name: Build DAHDI and Asterisk
72+
run: |
73+
./phreaknet.sh make
74+
phreaknet install --fast --dahdi --devmode --sip --vanilla --user=asterisk
75+
fedora-42:
76+
runs-on: ubuntu-24.04
77+
name: Fedora 42
78+
container: fedora:42
79+
steps:
80+
- uses: actions/checkout@v4
81+
- name: Build DAHDI and Asterisk
82+
run: |
83+
./phreaknet.sh make
84+
phreaknet install --fast --sip --devmode
85+
rocky-9:
86+
runs-on: ubuntu-24.04
87+
name: Rocky Linux 9.3
88+
container: rockylinux:9.3
89+
steps:
90+
- uses: actions/checkout@v4
91+
- name: Build DAHDI and Asterisk
92+
run: |
93+
./phreaknet.sh make
94+
phreaknet install --fast --sip --devmode
95+
rocky-8:
96+
runs-on: ubuntu-24.04
97+
name: Rocky Linux 8.9
98+
container: rockylinux:8.9
99+
steps:
100+
- uses: actions/checkout@v4
101+
- name: Build DAHDI and Asterisk
102+
run: |
103+
./phreaknet.sh make
104+
phreaknet install --fast --sip --devmode
105+
opensuse:
106+
runs-on: ubuntu-24.04
107+
name: openSUSE Tumbleweed
108+
container: opensuse/tumbleweed
109+
steps:
110+
- uses: actions/checkout@v4
111+
- name: Build DAHDI and Asterisk
112+
run: |
113+
./phreaknet.sh make
114+
phreaknet install --fast --sip --devmode
115+
archlinux:
116+
runs-on: ubuntu-24.04
117+
name: Arch Linux
118+
container: archlinux:latest
119+
steps:
120+
- uses: actions/checkout@v4
121+
- name: Build DAHDI and Asterisk
68122
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
74123
./phreaknet.sh make
75-
phreaknet install -d --vanilla
124+
phreaknet install --fast --dahdi --drivers --sip --devmode
125+
# FreeBSD CI disabled since libuuid headers can't get installed in CI?
126+
# freebsd-14:
127+
# runs-on: ubuntu-24.04
128+
# name: FreeBSD
129+
# steps:
130+
# - uses: actions/checkout@v4
131+
# - name: Build Asterisk
132+
# uses: vmactions/freebsd-vm@v1
133+
# with:
134+
# usesh: true
135+
# run: |
136+
# ./phreaknet.sh make
137+
# 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)