Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.yml: use image cache with parameters created from template #2508

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/actions/setup_cache_for_template/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: 'setup cache for template'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your dedicated work. Is it possible to measure how much we are saving by implementing caching in this GitHub Action workflow?

We need to understand the benefits we will receive if we merge this pull request.

Copy link
Contributor Author

@norio-nomura norio-nomura Aug 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To answer the question, I created a script to calculate the cache size usage and committed it at 9bb92f3.

Running the script produces the following output:

$ hack/calculate-cache.sh
==> expected content size, actual cached size, and cache-keys used in caching method prior implementation in https://github.com/lima-vm/lima/pull/2508
content-size actual-size cache-key
  784.84 MiB <<missing>> Linux-1c3b2791d52735d916dc44767c745c2319eb7cae74af71bbf45ddb268f42fc1d
  605.53 MiB <<missing>> Linux-231c66957fc2cdb18ea10e63f60770049026e29051ecd6598fc390b60d6a4fa6
   74.00 MiB <<missing>> Linux-69a547b760dbf1650007ed541408474237bc611704077214adcac292de556444
  554.60 MiB <<missing>> Linux-710b470b49a6cc49e1ef9cb911e6e749311dc44bb6a9c29493ffe97a21c9abd5
  474.86 MiB <<missing>> Linux-7782f8b4ff8cd378377eb79f8d61c9559b94bbd0c11d19eb380ee7bda19af04e
  723.24 MiB <<missing>> Linux-a1122da40e693040c8f499d00dd9b8634eb070648e543de6436e24ef8f149067
  453.00 MiB <<missing>> Linux-ad6e29b3057a13dfd0cac759735d0aac4bb6c9c6aad480f957be363685efb646
  784.84 MiB  774.10 MiB Linux-de83bce0608d787e3c68c7a31c5fab2b6d054320fd7bf633a031845e2ee03414
   72.00 MiB <<missing>> Linux-f88f0b3b678ff6432386a42bdd27661133c84a36ad29f393da407c871b0143eb
  679.46 MiB  669.58 MiB Linux-fb77ce057fac31cb2e2ec5d8c8e9fc6e385a662090373e35a557a3aff7e1d7e4
  878.96 MiB <<missing>> macOS-10ad71d670ff0c9a346871f49f665972f8f8f201c47b4dd573e54ae1053ebb63
  605.53 MiB <<missing>> macOS-231c66957fc2cdb18ea10e63f60770049026e29051ecd6598fc390b60d6a4fa6
  784.84 MiB <<missing>> macOS-8f37f663956af5f743f0f99ab973729b6a02f200ebfac7a3a036eff296550732
  679.46 MiB <<missing>> macOS-b3b32541a86504a4206a16a3a8cb27098edb89176bd51f6dd81d2130ef6160ad
  679.46 MiB <<missing>> macOS-f174bdf75da4cd402b862784fcafca4fff2e690cab986351201496447ed96bb9
------------
 8834.64 MiB

