mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
experimental: build PHP in a separate build job
This commit is contained in:
parent
3f21e59917
commit
470243ca6f
23
.github/workflows/main.yml
vendored
23
.github/workflows/main.yml
vendored
@ -8,7 +8,26 @@ on:
|
|||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
# This workflow contains a single job called "build"
|
# 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:
|
build:
|
||||||
|
name: Tests
|
||||||
|
needs: build-php
|
||||||
# The type of runner that the job will run on
|
# The type of runner that the job will run on
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@ -26,9 +45,9 @@ jobs:
|
|||||||
path: "./bin"
|
path: "./bin"
|
||||||
key: "php-build-generic-${{ hashFiles('./tests/gh-actions/build.sh') }}"
|
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'
|
if: steps.php-build-cache.outputs.cache-hit != 'true'
|
||||||
run: ./tests/gh-actions/build.sh
|
run: exit 1
|
||||||
|
|
||||||
- name: Prefix PHP to PATH
|
- name: Prefix PHP to PATH
|
||||||
run: echo "$(pwd)/bin/php7/bin" >> $GITHUB_PATH
|
run: echo "$(pwd)/bin/php7/bin" >> $GITHUB_PATH
|
||||||
|
Loading…
x
Reference in New Issue
Block a user