Skip to content

Commit

Permalink
Set up caching of juce-build-linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Danand committed Jul 30, 2023
1 parent a1b715f commit 23221b6
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/release-vst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,48 @@ jobs:

runs-on: ${{ matrix.os }}

env:
BUILDER_IMAGE_UBUNTU: ghcr.io/danand/docker-juce-build-linux/juce-build-linux:0.1.1
BUILDER_IMAGE_FILE_UBUNTU: juce-build-linux.tar

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Login ghcr.io
- name: Restore builder image cache for Linux
if: matrix.os == 'ubuntu-latest'
id: cache-builder-image-ubuntu
uses: actions/cache@v3
with:
path: ${{ env.BUILDER_IMAGE_FILE_UBUNTU }}
key: ${{ env.BUILDER_IMAGE_UBUNTU }}

- name: Pull builder image for Linux
if: |
matrix.os == 'ubuntu-latest' &&
steps.cache-builder-image-ubuntu.outputs.cache-hit != 'true'
shell: bash
run: |
docker login \
--username ${{ github.repository_owner }} \
--password ${{ secrets._GITHUB_PAT }} \
ghcr.io
--username ${{ github.repository_owner }} \
--password ${{ secrets._GITHUB_PAT }} \
ghcr.io
docker pull ${{ env.BUILDER_IMAGE_UBUNTU }}
docker save \
-o ${{ env.BUILDER_IMAGE_FILE_UBUNTU }} \
${{ env.BUILDER_IMAGE_UBUNTU }}
- name: Load builder image cache for Linux
if: |
matrix.os == 'ubuntu-latest' &&
steps.cache-builder-image-ubuntu.outputs.cache-hit == 'true'
shell: bash
run: |
docker load -i ${{ env.BUILDER_IMAGE_FILE_UBUNTU }}
- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
Expand All @@ -50,7 +78,7 @@ jobs:
--mount "type=bind,source=${cwd}/${juce_repo},target=/JUCE" \
--mount "type=bind,source=${cwd}/${outputs_dir},target=/outputs" \
--env "JUCER_PROJECT=${jucer_project}" \
ghcr.io/danand/docker-juce-build-linux/juce-build-linux:0.1.1
${{ env.BUILDER_IMAGE_UBUNTU }}
- name: Build for Windows
if: matrix.os == 'windows-latest'
Expand Down

0 comments on commit 23221b6

Please sign in to comment.