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.
This commit is contained in:
joneshf 2018-08-26 10:27:53 -07:00
parent 3868f30777
commit d096c84527
No known key found for this signature in database
GPG Key ID: C8FFFC4E889B880E
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,8 @@ jobs:
- run: - run:
name: Compile name: Compile
command: nix-shell --run 'make sdist test -j2' command: nix-shell --run 'make sdist test -j2'
environment:
CABAL_BUILD_FLAGS: --jobs=2
- save_cache: - save_cache:
key: v2-nix-{{ checksum "package.yaml" }} key: v2-nix-{{ checksum "package.yaml" }}
name: Caching nix name: Caching nix

View File

@ -1,5 +1,6 @@
CABAL ?= cabal CABAL ?= cabal
CABAL_FLAGS ?= CABAL_FLAGS ?=
CABAL_BUILD_FLAGS ?=
DIST ?= dist DIST ?= dist
GHCID ?= ghcid GHCID ?= ghcid
GHCID_FLAGS ?= --ghc-options=-fno-code GHCID_FLAGS ?= --ghc-options=-fno-code
@ -22,7 +23,7 @@ $(CONFIGURE): $(CABAL_FILE)
.PHONY: build .PHONY: build
build $(DOC_TEST): $(CONFIGURE) default.nix build $(DOC_TEST): $(CONFIGURE) default.nix
$(CABAL) $(CABAL_FLAGS) build $(CABAL) $(CABAL_FLAGS) build $(CABAL_BUILD_FLAGS)
.PHONY: check .PHONY: check
check: $(CABAL_FILE) check: $(CABAL_FILE)