Skip to content

Commit 0a370a2

Browse files
committed
Build testrunner images for php v8.4 and 8.5-rc, too
1 parent 7d408dd commit 0a370a2

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.ci/docker-images/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ ARG PHPVERSION=8.3
22
FROM php:${PHPVERSION}-cli
33
LABEL org.opencontainers.image.source="https://github.com/roundcube/roundcubemail"
44

5+
# To use it below we must repeat the ARG declaration
6+
ARG PHPVERSION
7+
58
ENV DEBIAN_FRONTEND=noninteractive
69

710
RUN apt-get update \
@@ -33,7 +36,9 @@ RUN sed -i 's/^# en_US.UTF-8 /en_US.UTF-8 /' /etc/locale.gen && locale-gen
3336

3437
# TODO: Do we need the multiarch-args? What for?
3538
#RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
36-
RUN docker-php-ext-configure gd --with-jpeg --with-freetype \
39+
# For PHP >= v8.4 pspell was moved to PECL, so we have to fetch and unpack it first. (We don't use `pecl install` just because it makes the rest of the script simpler.)
40+
RUN if php -r 'exit(version_compare(getenv("PHPVERSION"), "8.4", ">=") ? 0 : 1);'; then pecl bundle -d /usr/src/php/ext pspell; fi \
41+
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
3742
#&& docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch" \
3843
&& docker-php-ext-configure ldap \
3944
&& docker-php-ext-install \

.ci/docker-images/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22

33
case "$1" in
4-
8.1|8.3)
5-
phpversion="$1"
6-
;;
7-
*)
4+
''|-*)
85
echo "Error: first and only argument must be the wanted PHP version."
9-
echo "Usage: $(basename $0) 8.1|8.3"
6+
echo "E.g.: $(basename $0) 8.4"
107
exit 1
118
;;
9+
*)
10+
phpversion="$1"
11+
;;
1212
esac
1313

1414
exec docker build --build-arg "PHPVERSION=$phpversion" -f "$(realpath $(dirname $0)/Dockerfile)" -t "ghcr.io/pabzm/roundcubemail-testrunner:php$phpversion" "$(realpath $(dirname $0)/../../..)"

.github/workflows/docker_image.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
# Set up a matrix so we can add more versions to build with in the future.
1717
matrix:
18-
php: ["8.3"]
18+
php: ["8.3", "8.4", "8.5-rc"]
1919

2020
name: build and push with PHP ${{ matrix.php }}
2121
runs-on: ubuntu-latest
@@ -48,4 +48,3 @@ jobs:
4848
#platforms: linux/amd64,linux/arm64
4949
build-args: PHPVERSION=${{ matrix.php }}
5050
tags: "ghcr.io/roundcube/roundcubemail-testrunner:php${{ matrix.php }}"
51-

0 commit comments

Comments
 (0)