forked from amphp/ext-uv
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (67 loc) · 2.68 KB
/
CentOS-stream-release.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
62
63
64
65
66
67
68
69
70
name: CentOS Stream Release
on:
release:
types: [published, edited]
jobs:
stream_8:
name: PHP
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2']
runs-on: ubuntu-latest
container: centos:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install PHP and Build tools
run: |
sed -i "s/mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-*
sed -i "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
/usr/bin/crb enable
dnf install centos-release-stream -y
dnf swap centos-{linux,stream}-repos -y
dnf distro-sync -y
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
dnf update -y
dnf install yum-utils -y
dnf module list php
dnf module reset php
dnf module install -y php:remi-${{ matrix.php-versions }}
dnf install https://rpmfind.net/linux/centos/8-stream/PowerTools/x86_64/os/Packages/libuv-devel-1.41.1-1.el8_4.x86_64.rpm -y
dnf install sudo git php-devel libtool php-pear -y
- name: Build ext-uv
run: |
phpize
./configure --with-uv=$(readlink -f `pwd`/libuv)
make
make install
- name: Setup rpm
id: setup-rpm
run: |
mkdir -p .rpmpkg/"$(php-config --extension-dir)"
cp -f modules/uv.so .rpmpkg/"$(php-config --extension-dir)"
chmod +x ./cmd/os.sh
echo "OS_CODENAME=$(./cmd/os.sh)" >> $GITHUB_OUTPUT
- name: Create rpm package
id: build-rpm-action
uses: jiro4989/build-rpm-action@v2
with:
summary: 'libuv PHP wrapper.'
package: ext_uv-php${{ matrix.php-versions }}_${{ steps.setup-rpm.outputs.OS_CODENAME }}
package_root: .rpmpkg
maintainer: l. stubbs [email protected]
version: ${{ github.ref }} # refs/tags/v*.*.*
arch: 'x86_64'
desc: 'uv provides access to underlying libuv functions.'
- name: Upload the rpm binary artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.rpm
asset_name: ext_uv_php${{ matrix.php-versions }}-${{ github.event.release.tag_name }}_stream8
tag: ${{ github.ref }}
overwrite: true
file_glob: true
body: ext_uv_php${{ matrix.php-versions }}-${{ github.event.release.tag_name}} for ${{ steps.setup-rpm.outputs.OS_CODENAME }}