0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Try an experimental Erlang.mk CI feature

This commit is contained in:
Loïc Hoguin 2016-01-15 14:44:26 +01:00
parent e84e06d8f9
commit 8fd7364517
2 changed files with 19 additions and 7 deletions

View file

@ -13,7 +13,7 @@ dependencies:
- sudo apt-get install autoconf2.59 - sudo apt-get install autoconf2.59
- cd $HOME/bin && ln -s /usr/bin/autoconf2.59 autoconf - cd $HOME/bin && ln -s /usr/bin/autoconf2.59 autoconf
- cd $HOME/bin && ln -s /usr/bin/autoheader2.59 autoheader - cd $HOME/bin && ln -s /usr/bin/autoheader2.59 autoheader
- MAKEFLAGS="-j 32" make ci-prepare: - KERL_MAKEFLAGS="-j 32 -O" make ci-prepare:
timeout: 3600 timeout: 3600
test: test:

24
erlang.mk vendored
View file

@ -16,7 +16,7 @@
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST))) ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
ERLANG_MK_VERSION = 2.0.0-pre.2-73-g87285ad ERLANG_MK_VERSION = 2.0.0-pre.2-73-g87285ad-dirty
# Core configuration. # Core configuration.
@ -5850,12 +5850,22 @@ endif
# Copyright (c) 2015, Loïc Hoguin <essen@ninenines.eu> # Copyright (c) 2015, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License. # This file is part of erlang.mk and subject to the terms of the ISC License.
.PHONY: ci ci-setup distclean-kerl .PHONY: ci ci-prepare ci-setup distclean-kerl
ifndef KERL
KERL := $(shell which kerl 2>/dev/null)
ifeq ($(strip $(KERL)),)
KERL := $(CURDIR)/.erlang.mk/kerl/kerl
endif
endif
KERL ?= $(CURDIR)/kerl
export KERL export KERL
KERL_URL ?= https://raw.githubusercontent.com/yrashk/kerl/master/kerl KERL_GIT ?= https://github.com/yrashk/kerl
KERL_COMMIT ?= 4e7c4349ddcd46ac11cd4cd50bfbda25f1f11ca2
KERL_MAKEFLAGS ?=
OTP_GIT ?= https://github.com/erlang/otp OTP_GIT ?= https://github.com/erlang/otp
@ -5888,7 +5898,7 @@ $(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp))))
define ci_otp_target define ci_otp_target
ifeq ($(wildcard $(CI_INSTALL_DIR)/$(1)),) ifeq ($(wildcard $(CI_INSTALL_DIR)/$(1)),)
$(CI_INSTALL_DIR)/$(1): $(KERL) $(CI_INSTALL_DIR)/$(1): $(KERL)
$(KERL) build git $(OTP_GIT) $(1) $(1) $(KERL_MAKEFLAGS) $(KERL) build git $(OTP_GIT) $(1) $(1)
$(KERL) install $(1) $(CI_INSTALL_DIR)/$(1) $(KERL) install $(1) $(CI_INSTALL_DIR)/$(1)
endif endif
endef endef
@ -5896,7 +5906,9 @@ endef
$(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp)))) $(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp))))
$(KERL): $(KERL):
$(gen_verbose) $(call core_http_get,$(KERL),$(KERL_URL)) $(verbose) mkdir -p $(ERLANG_MK_TMP)
$(gen_verbose) git clone $(KERL_GIT) $(ERLANG_MK_TMP)/kerl
$(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT)
$(verbose) chmod +x $(KERL) $(verbose) chmod +x $(KERL)
help:: help::