==> expected content size, actual cached size, and cache-keys used in caching method after implementation in https://github.com/lima-vm/lima/pull/2508
content-size actual-size cache-key
  226.46 MiB  226.43 MiB containerd:nerdctl-full-1.7.6-linux-amd64.tar.gz-sha256:2c841e097fcfb5a1760bd354b3778cb695b44cd01f9f271c17507dc4a0b25606
  496.77 MiB <<missing>> image:Arch-Linux-x86_64-cloudimg.qcow2-url-sha256:f84cefea6f889e36ddc5a7ffc1368a9aa95fd24b4589e1f79aab7ab85325d065
  379.06 MiB  377.28 MiB image:Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2-sha256:ac58f3c35b73272d5986fa6d3bc44fd246b45df4c334e99a07b3bbd00684adee
   72.00 MiB   65.34 MiB image:alpine-lima-std-3.19.0-x86_64.iso-sha512:568852df405e6b9858e678171a9894c058f483df0b0570c22cf33fc75f349ba6cc5bb3d50188180d8c31faaf53400fe884ca3e5f949961b03b2bf53e65de88d7
   74.00 MiB   67.05 MiB image:alpine-lima-std-3.20.0-x86_64.iso-sha512:df013ba0666460c9e303e996e46e061e613ce546124a9de60060041874c702444ac7a90e67f1aed4756b85cc89d40c5ea4375dea62c98b9536ceb44f18874b67
  328.14 MiB  320.45 MiB image:debian-12-genericcloud-amd64-20240429-1732.qcow2-sha512:6cc752d71b390c7fea64b0b598225914a7f4adacd4a33fa366187fac01094648628e0681a109ae9320b9a79aba2832f33395fa13154dad636465b7d9cdbed599
  248.40 MiB  245.08 MiB image:openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2-url-sha256:713f6146e29554b9092f147652323bc0625a501abccc82dff249e139df8fade3
  652.50 MiB  644.52 MiB image:ubuntu-22.04-server-cloudimg-amd64.img-sha256:345fbbb6ec827ca02ec1a1ced90f7d40d3fd345811ba97c5772ac40e951458e1
  453.00 MiB  443.15 MiB image:ubuntu-24.04-server-cloudimg-amd64.img-sha256:32a9d30d18803da72f5936cf2b7b9efcb4d0bb63c67933f17e3bdfd1751de3f3
  558.38 MiB  547.64 MiB image:ubuntu-24.04-server-cloudimg-amd64.img-url-sha256:3b6b67faf5fd451e96832cbcaf6f5e04704d2ff7c47e749663508fc2a636130f
------------
 3488.72 MiB

It appears that the cache is stored in a compressed format, so the actual cache size is somewhat smaller than the size of the downloaded content. However, I believe the results are generally accurate and this should answer the question.

During the process of creating this response, several improvements were made to utilize the cache more efficiently. Thank you for the question.

Copy link
Contributor Author

@norio-nomura norio-nomura Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased on master(6c2bfaa).
Following is output of hack/calculate-cache.sh

$ hack/calculate-cache.sh
==> expected content size, actual cached size, and cache-keys used in caching method prior implementation in https://github.com/lima-vm/lima/pull/2508
content-size actual-size cache-key
  784.84 MiB  774.11 MiB Linux-1c3b2791d52735d916dc44767c745c2319eb7cae74af71bbf45ddb268f42fc1d
  605.53 MiB  603.70 MiB Linux-231c66957fc2cdb18ea10e63f60770049026e29051ecd6598fc390b60d6a4fa6
  558.38 MiB  547.67 MiB Linux-3b906d46fa532e3bc348c35fc8e7ede6c69f0b27032046ee2cbb56d4022d1146
   74.00 MiB <<missing>> Linux-69a547b760dbf1650007ed541408474237bc611704077214adcac292de556444
  474.86 MiB  471.56 MiB Linux-7782f8b4ff8cd378377eb79f8d61c9559b94bbd0c11d19eb380ee7bda19af04e
  784.84 MiB  775.04 MiB Linux-8812aedfe81b4456d421645928b493b1f2f88aff04b7f3171207492fd44cd189
  723.24 MiB <<missing>> Linux-a1122da40e693040c8f499d00dd9b8634eb070648e543de6436e24ef8f149067
  784.84 MiB  774.10 MiB Linux-de83bce0608d787e3c68c7a31c5fab2b6d054320fd7bf633a031845e2ee03414
  552.05 MiB  543.28 MiB Linux-eb88a19dfcf2fb98278e7c7e941c143737c6d7cd8950a88f58e04b4ee7cef1bc
   72.00 MiB   65.31 MiB Linux-f88f0b3b678ff6432386a42bdd27661133c84a36ad29f393da407c871b0143eb
  878.96 MiB <<missing>> macOS-10ad71d670ff0c9a346871f49f665972f8f8f201c47b4dd573e54ae1053ebb63
  605.53 MiB  603.68 MiB macOS-231c66957fc2cdb18ea10e63f60770049026e29051ecd6598fc390b60d6a4fa6
  784.84 MiB  775.51 MiB macOS-49aa50a4872ded07ebf657c0eaf9e44ecc0c174d033a97c537ecd270f35b462f
  784.84 MiB  774.11 MiB macOS-8f37f663956af5f743f0f99ab973729b6a02f200ebfac7a3a036eff296550732
  784.84 MiB  775.51 MiB macOS-ef5509b5d4495c8c3590442ee912ad1c9a33f872dc4a29421c524fc1e2103b59
