Skip to content

Commit 104e096

Browse files
committed
Simplified dialyzer caches
Removed elixir file caches and projects directory (which doesn't exist any more). We do update this cache on every run. The thinking here is to minimize the changes in the PLT by keeping more of our updated code in the plts.
1 parent 2a8385c commit 104e096

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/elixir.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ jobs:
7878
runs-on: ubuntu-latest
7979
name: Run Dialyzer
8080
env:
81-
project_mix_lock: ${{ format('{0}{1}', github.workspace, '/mix.lock') }}
82-
projects_ex_blob: ${{ format('{0}{1}', github.workspace, '/projects/**/*.ex') }}
83-
projects_locks_blob: ${{ format('{0}{1}', github.workspace, '/projects/*/mix.lock') }}
81+
apps_mix_lock: ${{ format('{0}{1}', github.workspace, 'apps/**/mix.lock') }}
8482
MIX_ENV: dev
8583
steps:
8684
# Step: Setup Elixir + Erlang image as the base.
@@ -95,13 +93,6 @@ jobs:
9593
- name: Checkout code
9694
uses: actions/checkout@v4
9795

98-
- name: Set Variables
99-
id: set_mix_lock_hash
100-
run: |
101-
mix_lock_hash="${{ hashFiles(env.project_mix_lock) }}"
102-
projects_hash="${{ hashFiles(env.projects_ex_blob, env.projects_locks_blob) }}"
103-
echo "mix_lock_hash=$mix_lock_hash::$projects_hash" >> "$GITHUB_OUTPUT"
104-
10596
# Step: Define how to cache deps. Restores existing cache if present.
10697
- name: Cache deps
10798
id: cache-deps
@@ -113,7 +104,7 @@ jobs:
113104
apps/**/deps
114105
apps/**/_build
115106
116-
key: ${{ runner.os }}-mix-${{ env.DEFAULT_ELIXIR }}-${{ env.DEFAULT_OTP }}-${{ hashFiles('**/mix.lock') }}
107+
key: ${{ runner.os }}-mix-${{ env.DEFAULT_ELIXIR }}-${{ env.DEFAULT_OTP }}-${{ hashFiles('apps/**/mix.lock') }}
117108
restore-keys: |
118109
${{ runner.os }}-mix-${{ env.DEFAULT_ELIXIR }}-${{ env.DEFAULT_OTP }}-
119110
@@ -123,7 +114,10 @@ jobs:
123114
uses: actions/cache@v3
124115
with:
125116
path: "priv/plts"
126-
key: lexical-plts-2-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-${{ steps.set_mix_lock_hash.outputs.mix_lock_hash }}
117+
key: lexical-plts-2-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-${{ hashFiles('apps/**/mix.lock' ) }}-${{ github.run_id }}
118+
restore-keys: |
119+
lexical-plts-2-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-${{ hashFiles('apps/**/mix.lock') }}-
120+
lexical-plts-2-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-
127121
128122
# Step: Download project dependencies. If unchanged, uses
129123
# the cached version.

0 commit comments

Comments
 (0)