From 470243ca6f1529e653272c36593e003d290adcef Mon Sep 17 00:00:00 2001 From: Dylan T Date: Sun, 20 Dec 2020 22:30:47 +0000 Subject: [PATCH] experimental: build PHP in a separate build job --- .github/workflows/main.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a26c8a80..6ff68a6d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,26 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" + build-php: + name: Prepare PHP + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 #needed for build.sh + - name: Check for PHP build cache + id: php-build-cache + uses: actions/cache@v2 + with: + path: "./bin" + key: "php-build-generic-${{ hashFiles('./tests/gh-actions/build.sh') }}" + + - name: Compile PHP + if: steps.php-build-cache.outputs.cache-hit != 'true' + run: ./tests/gh-actions/build.sh + build: + name: Tests + needs: build-php # The type of runner that the job will run on runs-on: ubuntu-latest @@ -26,9 +45,9 @@ jobs: path: "./bin" key: "php-build-generic-${{ hashFiles('./tests/gh-actions/build.sh') }}" - - name: Compile PHP + - name: Check PHP build cache restored successfully if: steps.php-build-cache.outputs.cache-hit != 'true' - run: ./tests/gh-actions/build.sh + run: exit 1 - name: Prefix PHP to PATH run: echo "$(pwd)/bin/php7/bin" >> $GITHUB_PATH