Skip to content

Commit

Permalink
Merge pull request #298 from nanasess/remove-apt-fast
Browse files Browse the repository at this point in the history
Remove apt fast
  • Loading branch information
nanasess authored Oct 16, 2024
2 parents e213f9e + c18bf2c commit 50c1c73
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019]
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019]
php: ['5.4', '5.5', '5.6', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '7.2.11', '7.2.12', '8.1.9', '8.2', '8.3']
exclude:
- os: windows-2019
Expand Down Expand Up @@ -51,6 +51,14 @@ jobs:
php: 7.2.11
- os: ubuntu-22.04
php: 7.2.12
- os: ubuntu-24.04
php: 5.4
- os: ubuntu-24.04
php: 5.5
- os: ubuntu-24.04
php: 7.2.11
- os: ubuntu-24.04
php: 7.2.12

steps:
- name: Checkout
Expand Down
6 changes: 6 additions & 0 deletions lib/apt-install-php-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ fi

sudo apt-get update

if ! command -v apt-fast >/dev/null; then
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
fi

if [[ $version = '5.6' ]] \
|| [[ `echo "$version >= 8.2" | bc` == 1 ]] \
|| [[ $release = 'noble' && `echo "$version < 8.2" | bc` == 1 ]] \
|| [[ $release = 'jammy' && `echo "$version < 8.1" | bc` == 1 ]] \
|| [[ $release = 'focal' && `echo "$version < 7.4 || $version >= 8.0" | bc` == 1 ]] \
|| [[ $release = 'bionic' && `echo "$version < 7.4 || $version >= 8.0" | bc` == 1 ]]
Expand Down
15 changes: 12 additions & 3 deletions lib/phpenv-install-php-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,29 @@ export PATH="$HOME/.phpenv/bin:$PATH"
eval "$(phpenv init -)"
git clone https://github.com/php-build/php-build $(phpenv root)/plugins/php-build

if ! command -v apt-fast >/dev/null; then
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
fi

sudo apt-fast update

# sudo apt-get purge 'php*'
sudo apt-fast install -y libcurl4-nss-dev libjpeg-dev re2c libxml2-dev \
sudo apt-fast install -y libjpeg-dev re2c libxml2-dev \
libtidy-dev libxslt1-dev libmcrypt-dev libreadline-dev libfreetype6-dev \
libonig-dev zlib1g-dev

if [ $release == 'noble' ]
then
sudo apt-fast install -y libcurl4-openssl-dev libsqlite3-dev libzip-dev
fi
if [ $release == 'bionic' ]
then
sudo apt-fast install -y mysql-client
sudo apt-fast install -y mysql-client libcurl4-nss-dev
fi
if [ $release == 'focal' ] || [ $release == 'jammy' ]
then
sudo apt-fast install -y libzip-dev libmariadb-dev libfreetype-dev
sudo apt-fast install -y libzip-dev libmariadb-dev libfreetype-dev libcurl4-nss-dev
fi

sudo ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl
Expand Down

0 comments on commit 50c1c73

Please sign in to comment.