@@ -77,31 +77,17 @@ runs:
7777 elixir-version : ${{ inputs.elixir-version }}
7878 otp-version : ${{ inputs.otp-version }}
7979
80- - name : Get deps cache
81- uses : actions/cache@v4
82- with :
83- path : deps/
84- key : deps-${{ inputs.cache-key }}-${{ runner.os }}-${{ hashFiles('**/mix.lock') }}
85- restore-keys : |
86- deps-${{ inputs.cache-key }}-${{ runner.os }}-
80+ - name : Restore local cache
81+ shell : bash
82+ run : ${{ github.action_path }}/localcache.sh restore deps-${{ inputs.cache-key }}-${{ runner.os }}-${{ hashFiles('**/mix.lock') }} deps/
8783
8884 - name : Get build cache
89- uses : actions/cache@v4
90- id : build-cache
91- with :
92- path : _build/${{env.MIX_ENV}}/
93- key : build-${{ inputs.cache-key }}-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ env.MIX_ENV }}-${{ hashFiles('**/mix.lock') }}
94- restore-keys : |
95- build-${{ inputs.cache-key }}-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ env.MIX_ENV }}-
85+ shell : bash
86+ run : ${{ github.action_path }}/localcache.sh restore build-${{ inputs.cache-key }}-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ env.MIX_ENV }}-${{ hashFiles('**/mix.lock') }} _build/${{env.MIX_ENV}}/
9687
9788 - name : Get Hex cache
98- uses : actions/cache@v4
99- id : hex-cache
100- with :
101- path : ~/.hex
102- key : build-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}
103- restore-keys : |
104- build-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-
89+ shell : bash
90+ run : ${{ github.action_path }}/localcache.sh restore hex-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ hashFiles('**/mix.lock') }} ~/.hex
10591
10692 # In my experience, I have issues with incremental builds maybe 1 in 100
10793 # times that are fixed by doing a full recompile.
@@ -145,6 +131,18 @@ runs:
145131 shell : sh
146132 if : inputs.build-app == 'true'
147133
134+ - name : Save local deps cache
135+ shell : bash
136+ run : ${{ github.action_path }}/localcache.sh save deps-${{ inputs.cache-key }}-${{ runner.os }}-${{ hashFiles('**/mix.lock') }} deps/
137+
138+ - name : Save local build cache
139+ shell : bash
140+ run : ${{ github.action_path }}/localcache.sh save build-${{ inputs.cache-key }}-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ env.MIX_ENV }}-${{ hashFiles('**/mix.lock') }} _build/${{env.MIX_ENV}}/
141+
142+ - name : Save local Hex cache
143+ shell : bash
144+ run : ${{ github.action_path }}/localcache.sh save hex-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ hashFiles('**/mix.lock') }} ~/.hex
145+
148146 # Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
149147 # Cache key based on Elixir & Erlang version (also useful when running in matrix)
150148 - name : Restore PLT cache
0 commit comments