------------
 9253.59 MiB

==> expected content size, actual cached size, and cache-keys used in caching method after implementation in https://github.com/lima-vm/lima/pull/2508
content-size actual-size cache-key
  226.46 MiB  226.43 MiB containerd:nerdctl-full-1.7.6-linux-amd64.tar.gz-sha256:2c841e097fcfb5a1760bd354b3778cb695b44cd01f9f271c17507dc4a0b25606
  496.77 MiB <<missing>> image:Arch-Linux-x86_64-cloudimg.qcow2-url-sha256:f84cefea6f889e36ddc5a7ffc1368a9aa95fd24b4589e1f79aab7ab85325d065
  379.06 MiB  377.28 MiB image:Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2-sha256:ac58f3c35b73272d5986fa6d3bc44fd246b45df4c334e99a07b3bbd00684adee
   72.00 MiB   65.34 MiB image:alpine-lima-std-3.19.0-x86_64.iso-sha512:568852df405e6b9858e678171a9894c058f483df0b0570c22cf33fc75f349ba6cc5bb3d50188180d8c31faaf53400fe884ca3e5f949961b03b2bf53e65de88d7
   74.00 MiB   67.05 MiB image:alpine-lima-std-3.20.0-x86_64.iso-sha512:df013ba0666460c9e303e996e46e061e613ce546124a9de60060041874c702444ac7a90e67f1aed4756b85cc89d40c5ea4375dea62c98b9536ceb44f18874b67
  325.58 MiB  317.74 MiB image:debian-12-genericcloud-amd64-20240717-1811.qcow2-sha512:0f0075d53749dba4c9825e606899360626bb20ac6bab3dbdeff40041b051d203eb1a56e68d377c9fac0187faa0aea77fd543ef4a883fff2304eac252cce01b44
  248.40 MiB  245.08 MiB image:openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2-url-sha256:713f6146e29554b9092f147652323bc0625a501abccc82dff249e139df8fade3
  652.50 MiB  644.52 MiB image:ubuntu-22.04-server-cloudimg-amd64.img-sha256:345fbbb6ec827ca02ec1a1ced90f7d40d3fd345811ba97c5772ac40e951458e1
  558.38 MiB  547.64 MiB image:ubuntu-24.04-server-cloudimg-amd64.img-sha256:d2377667ea95222330ca2287817403c85178dad397e9fed768a9b4aec79d2a7f
  558.38 MiB  547.64 MiB image:ubuntu-24.04-server-cloudimg-amd64.img-url-sha256:3b6b67faf5fd451e96832cbcaf6f5e04704d2ff7c47e749663508fc2a636130f
------------
 3591.53 MiB

Judging from this output, I believe the cache size calculations prior to this PR are generally accurate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.
Latest output of calculate-cach.sh:

