Skip to content

Commit ba3458b

Browse files
committed
build: sury php84
1 parent 120a054 commit ba3458b

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,32 @@ on:
33
push:
44
tags:
55
- '[0-9]+.[0-9]+.[0-9]+'
6+
workflow_dispatch:
67
jobs:
78
Ubuntu-2204:
89
strategy:
910
matrix:
1011
runs-on: ['ubuntu-22.04', 'ubuntu-22.04-arm']
12+
build: ['ubuntu2204', 'ubuntu2204_sury84']
1113
runs-on: ${{ matrix.runs-on }}
1214
timeout-minutes: 60
1315
steps:
1416
- name: Checkout
1517
uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 1
1620
- name: Inspections
1721
id: inspections
1822
run: echo "arch=$(uname -m)" >> $GITHUB_OUTPUT
1923
- name: Build container
2024
run: |
21-
docker build -t"builder" -f"./build/ubuntu2204/Dockerfile" .
25+
docker build -t"builder" -f"./build/${{ matrix.build }}/Dockerfile" .
2226
- name: Build extension with container
2327
run: |
2428
mkdir "artifacts"
2529
docker run --env VERSION="${{ github.ref_name }}" --rm -v"$(pwd)/artifacts:/tmp/artifacts" -i "builder"
2630
- name: Upload .deb packages
2731
uses: actions/upload-artifact@v4
2832
with:
29-
name: ubuntu2204_${{ steps.inspections.outputs.arch }}
33+
name: ${{ matrix.build }}_${{ steps.inspections.outputs.arch }}
3034
path: artifacts/

build/ubuntu2204_sury84/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ARG PLATFORM=${BUILDPLATFORM:-linux/amd64}
2+
3+
FROM --platform=${PLATFORM} ubuntu:22.04
4+
5+
ENV DEBIAN_FRONTEND="noninteractive"
6+
7+
RUN apt-get update && \
8+
apt-get install -y \
9+
"software-properties-common" && \
10+
add-apt-repository ppa:ondrej/php -y && \
11+
apt-get update && \
12+
apt-get install -y \
13+
"php8.4-dev" "checkinstall"
14+
15+
COPY ./ext /tmp/ext
16+
17+
COPY ./build/ubuntu2204_sury84/build.sh /usr/bin/build
18+
19+
ENTRYPOINT ["/usr/bin/build"]

build/ubuntu2204_sury84/build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh -eux
2+
3+
cd "/tmp/ext"
4+
echo "COLOPL PHP backwards compatibility extension for sury PHP 8.4" > "description-pak"
5+
phpize8.4
6+
./configure --with-php-config="$(which "php-config8.4")"
7+
make -j"$(nproc)"
8+
checkinstall \
9+
--pkgname="php8.4-colopl-bc" \
10+
--pkglicense="PHP-3.01" \
11+
--pkgversion="${VERSION}" \
12+
--pkggroup="php8.4" \
13+
--maintainer="[email protected]" \
14+
--requires="php8.4" \
15+
--stripso="yes" \
16+
--pakdir="/tmp/artifacts" \
17+
--nodoc
18+
cd -

0 commit comments

Comments
 (0)