mirror of https://github.com/linebender/xilem
Refactor LFS handling (#881)
See https://github.com/linebender/vello/pull/833
This commit is contained in:
parent
bc8e9fecd2
commit
4e23dc5425
|
@ -15,6 +15,8 @@ env:
|
||||||
ANDROID_TARGETS: "-p xilem --example mason_android --example calc_android --example stopwatch_android --example variable_clock_android --example http_cats_android --example to_do_mvc_android"
|
ANDROID_TARGETS: "-p xilem --example mason_android --example calc_android --example stopwatch_android --example variable_clock_android --example http_cats_android --example to_do_mvc_android"
|
||||||
# Whether the workspace contains Rust code using the debug_assertions configuration option.
|
# Whether the workspace contains Rust code using the debug_assertions configuration option.
|
||||||
USING_DEBUG_ASSERTIONS: "true"
|
USING_DEBUG_ASSERTIONS: "true"
|
||||||
|
# The files stored in LFS the tests need to access
|
||||||
|
LFS_FILES: "masonry/src/**/screenshots/*.png"
|
||||||
|
|
||||||
|
|
||||||
# Rationale
|
# Rationale
|
||||||
|
@ -206,23 +208,29 @@ jobs:
|
||||||
name: Prime LFS Cache
|
name: Prime LFS Cache
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
outputs:
|
||||||
|
lfs-hash: ${{ steps.calc-hash.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- id: calc-hash
|
||||||
|
name: Calculate LFS hash
|
||||||
|
run: echo "result=${{ hashFiles(env.LFS_FILES) }}" | tee -a "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Cache git LFS
|
- name: Cache git LFS
|
||||||
id: lfs-cache
|
id: lfs-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .git/lfs
|
path: .git/lfs
|
||||||
# The files stored in git lfs are all in this folder
|
# The files stored in git lfs are all in this folder
|
||||||
key: masonry-lfs-${{ hashFiles('masonry/src/**/screenshots/*.png') }}
|
key: masonry-lfs-${{ steps.calc-hash.outputs.result }}
|
||||||
restore-keys: masonry-lfs-
|
restore-keys: masonry-lfs-
|
||||||
enableCrossOsArchive: true
|
enableCrossOsArchive: true
|
||||||
|
|
||||||
- name: Fetch LFS data
|
- name: Fetch LFS data
|
||||||
if: ${{ steps.lfs-cache.outputs.cache-hit != 'true' }}
|
if: ${{ steps.lfs-cache.outputs.cache-hit != 'true' }}
|
||||||
run: git lfs fetch
|
run: git lfs fetch --include '${{ env.LFS_FILES }}'
|
||||||
|
|
||||||
test-stable:
|
test-stable:
|
||||||
name: cargo test
|
name: cargo test
|
||||||
|
@ -251,11 +259,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: .git/lfs
|
path: .git/lfs
|
||||||
# The files stored in git lfs are all in this folder
|
# The files stored in git lfs are all in this folder
|
||||||
key: masonry-lfs-${{ hashFiles('masonry/src/**/screenshots/*.png') }}
|
key: masonry-lfs-${{ needs.prime-lfs-cache.outputs.lfs-hash }}
|
||||||
enableCrossOsArchive: true
|
enableCrossOsArchive: true
|
||||||
|
|
||||||
- name: Checkout LFS files
|
- name: Checkout LFS files
|
||||||
run: git lfs checkout
|
run: git lfs checkout '${{ env.LFS_FILES }}'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Install Rust ${{ env.RUST_STABLE_VER }}
|
- name: Install Rust ${{ env.RUST_STABLE_VER }}
|
||||||
|
|
Loading…
Reference in New Issue