$ hack/calculate-cache.sh
=> compare expected content size, actual cached size, and cache-keys used before and after the change in https://github.com/lima-vm/lima/pull/2508
==> before
content-size actual-size cache-key
  785.15 MiB  773.20 MiB Linux-1c3b2791d52735d916dc44767c745c2319eb7cae74af71bbf45ddb268f42fc1d
  605.53 MiB  603.71 MiB Linux-231c66957fc2cdb18ea10e63f60770049026e29051ecd6598fc390b60d6a4fa6
  558.38 MiB  547.64 MiB Linux-3b906d46fa532e3bc348c35fc8e7ede6c69f0b27032046ee2cbb56d4022d1146
   74.00 MiB   67.05 MiB Linux-69a547b760dbf1650007ed541408474237bc611704077214adcac292de556444
  474.49 MiB  471.25 MiB Linux-7782f8b4ff8cd378377eb79f8d61c9559b94bbd0c11d19eb380ee7bda19af04e
  784.84 MiB  775.08 MiB Linux-8812aedfe81b4456d421645928b493b1f2f88aff04b7f3171207492fd44cd189
  723.24 MiB  719.76 MiB Linux-caa7d8af214d55ad8902e82d5918e61573f3d6795d2b5ad9a35305e26fa0e6a9
  785.15 MiB  773.14 MiB Linux-de83bce0608d787e3c68c7a31c5fab2b6d054320fd7bf633a031845e2ee03414
  552.05 MiB  544.19 MiB Linux-eb88a19dfcf2fb98278e7c7e941c143737c6d7cd8950a88f58e04b4ee7cef1bc
   72.00 MiB   65.32 MiB Linux-f88f0b3b678ff6432386a42bdd27661133c84a36ad29f393da407c871b0143eb
  878.96 MiB <<missing>> macOS-10ad71d670ff0c9a346871f49f665972f8f8f201c47b4dd573e54ae1053ebb63
  605.53 MiB  603.70 MiB macOS-231c66957fc2cdb18ea10e63f60770049026e29051ecd6598fc390b60d6a4fa6
  784.84 MiB  775.51 MiB macOS-49aa50a4872ded07ebf657c0eaf9e44ecc0c174d033a97c537ecd270f35b462f
  785.15 MiB  773.20 MiB macOS-8f37f663956af5f743f0f99ab973729b6a02f200ebfac7a3a036eff296550732
  784.84 MiB  775.51 MiB macOS-ef5509b5d4495c8c3590442ee912ad1c9a33f872dc4a29421c524fc1e2103b59
------------
 9254.15 MiB

==> after
content-size actual-size cache-key
  226.46 MiB  226.43 MiB containerd:nerdctl-full-1.7.6-linux-amd64.tar.gz-sha256:2c841e097fcfb5a1760bd354b3778cb695b44cd01f9f271c17507dc4a0b25606
  496.77 MiB  493.33 MiB image:Arch-Linux-x86_64-cloudimg-20240801.250900.qcow2-sha256:f0e92eb32c15f4352d27662fdee90e8acc51902f50ded1843ee622e48e999eea
  379.06 MiB  377.28 MiB image:Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2-sha256:ac58f3c35b73272d5986fa6d3bc44fd246b45df4c334e99a07b3bbd00684adee
   72.00 MiB   65.32 MiB image:alpine-lima-std-3.19.0-x86_64.iso-sha512:568852df405e6b9858e678171a9894c058f483df0b0570c22cf33fc75f349ba6cc5bb3d50188180d8c31faaf53400fe884ca3e5f949961b03b2bf53e65de88d7
   74.00 MiB   67.06 MiB image:alpine-lima-std-3.20.0-x86_64.iso-sha512:df013ba0666460c9e303e996e46e061e613ce546124a9de60060041874c702444ac7a90e67f1aed4756b85cc89d40c5ea4375dea62c98b9536ceb44f18874b67
  325.58 MiB  317.73 MiB image:debian-12-genericcloud-amd64-20240717-1811.qcow2-sha512:0f0075d53749dba4c9825e606899360626bb20ac6bab3dbdeff40041b051d203eb1a56e68d377c9fac0187faa0aea77fd543ef4a883fff2304eac252cce01b44
  248.02 MiB  244.80 MiB image:openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2-url-sha256:713f6146e29554b9092f147652323bc0625a501abccc82dff249e139df8fade3
  652.50 MiB  644.52 MiB image:ubuntu-22.04-server-cloudimg-amd64.img-sha256:345fbbb6ec827ca02ec1a1ced90f7d40d3fd345811ba97c5772ac40e951458e1
  558.38 MiB  547.61 MiB image:ubuntu-24.04-server-cloudimg-amd64.img-sha256:d2377667ea95222330ca2287817403c85178dad397e9fed768a9b4aec79d2a7f
  558.69 MiB  546.71 MiB image:ubuntu-24.04-server-cloudimg-amd64.img-url-sha256:3b6b67faf5fd451e96832cbcaf6f5e04704d2ff7c47e749663508fc2a636130f
