Skip to content

Commit 185e8b2

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

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-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" "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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
TEST_PHP_ARGS="--show-diff -q" make test
9+
checkinstall \
10+
--pkgname="php8.4-colopl-bc" \
11+
--pkglicense="PHP-3.01" \
12+
--pkgversion="${VERSION}" \
13+
--pkggroup="php8.4" \
14+
--maintainer="[email protected]" \
15+
--requires="php8.4-common" \
16+
--stripso="yes" \
17+
--pakdir="/tmp/artifacts" \
18+
--nodoc
19+
cd -
215 KB
Binary file not shown.

ext/description-pak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Package created with checkinstall 1.6.3

0 commit comments

Comments
 (0)