Skip to content

Commit 1b8dc40

Browse files
authored
Merge pull request #6 from joehoyle/cache-dirs
Cache dir
2 parents 4a87d91 + 9604b4f commit 1b8dc40

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
platform: linux/amd64
1919
php-version: '8.0'
2020
-
21-
os: ubuntu-latest
2221
target: aarch64-unknown-linux-gnu
2322
platform: linux/arm64
2423
php-version: '8.0'
@@ -27,7 +26,6 @@ jobs:
2726
platform: linux/amd64
2827
php-version: '8.1'
2928
-
30-
os: ubuntu-latest
3129
target: aarch64-unknown-linux-gnu
3230
platform: linux/arm64
3331
php-version: '8.1'
@@ -36,7 +34,6 @@ jobs:
3634
platform: linux/amd64
3735
php-version: '8.2'
3836
-
39-
os: ubuntu-latest
4037
target: aarch64-unknown-linux-gnu
4138
platform: linux/arm64
4239
php-version: '8.2'
@@ -47,11 +44,12 @@ jobs:
4744
- name: Setup QEMU
4845
uses: docker/setup-qemu-action@v2
4946

50-
- name: Set up Docker Buildx
51-
id: buildx
52-
uses: docker/setup-buildx-action@v2
47+
- name: Cache Cargo
48+
id: cache-primes
49+
uses: actions/cache@v3
5350
with:
54-
driver-opts: network=host
51+
path: ~/.cargo
52+
key: "v1"
5553

5654
- name: Setup docker
5755
uses: docker/build-push-action@v2
@@ -63,8 +61,10 @@ jobs:
6361
build-args: |
6462
FROM_PHP=${{ matrix.php-version }}
6563
64+
- run: mkdir ~/.cargo-registry
65+
6666
- name: Build
67-
run: docker run --rm -v $PWD:/code localhost:5000/phpv8js-build:latest bash -c 'rustup target add ${{ matrix.target }} ; cargo build --release --target ${{ matrix.target }}'
67+
run: docker run --rm -v ~/.cargo-registry:/usr/local/cargo/registry -v $PWD:/code localhost:5000/phpv8js-build:latest bash -c 'rustup target add ${{ matrix.target }} ; cargo build --release --target ${{ matrix.target }}'
6868

6969
- name: Rename file
7070
run: cp target/${{ matrix.target }}/release/libv8js.so php${{ matrix.php-version }}-${{ matrix.target }}-libv8js.so

0 commit comments

Comments
 (0)