Skip to content

Commit 13f0226

Browse files
committed
updated workflow actions to check compatibility with all current versions of Zabbix
1 parent cb498e8 commit 13f0226

File tree

4 files changed

+39
-38
lines changed

4 files changed

+39
-38
lines changed

.github/workflows/compatibility_50.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ env:
1717
jobs:
1818
compatibility:
1919
name: Compatibility test
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-20.04
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v3
2424
- name: Install packages
2525
run: |
2626
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
2727
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
28-
sudo apt update && sudo apt install -y git sudo gcc make automake pkg-config postgresql-13 libpostgresql-ocaml-dev libxml2-dev libpcre3-dev libevent-dev apache2 libapache2-mod-php php8.1-pgsql php8.1-bcmath php8.1-xml php8.1-gd php8.1-ldap php8.1-mbstring libzip-dev
28+
sudo add-apt-repository ppa:ondrej/php
29+
sudo apt update && sudo apt install -y git sudo gcc make automake pkg-config postgresql-14 libpostgresql-ocaml-dev libxml2-dev libpcre3-dev libevent-dev apache2 libzip-dev php7.4 libapache2-mod-php7.4 php7.4-common php7.4-fpm php7.4-gd php7.4-mbstring php7.4-xml php7.4-zip php7.4-ldap
2930
- name: Build from sources
3031
run: |
3132
WORKDIR=$(pwd)
@@ -41,23 +42,23 @@ jobs:
4142
sudo rm /var/www/html/index.html
4243
sudo cp -a . /var/www/html/
4344
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/zabbix.conf.php /var/www/html/conf/
44-
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/pg_hba.conf /etc/postgresql/13/main/pg_hba.conf
45+
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/pg_hba.conf /etc/postgresql/14/main/pg_hba.conf
4546
sudo chown -R www-data:www-data /var/www/html/
46-
sudo sed -i "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php/8.1/apache2/php.ini
47-
sudo sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php/8.1/apache2/php.ini
48-
sudo sed -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php/8.1/apache2/php.ini
47+
sudo sed -i "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php/7.4/fpm/php.ini
48+
sudo sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php/7.4/fpm/php.ini
49+
sudo sed -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php/7.4/fpm/php.ini
4950
sudo locale-gen en_US.UTF-8
5051
sudo update-locale
5152
- name: Prepare environment
5253
run: |
5354
sudo addgroup --system --quiet zabbix
5455
sudo adduser --quiet --system --disabled-login --ingroup zabbix --home /var/lib/zabbix --no-create-home zabbix
55-
sudo mkdir -p /var/run/postgresql/13-main.pg_stat_tmp
56+
sudo mkdir -p /var/run/postgresql/14-main.pg_stat_tmp
5657
sudo chown -R postgres. /var/run/postgresql/
57-
sudo touch /var/run/postgresql/13-main.pg_stat_tmp/global.tmp
58-
sudo chmod 0777 /var/run/postgresql/13-main.pg_stat_tmp/global.tmp
59-
sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/13/main/postgresql.conf
60-
(sudo -u postgres /usr/lib/postgresql/13/bin/postgres -D /var/lib/postgresql/13/main -c config_file=/etc/postgresql/13/main/postgresql.conf)&
58+
sudo touch /var/run/postgresql/14-main.pg_stat_tmp/global.tmp
59+
sudo chmod 0777 /var/run/postgresql/14-main.pg_stat_tmp/global.tmp
60+
sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/14/main/postgresql.conf
61+
(sudo -u postgres /usr/lib/postgresql/14/bin/postgres -D /var/lib/postgresql/14/main -c config_file=/etc/postgresql/14/main/postgresql.conf)&
6162
sleep 5
6263
cd /tmp/zabbix-branch/database/postgresql
6364
sudo -u postgres createuser zabbix