------------
 3591.47 MiB

description: 'setup cache for template'
inputs:
arch:
description: arch to setup cache for
required: false
template:
description: template yaml file
required: true
runs:
using: "composite"
steps:
- name: "detect platform for download directory"
id: detect-platform
run: |
if [[ "$(uname)" == "Darwin" ]]; then
download_dir=~/Library/Caches/lima/download
else
download_dir=~/.cache/lima/download
fi
echo "download-dir=$download_dir" >> "$GITHUB_OUTPUT"
shell: bash
- name: "create cache parameters from template"
if: always()
id: cache-params-from-template
run: |
set -eux
source hack/cache-common-inc.sh
print_cache_informations_from_template "${{ inputs.template }}" "${{ inputs.arch }}" >> "$GITHUB_OUTPUT"
shell: bash

- name: "Cache ${{ steps.cache-params-from-template.outputs.image-path }}"
if: ${{ steps.cache-params-from-template.outputs.image-key != '' }}
# avoid using `~` in path that will be expanded to platform specific home directory
uses: actions/cache@v4
with:
path: ${{ steps.cache-params-from-template.outputs.image-path }}
key: ${{ steps.cache-params-from-template.outputs.image-key }}
enableCrossOsArchive: true

- name: "Cache ${{ steps.cache-params-from-template.outputs.kernel-path }}"
if: ${{ steps.cache-params-from-template.outputs.kernel-key != '' }}
# avoid using `~` in path that will be expanded to platform specific home directory
uses: actions/cache@v4
with:
path: ${{ steps.cache-params-from-template.outputs.kernel-path }}
key: ${{ steps.cache-params-from-template.outputs.kernel-key }}
enableCrossOsArchive: true

- name: "Cache ${{ steps.cache-params-from-template.outputs.initrd-path }}"
if: ${{ steps.cache-params-from-template.outputs.initrd-key != '' }}
# avoid using `~` in path that will be expanded to platform specific home directory
uses: actions/cache@v4
with:
path: ${{ steps.cache-params-from-template.outputs.initrd-path }}
key: ${{ steps.cache-params-from-template.outputs.initrd-key }}
enableCrossOsArchive: true

- name: "Cache ${{ steps.cache-params-from-template.outputs.containerd-key }}"
if: ${{ steps.cache-params-from-template.outputs.containerd-key != '' }}
uses: actions/cache@v4
with:
path: ${{ steps.cache-params-from-template.outputs.containerd-path }}
key: ${{ steps.cache-params-from-template.outputs.containerd-key }}
enableCrossOsArchive: true

