experimental: build PHP in a separate build job

This commit is contained in:
Dylan T 2020-12-20 22:30:47 +00:00 committed by GitHub
parent 3f21e59917
commit 470243ca6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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