From 1b1cce8c666fc463a7c60efa52e5ff77e7109147 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 18 Jun 2026 04:28:47 +0530 Subject: [PATCH] Add initial support for Ubuntu 26.04 [skip ci] --- README.md | 3 +++ src/scripts/tools/ppa.sh | 27 ++++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c3b6126d..27b9e140 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,10 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t | Virtual environment | Arch | YAML workflow label | Pre-installed PHP | |---------------------|---------|------------------------------------|-------------------| +| Ubuntu 26.04 | x86_64 | `ubuntu-26.04` | `PHP 8.5` | | Ubuntu 24.04 | x86_64 | `ubuntu-latest` or `ubuntu-24.04` | `PHP 8.3` | | Ubuntu 22.04 | x86_64 | `ubuntu-22.04` | `PHP 8.1` | +| Ubuntu 26.04 | aarch64 | `ubuntu-26.04-arm` | `PHP 8.5` | | Ubuntu 24.04 | aarch64 | `ubuntu-24.04-arm` | `PHP 8.3` | | Ubuntu 22.04 | aarch64 | `ubuntu-22.04-arm` | `PHP 8.1` | | Windows Server 2025 | x64 | `windows-2025` | `PHP 8.5` | @@ -86,6 +88,7 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t | Host OS/Virtual environment | YAML workflow label | |----------------------------------|----------------------------| +| Ubuntu 26.04 | `self-hosted` or `Linux` | | Ubuntu 24.04 | `self-hosted` or `Linux` | | Ubuntu 22.04 | `self-hosted` or `Linux` | | Debian 13 | `self-hosted` or `Linux` | diff --git a/src/scripts/tools/ppa.sh b/src/scripts/tools/ppa.sh index 2fab7888..15813ede 100644 --- a/src/scripts/tools/ppa.sh +++ b/src/scripts/tools/ppa.sh @@ -343,23 +343,32 @@ add_ppa_sp_mirror() { add_list sp/"$ppa_name" "$ppa_sp/$ppa/ubuntu" "$ppa_sp/$ppa/ubuntu/key.gpg" } +add_sury_list() { + ppa=${1:-ondrej/php} + [ "${debug:?}" = "debug" ] && add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg "$VERSION_CODENAME" "main/debug" + add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg +} + # Function to add a PPA. add_ppa() { set_base_version ppa=${1:-ondrej/php} if [[ "$ID" = "ubuntu" || "$ID_LIKE" =~ ubuntu ]] && [[ "$ppa" =~ "ondrej/" ]]; then - if is_ubuntu_ppa_up "$ppa" ; then - [ "${runner:?}" = "self-hosted" ] && find "$list_dir" -type f -name 'sp*' -exec grep -qF "${sp/https:\/\/}" {} \; -delete - [ "${debug:?}" = "debug" ] && add_list "$ppa" "$lpc_ppa/$ppa/ubuntu" "$lpc_ppa/$ppa/ubuntu" "$VERSION_CODENAME" "main/debug" - add_list "$ppa" - elif [ "$ppa" = "ondrej/php" ]; then - add_ppa_sp_mirror "$ppa" + if [ "$VERSION_ID" = "26.04" ]; then + add_sury_list else - add_log "${cross:?}" "$ppa" "PPA $ppa is not available" + if is_ubuntu_ppa_up "$ppa" ; then + [ "${runner:?}" = "self-hosted" ] && find "$list_dir" -type f -name 'sp*' -exec grep -qF "${sp/https:\/\/}" {} \; -delete + [ "${debug:?}" = "debug" ] && add_list "$ppa" "$lpc_ppa/$ppa/ubuntu" "$lpc_ppa/$ppa/ubuntu" "$VERSION_CODENAME" "main/debug" + add_list "$ppa" + elif [ "$ppa" = "ondrej/php" ]; then + add_ppa_sp_mirror "$ppa" + else + add_log "${cross:?}" "$ppa" "PPA $ppa is not available" + fi fi elif [[ "$ID" = "debian" || "$ID_LIKE" =~ debian ]] && [[ "$ppa" =~ "ondrej/" ]]; then - [ "${debug:?}" = "debug" ] && add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg "$VERSION_CODENAME" "main/debug" - add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg + add_sury_list else add_list "$ppa" fi