- name: "Create symbolic link named ${{ steps.detect-platform.outputs.download-dir }} pointing to .download"
run: |
set -eux
[ -d .download ] || mkdir -p .download
path_to_cache=${{ steps.detect-platform.outputs.download-dir }}
mkdir -p "$(dirname "$path_to_cache")"
ln -sfn "$PWD/.download" "$path_to_cache"
shell: bash
63 changes: 24 additions & 39 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,6 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Cache ~/Library/Caches/lima/download
uses: actions/cache@v4
with:
path: ~/Library/Caches/lima/download
# hashFiles do not seem to support symlinks
key: ${{ runner.os }}-${{ hashFiles('templates/default.yaml') }}
- name: Unit tests
run: go test -v ./...
- name: Make
Expand All @@ -182,11 +176,15 @@ jobs:
# GitHub runners seem to have lima installed by brew already; we don't want/need it
time brew uninstall --ignore-dependencies lima colima
time brew install qemu bash coreutils curl jq
- name: "Show cache"
run: ./hack/debug-cache.sh
- name: "Inject `no_timer_check` to kernel cmdline"
# workaround to https://github.com/lima-vm/lima/issues/84
run: ./hack/inject-cmdline-to-template.sh templates/default.yaml no_timer_check
- name: Cache image used by default.yaml
uses: ./.github/actions/setup_cache_for_template
with:
template: templates/default.yaml
- name: "Show cache"
run: ./hack/debug-cache.sh
- name: "Test default.yaml"
uses: nick-invision/retry@v3
with:
Expand Down Expand Up @@ -230,19 +228,14 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.23.x
- id: path_for_hashFiles
# It seems that `hashFiles` cannot use `..` as a path component, so generate a normalized path here.
run: echo "NORMALIZED=$(realpath --relative-to=$PWD examples/${{ matrix.template }})" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
with:
path: ~/.cache/lima/download
# hashFiles do not seem to support symlinks
# TODO: more fine-grained cache
key: ${{ runner.os }}-${{ hashFiles(steps.path_for_hashFiles.outputs.NORMALIZED) }}
- name: Make
run: make
- name: Install
run: sudo make install
- name: Cache image used by templates/${{ matrix.template }}
uses: ./.github/actions/setup_cache_for_template
with:
template: templates/${{ matrix.template }}
- name: Install test dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -331,16 +324,17 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Cache ~/Library/Caches/lima/download
uses: actions/cache@v4
with:
path: ~/Library/Caches/lima/download
# hashFiles do not seem to support symlinks
key: ${{ runner.os }}-${{ hashFiles('examples/vmnet.yaml') }}
- name: Make
run: make
- name: Install
run: make install
- name: "Inject `no_timer_check` to kernel cmdline"
# workaround to https://github.com/lima-vm/lima/issues/84
run: ./hack/inject-cmdline-to-template.sh templates/vmnet.yaml no_timer_check
- name: Cache image used by vmnet.yaml
uses: ./.github/actions/setup_cache_for_template
with:
template: templates/vmnet.yaml
- name: Install test dependencies
run: brew install qemu bash coreutils iperf3
- name: Install socket_vmnet
Expand All @@ -359,9 +353,6 @@ jobs:
- name: Unit test (pkg/networks) with socket_vmnet
# Set -count=1 to disable cache
run: go test -v -count=1 ./pkg/networks/...
- name: "Inject `no_timer_check` to kernel cmdline"
# workaround to https://github.com/lima-vm/lima/issues/84
run: ./hack/inject-cmdline-to-template.sh templates/vmnet.yaml no_timer_check
- name: Test socket_vmnet
uses: nick-invision/retry@v3
with:
Expand All @@ -386,11 +377,10 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Cache ~/Library/Caches/lima/download
uses: actions/cache@v4
- name: Cache image used by ${{ matrix.oldver }}/examples/ubuntu-lts.yaml
uses: ./.github/actions/setup_cache_for_template
with:
path: ~/Library/Caches/lima/download
key: ${{ runner.os }}-upgrade-${{ matrix.oldver }}
template: https://raw.githubusercontent.com/lima-vm/lima/${{ matrix.oldver }}/examples/ubuntu-lts.yaml
- name: Install test dependencies
run: brew install qemu bash coreutils
- name: Test
Expand Down Expand Up @@ -420,19 +410,14 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.23.x
- id: path_for_hashFiles
# It seems that `hashFiles` cannot use `..` as a path component, so generate a normalized path here.
run: echo "NORMALIZED=$(realpath examples/${{ matrix.template }})" >> "$GITHUB_OUTPUT"
- name: Cache ~/Library/Caches/lima/download
uses: actions/cache@v4
with:
path: ~/Library/Caches/lima/download
# hashFiles do not seem to support symlinks
key: ${{ runner.os }}-${{ hashFiles(steps.path_for_hashFiles.outputs.NORMALIZED) }}
- name: Make
run: make
- name: Install
run: make install
- name: Cache image used by templates/${{ matrix.template }}
uses: ./.github/actions/setup_cache_for_template
with:
template: templates/${{ matrix.template }}
- name: Install test dependencies
run: brew install bash coreutils jq
- name: Uninstall qemu
Expand Down
Loading
Loading