-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (54 loc) · 1.95 KB
/
gmssl-centos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build GmSSL for PHP on CentOS
on:
# push:
# branches:
# - main
workflow_dispatch:
jobs:
build-linux:
name: Build on CentOS (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1.0]
steps:
- name: Checkout repository
uses: actions/checkout@v3
# - name: Install dependencies for CentOS
# run: |
# sudo yum -y install gcc gcc-c++ cmake make wget php-devel libssl-dev
# sudo yum -y groupinstall "Development Tools"
- name: Install dependencies for Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ cmake make wget php-dev libssl-dev
sudo apt-get install -y build-essential
- name: Download and compile PHP ${{ matrix.php }}
run: |
wget https://www.php.net/distributions/php-${{ matrix.php }}.tar.gz
tar -xf php-${{ matrix.php }}.tar.gz
cd php-${{ matrix.php }}
./configure --prefix=$HOME/php-${{ matrix.php }} --disable-all
make -j$(nproc)
make install
- name: Download and compile GmSSL (static library)
run: |
git clone https://github.com/guanzhi/GmSSL.git
cd GmSSL
cmake -DBUILD_SHARED_LIBS=OFF .
make -j$(nproc)
# ls -lh bin/libgmssl.a
ls -lh # Add debugging output to check if libgmssl.a exists
- name: Build GmSSL PHP extension for PHP ${{ matrix.php }}
run: |
cd php-${{ matrix.php }}
./bin/phpize
./configure --with-php-config=$HOME/php-${{ matrix.php }}/bin/php-config --with-gmssl
make -j$(nproc)
# ls -lh modules/gmssl.so
ls -lh # Add debugging output to check if libgmssl.a exists
- name: Upload Linux Artifacts
uses: actions/upload-artifact@v3
with:
name: gmssl-linux-php-${{ matrix.php }}
path: php-${{ matrix.php }}/modules/gmssl.so