aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2024-11-15 16:27:00 +0100
committerLoïc Hoguin <[email protected]>2024-11-19 15:34:48 +0100
commita5f32341d923d6c0bee6efba2f156558c994ff56 (patch)
treedf433f37d413b10c835e49849119b49eaa59299c
parent8312df799e3e501b14e8736d19c2d238b7bd8507 (diff)
downloaderlang.mk-a5f32341d923d6c0bee6efba2f156558c994ff56.tar.gz
erlang.mk-a5f32341d923d6c0bee6efba2f156558c994ff56.tar.bz2
erlang.mk-a5f32341d923d6c0bee6efba2f156558c994ff56.zip
CI: Also test with CACHE_DEPS=1
-rw-r--r--.github/workflows/ci.yaml2
-rw-r--r--core/deps.mk3
-rw-r--r--test/core_autopatch.mk2
-rw-r--r--test/plugin_dialyzer.mk4
4 files changed, 8 insertions, 3 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 5c0a339..8ee4a94 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -59,7 +59,7 @@ jobs:
- sphinx
- triq
- xref
- extra: ['', 'LEGACY=1']
+ extra: ['', 'CACHE_DEPS=1', 'LEGACY=1']
exclude:
# We disable proper/triq tests until ubuntu-latest includes GNU Make 4.4 or later.
- os: ubuntu-latest
diff --git a/core/deps.mk b/core/deps.mk
index c78146e..b522945 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -726,7 +726,8 @@ define dep_cache_fetch_git
else \
git clone -q -n -- $(call dep_repo,$1) $(join $(CACHE_DIR)/git/,$(call dep_name,$1)); \
fi; \
- git clone -q --branch $(call dep_commit,$1) --single-branch -- $(join $(CACHE_DIR)/git/,$(call dep_name,$1)) $2
+ git clone -q --single-branch -- $(join $(CACHE_DIR)/git/,$(call dep_name,$1)) $2; \
+ cd $2 && git checkout -q $(call dep_commit,$1)
endef
define dep_fetch_git
diff --git a/test/core_autopatch.mk b/test/core_autopatch.mk
index c961a78..2112f3b 100644
--- a/test/core_autopatch.mk
+++ b/test/core_autopatch.mk
@@ -172,7 +172,7 @@ core-autopatch-two-rebar: init
$t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v
$i "Add two Rebar projects to the list of dependencies"
- $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = epgsql mochiweb\ndep_epgsql = git https://github.com/epgsql/epgsql master\ndep_mochiweb = git https://github.com/mochi/mochiweb main\n"}' $(APP)/Makefile
+ $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = epgsql mochiweb\ndep_epgsql = git https://github.com/epgsql/epgsql devel\ndep_mochiweb = git https://github.com/mochi/mochiweb main\n"}' $(APP)/Makefile
$i "Build the application"
$t $(MAKE) -C $(APP) $v
diff --git a/test/plugin_dialyzer.mk b/test/plugin_dialyzer.mk
index eca80a2..e4240d7 100644
--- a/test/plugin_dialyzer.mk
+++ b/test/plugin_dialyzer.mk
@@ -298,6 +298,10 @@ dialyzer-plt-ebin-only: init
$i "Build the application"
$t $(MAKE) -C $(APP) $v
+# @todo Temporary measure to make CACHE_DEPS=1 tests work again.
+ $i "Patch Cowlib's Erlang.mk"
+ $t cp ../erlang.mk $(APP)/deps/cowlib/
+
$i "Build Cowlib for tests to fetch autopatched dependencies"
$t $(MAKE) -C $(APP)/deps/cowlib test-build $v