Sunset support for Ubuntu 16.04

This commit is contained in:
Shivam Mathur 2021-08-02 23:10:43 +05:30
parent ca910e5511
commit 947009a717
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
9 changed files with 10 additions and 28 deletions

View File

@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04, windows-2019, macos-10.15]
operating-system: [ubuntu-20.04, ubuntu-18.04, windows-2019, macos-10.15]
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
steps:
- name: Setup PHP
@ -59,7 +59,7 @@ jobs:
run: |
git config --local user.email "${{ secrets.email }}"
git config --local user.name "${{ github.repository_owner }}"
for os in ubuntu-20.04 ubuntu-18.04 ubuntu-16.04 windows-2019 macos-10.15 macos-11.0; do
for os in ubuntu-20.04 ubuntu-18.04 windows-2019 macos-10.15 macos-11.0; do
echo "These are extensions which are loaded by default on the following PHP versions. More extensions which are available as packages and available on pecl are supported by setup-php. Refer to [php extension support](https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support) for more details." > Php-extensions-loaded-on-"$os".md
for version in 5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1; do
if [ "$os" = "macos-11.0" ]; then

View File

@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04, windows-latest, macos-latest]
operating-system: [ubuntu-20.04, ubuntu-18.04, windows-latest, macos-latest]
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
env:
extensions: xml, opcache, xdebug, pcov

View File

@ -67,7 +67,6 @@ Both `GitHub-hosted` and `self-hosted` runners are suppported by `setup-php` on
|Virtual environment|YAML workflow label|Pre-installed PHP|
|--- |--- |--- |
|Ubuntu 16.04 [(deprecated)](https://setup-php.com/i/452)|`ubuntu-16.04`|`PHP 5.6` to `PHP 8.0`|
|Ubuntu 18.04|`ubuntu-18.04`|`PHP 7.1` to `PHP 8.0`|
|Ubuntu 20.04|`ubuntu-latest` or `ubuntu-20.04`|`PHP 7.4` to `PHP 8.0`|
|Windows Server 2019|`windows-latest` or `windows-2019`|`PHP 8.0`|
@ -663,9 +662,6 @@ act -P ubuntu-20.04=shivammathur/node:2004
# For runs-on: ubuntu-18.04
act -P ubuntu-18.04=shivammathur/node:1804
# For runs-on: ubuntu-16.04 (deprecated)
act -P ubuntu-16.04=shivammathur/node:1604
```
### JIT Configuration

3
dist/index.js vendored
View File

@ -440,7 +440,8 @@ exports.getScript = getScript;
async function run() {
try {
if ((await utils.readEnv('ImageOS')) == 'ubuntu16') {
core.warning('setup-php will stop working on Ubuntu 16.04 from August 1, 2021. Please upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452');
core.setFailed('setup-php is not supported on Ubuntu 16.04. Please upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452');
return;
}
const version = await utils.parseVersion(await utils.getInput('php-version', true));
if (version) {

View File

@ -52,9 +52,10 @@ export async function getScript(
export async function run(): Promise<void> {
try {
if ((await utils.readEnv('ImageOS')) == 'ubuntu16') {
core.warning(
'setup-php will stop working on Ubuntu 16.04 from August 1, 2021. Please upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452'
core.setFailed(
'setup-php is not supported on Ubuntu 16.04. Please upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452'
);
return;
}
const version: string = await utils.parseVersion(
await utils.getInput('php-version', true)

View File

@ -83,10 +83,6 @@ run_script() {
# Function to install required packages on self-hosted runners.
self_hosted_setup() {
if [ "$runner" = "self-hosted" ]; then
if [ "$DISTRIB_RELEASE" = "16.04" ] && [ "$CONTAINER" != "shivammathur/node" ]; then
add_log "$cross" "Ubuntu" "Ubuntu 16.04 (Xenial Xerus) is no longer supported on self-hosted runner"
exit 1
fi
if [[ "${version:?}" =~ $old_versions ]]; then
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
exit 1

View File

@ -39,7 +39,6 @@ add_cubrid_helper() {
status='Installed and enabled'
set_cubrid_repo
set_cubrid_branch
[ "$DISTRIB_RELEASE" = "16.04" ] && setup_compiler
patch_phpize
read -r "${ext}_PREFIX_CONFIGURE_OPTS" <<< "CFLAGS=-Wno-implicit-function-declaration"
read -r "${ext}_CONFIGURE_OPTS" <<< "--with-php-config=$(command -v php-config)"

View File

@ -21,17 +21,10 @@ cleanup_lists() {
# Function to add ppa:ondrej/php.
add_ppa() {
ppa=${1:-ondrej/php}
if [ "$DISTRIB_RELEASE" = "16.04" ] && [ "$ppa" = "ondrej/php" ]; then
LC_ALL=C.UTF-8 sudo apt-add-repository --remove ppa:"$ppa" -y || true
LC_ALL=C.UTF-8 sudo apt-add-repository http://setup-php.com/ondrej/php/ubuntu -y
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 4f4ea0aae5267a6c
elif ! apt-cache policy | grep -q "$ppa"; then
if ! apt-cache policy | grep -q "$ppa"; then
cleanup_lists "$(dirname "$ppa")"
LC_ALL=C.UTF-8 sudo apt-add-repository ppa:"$ppa" -y
fi
if [ "$DISTRIB_RELEASE" = "16.04" ]; then
sudo "$debconf_fix" apt-get update
fi
}
# Function to update the package lists.

View File

@ -38,11 +38,7 @@ add_grpc_php_plugin_compile() {
(
cd "/tmp/grpc-${grpc_tag:1}" || exit
add_bazel
if [ "$DISTRIB_RELEASE" = "16.04" ]; then
CC="$(command -v gcc)" CXX="$(command -v g++)" ./tools/bazel build src/compiler:grpc_php_plugin
else
./tools/bazel build src/compiler:grpc_php_plugin
fi
sudo mv ./bazel-bin/src/compiler/grpc_php_plugin /usr/local/bin/grpc_php_plugin
sudo chmod a+x /usr/local/bin/grpc_php_plugin
license_path="/tmp/grpc-${grpc_tag:1}/LICENSE"