From 947f91dfab2d036f5b873d076933dc6531c075d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 18 Dec 2023 10:36:11 +0100 Subject: Rework how we delete the master build in CI --- .github/workflows/unix-ci.yaml | 4 ++++ early-plugins.mk | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unix-ci.yaml b/.github/workflows/unix-ci.yaml index 8caae46..1f72267 100644 --- a/.github/workflows/unix-ci.yaml +++ b/.github/workflows/unix-ci.yaml @@ -41,6 +41,10 @@ jobs: ~/erlang/ key: ${{ runner.os }}-${{ runner.arch }}-Erlang-${{ inputs.erlang }} + - name: Cleanup old master if necessary + if: steps.cache.outputs.cache-hit == 'true' && inputs.erlang == 'master' + run: make ci-auto-master + - name: Run ci-prepare if: steps.cache.outputs.cache-hit != 'true' || inputs.erlang == 'master' run: make -k ci-prepare CI_OTP=${{ inputs.erlang }} diff --git a/early-plugins.mk b/early-plugins.mk index 96b36d4..c8a9457 100644 --- a/early-plugins.mk +++ b/early-plugins.mk @@ -141,7 +141,10 @@ endif endif ifdef AUTO_CI_MASTER_MINS -ci:: $(KERL) +ci:: + $(verbose) $(MAKE) --no-print-directory ci-auto-master + +ci-auto-master: $(KERL) ifneq ($(wildcard $(KERL_INSTALL_DIR)/master),) $(verbose) if find $(KERL_INSTALL_DIR)/master/activate \ -mmin +$(AUTO_CI_MASTER_MINS) | grep -q master; then \ -- cgit v1.2.3