diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2018-07-06 10:57:55 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-07-06 14:08:37 -0400 |
commit | de95bf40ee0af0e7da4cb6cc4e0ad33694234bb9 (patch) | |
tree | 13ee71ca22f5a3610900ad7ce49f9fa635e2c6b3 /.circleci/config.yml | |
parent | 8c628ad9b9241dcf4ea087ca9efa5f0ca9632aa5 (diff) | |
download | haskell-de95bf40ee0af0e7da4cb6cc4e0ad33694234bb9.tar.gz |
circleci: Detect core count
Test Plan: Try `./validate`, CircleCI build; make sure core count
detection works in both cases.
Reviewers: alpmestan
Reviewed By: alpmestan
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14470
Differential Revision: https://phabricator.haskell.org/D4897
Diffstat (limited to '.circleci/config.yml')
-rw-r--r-- | .circleci/config.yml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index e52d38d587..298162efa6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,9 @@ aliases: name: submodules command: .circleci/fetch-submodules.sh - &buildenv - THREADS: 9 + # ideally we would simply set THREADS here instead of re-detecting it every + # time we need it below. Unfortunately, there is no way to set an environment + # variable with the result of a shell script. SKIP_PERF_TESTS: YES VERBOSE: 2 - &boot @@ -50,19 +52,19 @@ aliases: - &make run: name: Build - command: "make -j$THREADS" + command: "make -j`mk/detect-cpu-count.sh`" - &build_hadrian run: name: Build GHC using Hadrian command: | cabal update - hadrian/build.sh -j$THREADS + hadrian/build.sh -j`mk/detect-cpu-count.sh` - &test run: name: Test command: | mkdir -p test-results - make test SKIP_PERF_TESTS=YES JUNIT_FILE=../../test-results/junit.xml + make test THREADS=`mk/detect-cpu-count.sh` SKIP_PERF_TESTS=YES JUNIT_FILE=../../test-results/junit.xml - &store_test_results store_test_results: path: test-results |