From 043e3f3b935699f83382237cc739558c82a6c7c4 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Wed, 17 Feb 2021 16:03:41 -0500
Subject: [PATCH] Attempt to speed up the Nix build

---
 .circleci/config.yml | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index e1ac8d0..78a0a7a 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -195,6 +195,17 @@ jobs:
             - zkapauthorizer-nix-store-v4-{{ checksum "nixpkgs.rev" }}
             - zkapauthorizer-nix-store-v4-
 
+      - run:
+          name: "Build challenge-bypass-ristretto"
+          command: |
+            # 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,
+            # where it doesn't cause problems and speeds things up.
+            nix-build --cores 1 --max-jobs 1 \
+              --arg callPackage '(import <nixpkgs> { }).callPackage' \
+              ./python-challenge-bypass-ristretto.nix
+
       - run:
           name: "Run Test Suite"
           command: |
@@ -208,10 +219,7 @@ jobs:
             #
             # Further, we want the "doc" output built as well because that's
             # where the coverage data ends up.
-            #
-            # Also limit the number of concurrent jobs because of resource
-            # constraints on CircleCI. :/
-            nix-build --cores 1 --max-jobs 1 --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"
-- 
GitLab