From 13c76ae5d2c200cd4947a85435852e0f49355488 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 22 Jun 2020 09:30:37 +0530 Subject: [PATCH] Improve setup --- .github/workflows/test.yml | 6 +++++- install.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3b2a5d..32b8fbc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,6 @@ name: Test on: + repository_dispatch: push: branches: - master @@ -22,6 +23,7 @@ jobs: - name: Setup PHP run: | + zstd --version version=${{ matrix.php-versions }} bash install.sh ${version/./} - name: Testing PHP version @@ -37,8 +39,10 @@ jobs: version=${{ matrix.php-versions }} for bin in /tmp/php"${version/./}"/ext/*.so; do extension=$(basename "$bin" | cut -d'.' -f 1) - php -r "if(! extension_loaded('$extension')) {throw new Exception('$extension not found');}" + php -r "if(! extension_loaded('$extension')) {throw new Exception('$extension not found');}" & + to_wait+=( $! ) done + wait "${to_wait[@]}" php -r "if(! extension_loaded('Zend OPcache')) {throw new Exception('Zend OPcache not found');}" - name: Testing PECL version run: pecl -V diff --git a/install.sh b/install.sh index 09a0547..ac29dd3 100644 --- a/install.sh +++ b/install.sh @@ -17,8 +17,8 @@ switch_version() { # Function to setup PHP setup_php() { - curl -o "$tmp_path".tar.xz -sSL "$github_repo"/releases/latest/download/"$php_version".tar.xz - sudo tar xf "$tmp_path".tar.xz -C /tmp + curl -o "$tmp_path".tar.zst -sSL "$github_repo"/releases/latest/download/"$php_version".tar.zst + zstdcat "$tmp_path".tar.zst --no-progress - | tar -xf - -C /tmp sudo installer -pkg "$tmp_path"/"$php_version".mpkg -target / sudo cp -a "$tmp_path"/lib/* /opt/local/lib sudo cp "$php_etc_dir"/php.ini-development "$php_etc_dir"/php.ini