From d096c8452707297e99779ec57425451e31282158 Mon Sep 17 00:00:00 2001 From: joneshf Date: Sun, 26 Aug 2018 10:27:53 -0700 Subject: [PATCH] Limit the number of simultaneous jobs We might be trying to overdo it with the number of CPU cores available. If we limit the jobs, it might speed up the build. --- .circleci/config.yml | 2 ++ Makefile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d6818e..29d5893 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,8 @@ jobs: - run: name: Compile command: nix-shell --run 'make sdist test -j2' + environment: + CABAL_BUILD_FLAGS: --jobs=2 - save_cache: key: v2-nix-{{ checksum "package.yaml" }} name: Caching nix diff --git a/Makefile b/Makefile index 47405ad..3912826 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CABAL ?= cabal CABAL_FLAGS ?= +CABAL_BUILD_FLAGS ?= DIST ?= dist GHCID ?= ghcid GHCID_FLAGS ?= --ghc-options=-fno-code @@ -22,7 +23,7 @@ $(CONFIGURE): $(CABAL_FILE) .PHONY: build build $(DOC_TEST): $(CONFIGURE) default.nix - $(CABAL) $(CABAL_FLAGS) build + $(CABAL) $(CABAL_FLAGS) build $(CABAL_BUILD_FLAGS) .PHONY: check check: $(CABAL_FILE)