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

Commits on Aug 18, 2024

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

    Use `actions/cache@v4` with following params:
    path: ".download/by-url-sha256/$(echo $location | sha256sum | cut -d' ' -f1)"
    key: "image-$digest"
    enableCrossOsArchive: true
    
    To make the image cache cross-platform, the cache directory is specified using a relative path from the working directory, and the platform-specific cache directories are accessed via symbolic links.
    
    This should reduce the cache size used by the CI.
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    setup_cache_for_template: support url in template parameter
    
    Signed-off-by: Norio Nomura <[email protected]>
    norio-nomura committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    cd30aaa View commit details
    Browse the repository at this point in the history
  2. setup_cache_for_template: Improve caching mechanism for images and `n…

    …erdctl` archives
    
    - Change cache key to `url-sha256:$sha256` for caching images without a digest
    - Include image basename in the cache key
    - Use `limactl validate --fill` to retrieve nerdctl archive info and set cache if needed
    - `test.yml`: Change cache configuration to run after `make install`
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    test.yml: Remove `normalize_template_path` since `hashFile` is no longer used.
    
    Signed-off-by: Norio Nomura <[email protected]>
    norio-nomura committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    99c1247 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. calculate-cache.sh: calculate cache size usage for new caching method…

    … versus previous method
    
    This was created in response to the question at lima-vm#2508 (comment).
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: `shfmt -s`
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: extract `runs_on` and `template` from workflow file
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: add DEBUG=1 to save collected information as yaml
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: add descriptions and output examples to functions
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: use `--jq` instead of `| jq`
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: add some descriptions
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: resolve shfmt issue
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: mention response cache file
    
    Signed-off-by: Norio Nomura <[email protected]>
    
    calculate-cache.sh: add `select(.steps)|`
    
    Signed-off-by: Norio Nomura <[email protected]>
    norio-nomura committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    f8acc9d View commit details
    Browse the repository at this point in the history
  2. setup_cache_for_template: add kernel and initrd cache support

    refactor some common codes from `setup_cache_for_template` and `calculate-cache.sh` into `cache-common-inc.sh`
    
    Signed-off-by: Norio Nomura <[email protected]>
    norio-nomura committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    5058106 View commit details
    Browse the repository at this point in the history