Skip to content

Conversation

@Tachi107
Copy link
Contributor

@Tachi107 Tachi107 commented Aug 6, 2025

As suggested in #63 (comment)

@wwylele
Copy link
Owner

wwylele commented Aug 6, 2025

Nice! Where is the test asset uploaded?

@Tachi107
Copy link
Contributor Author

Tachi107 commented Aug 6, 2025 via email

@wwylele
Copy link
Owner

wwylele commented Aug 6, 2025

This repo doesn't seem it can maintain activity once a week. So the cache will be deleted?

@Tachi107
Copy link
Contributor Author

Tachi107 commented Aug 6, 2025 via email

@wwylele
Copy link
Owner

wwylele commented Aug 6, 2025

git-lfs sounds good to me. It is also good for archiving. I don't think I have used my quota at all

@Tachi107
Copy link
Contributor Author

Tachi107 commented Aug 7, 2025

I cannot add git-lfs files to the project myself. The way I did so was:

git lfs install
mkdir tests/data
touch tests/data/.keep
git add tests/data/.keep
git commit -m 'test: create tests/data directory'
mv build/teaklite2_tests_result tests/data/
git lfs track --filename tests/data/teaklite2_tests_result
git add .gitattributes
git commit -m 'test: track teaklite2_tests_result with git-lfs'
git add tests/data/teaklite2_tests_result
git commit -m 'test: add teaklite2_tests_result'
git lfs ls-files
baffcd4f80 * tests/data/teaklite2_tests_result

@wwylele
Copy link
Owner

wwylele commented Aug 8, 2025

I have uploaded it to https://github.com/wwylele/teakra/tree/master/src/test_verifier/data. I realized this has been downloading from someone else' server in

if(NOT EXISTS "${TEAKRA_TEST_ASSETS_DIR}/teaklite2_tests_result")
message(STATUS "Downloading required samples...")
file(DOWNLOAD
"https://liushuyu.b-cdn.net/teaklite2_tests_result_20181208"
"${TEAKRA_TEST_ASSETS_DIR}/teaklite2_tests_result"
EXPECTED_HASH SHA256=${ASSET_SHA256SUM}
SHOW_PROGRESS
)
. We should change that line and redirect it to the in-repo file, though I don't have set up to test this locally

It's required when using multi-config generators like MSVC on Windows
The test file is really big, and downloading it by default may create
issues with users on a slow network.

Use a .lfsconfig file to disable LFS downloads. This way, LFS files can
be explicitly downloaded via

    git lfs pull --exclude='' --include='*'
@Tachi107 Tachi107 force-pushed the github-ci-cache branch 2 times, most recently from 55e9a6f to 58931f2 Compare August 24, 2025 20:23
@Tachi107
Copy link
Contributor Author

Hi again! I've reworked with patch set, combining Git LFS with GitHub Actions caching. This way, multiple repeated runs will download the big test asset from the cache instead of LFS storage. The cache is (supposed to be) faster, and LFS bandwidth is limited.

I've also disabled Git LFS downloads by default, since most users are unlikely to want to download that test asset, and it takes a long time to do so

@wwylele
Copy link
Owner

wwylele commented Aug 24, 2025

Thanks!

@wwylele wwylele merged commit 3d697a1 into wwylele:master Aug 24, 2025
3 checks passed
@Tachi107 Tachi107 deleted the github-ci-cache branch August 24, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants