actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.49k stars 1.2k forks source link

Fix cabal store path for gh-action Ubuntu #1183

Open pgrange opened 1 year ago

pgrange commented 1 year ago

Nothing's cached when applying suggested configuration for cabal caching. Exploring the Ubuntu image, it happens that cabal does not store its data in ~/.cabal but, instead, in:

You can see this CI using this configuration: https://github.com/pgrange/to_remove_cache/blob/main/.github/workflows/blank.yml

Description

Fix suggested configuration for cabal.

Motivation and Context

The cache was not working for me and it took me some time to figure out that the cache was not looking into the appropriate paths.

How Has This Been Tested?

See this exemple CI: https://github.com/pgrange/to_remove_cache/blob/main/.github/workflows/blank.yml

See this CI run where we can see something's been fetched from the cache: https://github.com/pgrange/to_remove_cache/actions/runs/5216337562/jobs/9414956883

Types of changes

Checklist: