Skip to content

Commit 3086b12

Browse files
zeriyoshiremicollet
authored andcommitted
Add CI with GItHub Actions
1 parent 7c7a825 commit 3086b12

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

ci.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
jobs:
8+
Linux_EL:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
distro: ['rockylinux']
13+
el: [8, 9]
14+
php: ['8.0', '8.1', '8.2', '8.3']
15+
container:
16+
image: ${{ matrix.distro }}:${{ matrix.el }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Install PHP
21+
run: |
22+
dnf install -y "https://rpms.remirepo.net/enterprise/remi-release-${{ matrix.el }}.rpm"
23+
dnf config-manager --disable -y "epel" "remi-modular" "remi-safe"
24+
dnf --enablerepo=remi-modular module enable -y "php:remi-${{ matrix.php }}"
25+
dnf --enablerepo=epel,remi,remi-modular install -y "php" "php-devel"
26+
- name: Show PHP version
27+
run: php -v
28+
- name: Manually install libxcrypt 4.4.x (EL8 and earlier)
29+
if: ${{ matrix.el < 9 }}
30+
run: |
31+
dnf install -y "python3-pip" "perl-open" "git"
32+
pip3 install "passlib"
33+
git clone --depth=1 --branch="v4.4.36" "https://github.com/besser82/libxcrypt.git" "libxcrypt"
34+
cd "libxcrypt"
35+
./autogen.sh
36+
./configure --with-pkgconfigdir="/usr/lib64/pkgconfig" --libdir="/usr/lib64"
37+
make -j"$(nproc)"
38+
make install
39+
- name: Make php-xpass
40+
run: |
41+
phpize
42+
./configure
43+
make -j"$(nproc)"
44+
- name: Test php-xpass
45+
env:
46+
TEST_PHP_ARGS: '-q --show-diff'
47+
run: |
48+
make test
49+
Linux_Fedora:
50+
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
fedora: [39, 40, 41]
54+
php: ['8.0', '8.1', '8.2', '8.3']
55+
container:
56+
image: fedora:${{ matrix.fedora }}
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
- name: Install PHP
61+
run: |
62+
dnf install -y "https://rpms.remirepo.net/fedora/remi-release-${{ matrix.fedora }}.rpm"
63+
dnf --enablerepo=remi-modular module enable -y "php:remi-${{ matrix.php }}"
64+
dnf --enablerepo=remi,remi-modular install -y "php" "php-devel"
65+
- name: Show PHP version
66+
run: php -v
67+
- name: Make php-xpass
68+
run: |
69+
phpize
70+
./configure
71+
make -j"$(nproc)"
72+
- name: Test php-xpass
73+
env:
74+
TEST_PHP_ARGS: '-q --show-diff'
75+
run: |
76+
make test
77+
Linux_Debian:
78+
runs-on: ubuntu-latest
79+
strategy:
80+
matrix:
81+
php: ['8.0', '8.1', '8.2', '8.3']
82+
ts: ['cli', 'zts']
83+
container:
84+
image: php:${{ matrix.php }}-${{ matrix.ts }}
85+
steps:
86+
- name: Install build dependencies
87+
run: |
88+
apt-get update
89+
apt-get install -y "automake" "libtool" "libcrypt-dev"
90+
- name: Checkout
91+
uses: actions/checkout@v4
92+
- name: Make xpass
93+
run: |
94+
phpize
95+
./configure
96+
make -j"$(nproc)"
97+
- name: Test xpass
98+
env:
99+
TEST_PHP_ARGS: '-q --show-diff'
100+
run: make test

0 commit comments

Comments
 (0)