Skip to content

Commit

Permalink
Add caching of OTP builds for CircleCI
Browse files Browse the repository at this point in the history
Unfortunately not seeing how I can try it other than committing
the file... Oh well, polluting the logs!
  • Loading branch information
essen committed Jul 21, 2015
1 parent 9a9183e commit d6b11e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
dependencies:
cache_directories:
- "~/.kerl"
- "~/erlang"

pre:
- sudo apt-get install autoconf2.59
- cd $HOME/bin && ln -s /usr/bin/autoconf2.59 autoconf
- cd $HOME/bin && ln -s /usr/bin/autoheader2.59 autoheader
- make ci-prepare:
timeout: 3600

test:
override:
Expand Down
8 changes: 5 additions & 3 deletions erlang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))

ERLANG_MK_VERSION = 1.2.0-631-g56cbd9e-dirty
ERLANG_MK_VERSION = 1.2.0-632-g26ea355-dirty

# Core configuration.

Expand Down Expand Up @@ -5365,7 +5365,9 @@ CI_OTP ?=
ifeq ($(strip $(CI_OTP)),)
ci::
else
ci:: $(KERL) $(addprefix ci-,$(CI_OTP))
ci:: ci-prepare

ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP))

ci-setup::

Expand All @@ -5384,7 +5386,7 @@ endef
$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp))))

define ci_otp_target
$(CI_INSTALL_DIR)/$(1):
$(CI_INSTALL_DIR)/$(1): $(KERL)
$(KERL) build git $(OTP_GIT) $(1) $(1)
$(KERL) install $(1) $(CI_INSTALL_DIR)/$(1)
endef
Expand Down

0 comments on commit d6b11e6

Please sign in to comment.