Skip to content

Commit

Permalink
Merge pull request #6 from joehoyle/cache-dirs
Browse files Browse the repository at this point in the history
Cache dir
  • Loading branch information
joehoyle authored Jan 17, 2023
2 parents 4a87d91 + 9604b4f commit 1b8dc40
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
platform: linux/amd64
php-version: '8.0'
-
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
platform: linux/arm64
php-version: '8.0'
Expand All @@ -27,7 +26,6 @@ jobs:
platform: linux/amd64
php-version: '8.1'
-
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
platform: linux/arm64
php-version: '8.1'
Expand All @@ -36,7 +34,6 @@ jobs:
platform: linux/amd64
php-version: '8.2'
-
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
platform: linux/arm64
php-version: '8.2'
Expand All @@ -47,11 +44,12 @@ jobs:
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Cache Cargo
id: cache-primes
uses: actions/cache@v3
with:
driver-opts: network=host
path: ~/.cargo
key: "v1"

- name: Setup docker
uses: docker/build-push-action@v2
Expand All @@ -63,8 +61,10 @@ jobs:
build-args: |
FROM_PHP=${{ matrix.php-version }}
- run: mkdir ~/.cargo-registry

- name: Build
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 }}'
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 }}'

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

0 comments on commit 1b8dc40

Please sign in to comment.