.github/workflows/compatibility_60.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ env:
1717
jobs:
1818
compatibility:
1919
name: Compatibility test
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-22.04
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v3
2424
- name: Install packages
2525
run: |
2626
sudo apt update && sudo apt install -y git sudo gcc make automake pkg-config postgresql-14 libpostgresql-ocaml-dev libxml2-dev libpcre3-dev libevent-dev apache2 libapache2-mod-php php8.1-pgsql php8.1-bcmath php8.1-xml php8.1-gd php8.1-ldap php8.1-mbstring libzip-dev

.github/workflows/compatibility_70.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ env:
1717
jobs:
1818
compatibility:
1919
name: Compatibility test
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-24.04
2121

2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Install packages
2525
run: |
26-
sudo apt update && sudo apt install -y git sudo gcc make automake pkg-config postgresql-14 libpostgresql-ocaml-dev libxml2-dev libpcre3-dev libevent-dev apache2 libapache2-mod-php php8.1-pgsql php8.1-bcmath php8.1-xml php8.1-gd php8.1-ldap php8.1-mbstring libzip-dev zabbix-sender
26+
sudo apt update && sudo apt install -y git sudo gcc make automake pkg-config postgresql-16 libpostgresql-ocaml-dev libxml2-dev libpcre3-dev libevent-dev apache2 libapache2-mod-php php8.3-pgsql php8.3-bcmath php8.3-xml php8.3-gd php8.3-ldap php8.3-mbstring libzip-dev
2727
- name: Build from sources
2828
run: |
2929
WORKDIR=$(pwd)
3030
cd /tmp/
31+
sudo addgroup --system --quiet zabbix
32+
sudo adduser --quiet --system --disabled-login --ingroup zabbix --home /var/lib/zabbix --no-create-home zabbix
3133
git -c advice.detachedHead=false clone https://git.zabbix.com/scm/zbx/zabbix.git --branch ${{ env.ZABBIX_BRANCH }} --depth 1 --single-branch /tmp/zabbix-branch
3234
cd /tmp/zabbix-branch
3335
./bootstrap.sh
@@ -59,21 +61,19 @@ jobs:
5961
sudo rm /var/www/html/index.html
6062
sudo cp -a . /var/www/html/
6163
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/zabbix.conf.php /var/www/html/conf/
62-
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/pg_hba.conf /etc/postgresql/14/main/pg_hba.conf
64+
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/pg_hba.conf /etc/postgresql/16/main/pg_hba.conf
6365
sudo chown -R www-data:www-data /var/www/html/
64-
sudo sed -i "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php/8.1/apache2/php.ini
65-
sudo sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php/8.1/apache2/php.ini
66-
sudo sed -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php/8.1/apache2/php.ini
66+
sudo sed -i "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php/8.3/apache2/php.ini
67+
sudo sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php/8.3/apache2/php.ini
68+
sudo sed -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php/8.3/apache2/php.ini
6769
sudo locale-gen en_US.UTF-8
6870
sudo update-locale
6971
- name: Prepare environment
7072
run: |
71-
sudo addgroup --system --quiet zabbix
72-
sudo adduser --quiet --system --disabled-login --ingroup zabbix --home /var/lib/zabbix --no-create-home zabbix
73-
sudo mkdir -p /var/run/postgresql/14-main.pg_stat_tmp
74-
sudo touch /var/run/postgresql/14-main.pg_stat_tmp/global.tmp
75-
sudo chmod 0777 /var/run/postgresql/14-main.pg_stat_tmp/global.tmp
76-
(sudo -u postgres /usr/lib/postgresql/14/bin/postgres -D /var/lib/postgresql/14/main -c config_file=/etc/postgresql/14/main/postgresql.conf)&
73+
sudo mkdir -p /var/run/postgresql/16-main.pg_stat_tmp
74+
sudo touch /var/run/postgresql/16-main.pg_stat_tmp/global.tmp
75+
sudo chmod 0777 /var/run/postgresql/16-main.pg_stat_tmp/global.tmp
76+
(sudo -u postgres /usr/lib/postgresql/16/bin/postgres -D /var/lib/postgresql/16/main -c config_file=/etc/postgresql/16/main/postgresql.conf)&
7777
sleep 5
7878
cd /tmp/zabbix-branch/database/postgresql
7979
sudo -u postgres createuser zabbix

