From 350761e7f723a6eb9b78865bc22968130274e82f Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 27 Jul 2021 07:45:36 +0200 Subject: [PATCH 1/5] Remove .stack-work from cache --- .circleci/config.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ca06ff83f0..ec7a0aa113 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,9 +18,9 @@ defaults: &defaults - restore_cache: keys: - - v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} - - v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }} - - v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} + - v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} + - v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }} + - v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} - run: name: Stack upgrade @@ -46,11 +46,9 @@ defaults: &defaults destination: bin - save_cache: - key: v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} + key: v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} paths: &cache_paths - ~/.stack - - ~/build/.stack-work - - ~/build/ghcide/.stack-work - run: name: Build including tests @@ -58,7 +56,7 @@ defaults: &defaults no_output_timeout: 120m - save_cache: - key: v2-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} + key: v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} paths: *cache_paths version: 2 From d8c1588bb4c9ca9d5d29d7c41daae05b7060c2be Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 27 Jul 2021 07:48:12 +0200 Subject: [PATCH 2/5] Deps cache only depends on resolver --- .circleci/config.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ec7a0aa113..6431b8af07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,14 +12,8 @@ defaults: &defaults name: Figure out resolver for better caching command: grep '^resolver:' stack-build.txt > resolver.txt - - run: - name: Create a composite cabal file for changes detection - command: find . -name "*.cabal" | grep -v -e "stack-work" -e "dist-newstyle" -e "submodules" -e "testdata" | sort | xargs cat > all-cabal.txt - - restore_cache: keys: - - v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} - - v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }} - v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} - run: @@ -55,10 +49,6 @@ defaults: &defaults command: stack --stack-yaml=${STACK_FILE} test --no-run-tests --no-terminal no_output_timeout: 120m - - save_cache: - key: v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} - paths: *cache_paths - version: 2 jobs: ghc-8.6.4: From dbb4a8b90a93f0f117653c700bd438f33f98e1b6 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 28 Jul 2021 12:56:28 +0200 Subject: [PATCH 3/5] Disable executable dynamic --- stack-8.10.2.yaml | 2 -- stack-8.10.3.yaml | 2 -- stack-8.10.4.yaml | 2 -- stack-8.10.5.yaml | 2 -- stack-8.6.4.yaml | 2 -- stack-8.6.5.yaml | 2 -- stack-8.8.3.yaml | 2 -- stack-8.8.4.yaml | 2 -- stack-9.0.1.yaml | 2 -- 9 files changed, 18 deletions(-) diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index 58e1eb6263..806559bd8c 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -75,8 +75,6 @@ extra-deps: # https://github.com/haskell/lsp/pull/332 configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: diff --git a/stack-8.10.3.yaml b/stack-8.10.3.yaml index ba3c3698e0..92828a603f 100644 --- a/stack-8.10.3.yaml +++ b/stack-8.10.3.yaml @@ -75,8 +75,6 @@ extra-deps: # https://github.com/haskell/lsp/pull/332 configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: diff --git a/stack-8.10.4.yaml b/stack-8.10.4.yaml index 4968bbee03..c76e4a1cf5 100644 --- a/stack-8.10.4.yaml +++ b/stack-8.10.4.yaml @@ -77,8 +77,6 @@ extra-deps: # - hlint-3.3@sha256:4218ad6e03050f5d68aeba0e025f5f05e366c8fd49657f2a19df04ee31b2bb23,4154 configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: diff --git a/stack-8.10.5.yaml b/stack-8.10.5.yaml index 323c2371c9..e83cb5d40b 100644 --- a/stack-8.10.5.yaml +++ b/stack-8.10.5.yaml @@ -79,8 +79,6 @@ extra-deps: # - hlint-3.3@sha256:4218ad6e03050f5d68aeba0e025f5f05e366c8fd49657f2a19df04ee31b2bb23,4154 configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index c838b35967..6fca47b737 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -124,8 +124,6 @@ flags: configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 0aefc1f9bb..1d53854c22 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -113,8 +113,6 @@ extra-deps: # https://github.com/haskell/lsp/pull/332 configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index f51324d932..415ba7955a 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -92,8 +92,6 @@ extra-deps: # https://github.com/haskell/lsp/pull/332 configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index cba8cc6e11..e33d4108b6 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -89,8 +89,6 @@ extra-deps: # https://github.com/haskell/lsp/pull/332 configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: diff --git a/stack-9.0.1.yaml b/stack-9.0.1.yaml index 86d074ff75..96de4dda17 100644 --- a/stack-9.0.1.yaml +++ b/stack-9.0.1.yaml @@ -102,8 +102,6 @@ extra-deps: commit: 16e19aaf34e286f3d27b3988c61040823ec66537 configure-options: - $targets: - - --enable-executable-dynamic ghcide: - --disable-library-for-ghci haskell-language-server: From a2339aa140272d03edc1f44468c04d0502f58c9d Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 28 Jul 2021 12:57:15 +0200 Subject: [PATCH 4/5] Update circleci cache key --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6431b8af07..45e2290d36 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ defaults: &defaults - restore_cache: keys: - - v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} + - v4-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} - run: name: Stack upgrade @@ -40,7 +40,7 @@ defaults: &defaults destination: bin - save_cache: - key: v3-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} + key: v4-stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} paths: &cache_paths - ~/.stack From 06d211dc8199c2d887e4e6afc4230d867267095c Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 28 Jul 2021 14:37:41 +0200 Subject: [PATCH 5/5] Remove superflous test build :facepalm: --- .circleci/config.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 45e2290d36..690d28420d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,17 +22,17 @@ defaults: &defaults - run: name: Stack setup - command: stack -j 2 --stack-yaml=${STACK_FILE} setup + command: stack -j2 --stack-yaml=${STACK_FILE} setup - run: name: Build (we need the exe for tests) # need j1, else ghc-lib-parser triggers OOM - command: stack -j 1 --stack-yaml=${STACK_FILE} install --no-terminal + command: stack -j1 --stack-yaml=${STACK_FILE} install --no-terminal no_output_timeout: 30m - run: name: Build Testsuite without running it - command: stack -j 1 --stack-yaml=${STACK_FILE} build --test --no-run-tests --no-terminal + command: stack -j1 --stack-yaml=${STACK_FILE} build --test --no-run-tests --no-terminal no_output_timeout: 30m - store_artifacts: @@ -44,11 +44,6 @@ defaults: &defaults paths: &cache_paths - ~/.stack - - run: - name: Build including tests - command: stack --stack-yaml=${STACK_FILE} test --no-run-tests --no-terminal - no_output_timeout: 120m - version: 2 jobs: ghc-8.6.4: