From b127160dd54a9937fca8c13c4946162e6f213618 Mon Sep 17 00:00:00 2001 From: Gonzalo <456459+grzuy@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:29:16 -0300 Subject: [PATCH] ci: properly cache plts (2nd attempt) --- .github/workflows/ci.yml | 6 ++++++ .gitignore | 2 ++ mix.exs | 3 +++ 3 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88a7630..efed9e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,12 @@ jobs: _build deps key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.erlang }}-${{ hashFiles('mix.lock') }} + - uses: actions/cache@v4 + with: + # Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update old ones + key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.erlang }}-plt + path: plts + if: ${{ matrix.lint }} - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.erlang }} diff --git a/.gitignore b/.gitignore index 0d255b6..71fc4c2 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ tower-*.tar # Temporary files, for example, from tests. /tmp/ + +/plts diff --git a/mix.exs b/mix.exs index 620a15c..2419e7c 100644 --- a/mix.exs +++ b/mix.exs @@ -15,6 +15,9 @@ defmodule Tower.MixProject do elixirc_paths: elixirc_paths(Mix.env()), deps: deps(), package: package(), + dialyzer: [ + plt_local_path: "plts" + ], # Docs name: "Tower",