.github/workflows/compatibility_72.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ env:
1717
jobs:
1818
compatibility:
1919
name: Compatibility test
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-24.04
2121

2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Install packages
2525
run: |
26-
sudo apt update && sudo apt install -y git sudo gcc make automake pkg-config postgresql-14 libpostgresql-ocaml-dev libxml2-dev libpcre3-dev libevent-dev apache2 libapache2-mod-php php8.1-pgsql php8.1-bcmath php8.1-xml php8.1-gd php8.1-ldap php8.1-mbstring libzip-dev zabbix-sender
26+
sudo apt update && sudo apt install -y git sudo gcc make automake pkg-config postgresql-16 libpostgresql-ocaml-dev libxml2-dev libpcre3-dev libevent-dev apache2 libapache2-mod-php php8.3-pgsql php8.3-bcmath php8.3-xml php8.3-gd php8.3-ldap php8.3-mbstring libzip-dev
2727
- name: Build from sources
2828
run: |
2929
WORKDIR=$(pwd)
3030
cd /tmp/
31+
sudo addgroup --system --quiet zabbix
32+
sudo adduser --quiet --system --disabled-login --ingroup zabbix --home /var/lib/zabbix --no-create-home zabbix
3133
git -c advice.detachedHead=false clone https://git.zabbix.com/scm/zbx/zabbix.git --branch ${{ env.ZABBIX_BRANCH }} --depth 1 --single-branch /tmp/zabbix-branch
3234
cd /tmp/zabbix-branch
3335
./bootstrap.sh
@@ -59,21 +61,19 @@ jobs:
5961
sudo rm /var/www/html/index.html
6062
sudo cp -a . /var/www/html/
6163
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/zabbix.conf.php /var/www/html/conf/
62-
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/pg_hba.conf /etc/postgresql/14/main/pg_hba.conf
64+
sudo cp $WORKDIR/${{ env.CONFIG_PATH }}/pg_hba.conf /etc/postgresql/16/main/pg_hba.conf
6365
sudo chown -R www-data:www-data /var/www/html/
64-
sudo sed -i "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php/8.1/apache2/php.ini
65-
sudo sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php/8.1/apache2/php.ini
66-
sudo sed -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php/8.1/apache2/php.ini
66+
sudo sed -i "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php/8.3/apache2/php.ini
67+
sudo sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php/8.3/apache2/php.ini
68+
sudo sed -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php/8.3/apache2/php.ini
6769
sudo locale-gen en_US.UTF-8
6870
sudo update-locale
6971
- name: Prepare environment
7072
run: |
71-
sudo addgroup --system --quiet zabbix
72-
sudo adduser --quiet --system --disabled-login --ingroup zabbix --home /var/lib/zabbix --no-create-home zabbix
73-
sudo mkdir -p /var/run/postgresql/14-main.pg_stat_tmp
74-
sudo touch /var/run/postgresql/14-main.pg_stat_tmp/global.tmp
75-
sudo chmod 0777 /var/run/postgresql/14-main.pg_stat_tmp/global.tmp
76-
(sudo -u postgres /usr/lib/postgresql/14/bin/postgres -D /var/lib/postgresql/14/main -c config_file=/etc/postgresql/14/main/postgresql.conf)&
73+
sudo mkdir -p /var/run/postgresql/16-main.pg_stat_tmp
74+
sudo touch /var/run/postgresql/16-main.pg_stat_tmp/global.tmp
75+
sudo chmod 0777 /var/run/postgresql/16-main.pg_stat_tmp/global.tmp
76+
(sudo -u postgres /usr/lib/postgresql/16/bin/postgres -D /var/lib/postgresql/16/main -c config_file=/etc/postgresql/16/main/postgresql.conf)&
7777
sleep 5
7878
cd /tmp/zabbix-branch/database/postgresql
7979
sudo -u postgres createuser zabbix

0 commit comments

Comments
 (0)