0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 12:51:52 +00:00

Add build cache for compiling v8

This commit is contained in:
Joshua Behrens 2024-09-28 04:22:51 +02:00
parent 128495208a
commit 29e788aa1f
No known key found for this signature in database
GPG Key ID: DD28BD85EE8F67DD

View File

@ -37,10 +37,20 @@ jobs:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
coverage: none coverage: none
- name: Restore cache v8 ${{ matrix.v8-versions }} build
id: v8-build-cache
uses: actions/cache/restore@v4
with:
path: /opt/v8/self-built
key: ${{ runner.os }}-${{ matrix.v8-versions }}-v8-build
- name: Setup Google depot tools - name: Setup Google depot tools
# only needed, when v8 needs to be built
if: steps.v8-build-cache.outputs.cache-hit != 'true'
uses: newkdev/setup-depot-tools@v1.0.1 uses: newkdev/setup-depot-tools@v1.0.1
- name: Build v8 ${{ matrix.v8-versions }} - name: Build v8 ${{ matrix.v8-versions }}
if: steps.v8-build-cache.outputs.cache-hit != 'true'
run: | run: |
# Store extra tools somewhere undisturbing # Store extra tools somewhere undisturbing
cd "$(mktemp -d)" cd "$(mktemp -d)"
@ -66,6 +76,13 @@ jobs:
# Go back to origin # Go back to origin
cd "${GITHUB_WORKSPACE}" cd "${GITHUB_WORKSPACE}"
- name: Save v8 ${{ matrix.v8-versions }} build cache
if: steps.v8-build-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: /opt/v8/self-built
key: ${{ steps.v8-build-cache.outputs.cache-primary-key }}
- name: Build extension - name: Build extension
run: | run: |
phpize phpize