From a50b3f0263c800267bf672c30b1b0be996e1e55a Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Thu, 13 May 2021 10:56:27 -0400
Subject: [PATCH] Go back to regular resource class

Also, always store the cache because it should at least save us some effort
next time.
---
 .circleci/config.yml | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index d85a3bd..e107b78 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -139,8 +139,6 @@ jobs:
       # Run in a highly Nix-capable environment.
       - image: "nixorg/nix:circleci"
 
-    resource_class: "xlarge"
-
     environment:
       # Specify a revision of PrivateStorageio/nixpkgs to run against.  This
       # essentially pins the majority of the software involved in the build.
@@ -203,12 +201,16 @@ jobs:
       - run:
           name: "Build challenge-bypass-ristretto"
           command: |
-            nix-build --cores 4 --max-jobs 4 \
+            # Pre-build this because doing so is somewhat memory intensive and
+            # we want to turn off concurrency for this part.  We want to be
+            # able to leave concurrency on for the rest of the build, though,
+            nix-build --cores 1 --max-jobs 1 \
               --arg callPackage '(import <nixpkgs> { }).callPackage' \
               ./python-challenge-bypass-ristretto.nix
 
       - save_cache:
           name: "Cache Nix Store Paths"
+          when: "always"
           key: zkapauthorizer-nix-store-v4-{{ checksum "nixpkgs.rev" }}
           paths:
             - "/nix"
@@ -226,10 +228,14 @@ jobs:
             #
             # Further, we want the "doc" output built as well because that's
             # where the coverage data ends up.
-            nix-build --max-jobs 4 --cores 4 --argstr hypothesisProfile ci --arg collectCoverage true --attr doc
+            nix-build \
+              --argstr hypothesisProfile ci \
+              --arg collectCoverage true \
+              --attr doc
 
       - save_cache:
           name: "Cache Nix Store Paths"
+          when: "always"
           key: zkapauthorizer-nix-store-v4-{{ checksum "nixpkgs.rev" }}-ourdeps
           paths:
             - "/nix"
-- 
GitLab