Skip to content

Commit

Permalink
cache dialyzer PLTs
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleclair committed Feb 8, 2024
1 parent 83c21a2 commit 43edfd9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ jobs:
otp-version: ${{matrix.pair.otp}}
elixir-version: ${{matrix.pair.elixir}}

# Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
# Cache key based on Elixir & Erlang version (also useful when running in matrix)
- name: Cache Dialyzer's PLT
uses: actions/cache@v3
id: cache-plt
with:
path: plts
key: |
${{ runner.os }}-plt-otp${{ matrix.erlang }}-elixir${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-plt-otp${{ matrix.erlang }}-elixir${{ matrix.elixir }}-
# Create PLTs if no cache was found
- name: Create PLTs
if: ${{ matrix.dialyzer && steps.cache-plt.outputs.cache-hit != 'true' }}
run: mix dialyzer --plt

- name: Install Dependencies
run: mix deps.get

Expand Down

0 comments on commit 43edfd9

Please sign in to comment.