Skip to content

Commit 20177c8

Browse files
ci(tests): key the tmachine disk cache by environment and installer
Both E2E suites rows computed the same cache key. Only the first job to save it got its disks in, and actions/cache never saves after an exact hit, so the other row rebuilt its setup and install layers on every run. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
1 parent 36b9a8e commit 20177c8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/e2e-suites.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ jobs:
8686
# environments' setup inputs (such as the Keycloak realm file) and
8787
# the cache versions in setup.rs and install.rs. actions/cache
8888
# doesn't save after an exact key hit, so a key that misses one of
89-
# those would rebuild the changed layers on every run. No
89+
# those would rebuild the changed layers on every run. Environments
90+
# share no layers, and only the first job to save a key gets its
91+
# disks in, so each environment and installer needs its own key. No
9092
# restore-keys fallback: restoring an older entry would carry its
9193
# stale disks into the new one, which then only grows.
92-
key: tmachine-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('tests/tmachine/ansible/**', 'tests/tmachine/images.nix', 'tests/tmachine/src/qemu/setup.rs', 'tests/tmachine/src/qemu/install.rs', 'scripts/keycloak-realm.json') }}
94+
key: tmachine-${{ runner.os }}-${{ runner.arch }}-${{ matrix.environment }}-${{ matrix.installer }}-${{ hashFiles('tests/tmachine/ansible/**', 'tests/tmachine/images.nix', 'tests/tmachine/src/qemu/setup.rs', 'tests/tmachine/src/qemu/install.rs', 'scripts/keycloak-realm.json') }}
9395

9496
- name: Download integration inputs
9597
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1

0 commit comments

Comments
 (0)