@@ -87,14 +87,15 @@ workflows:
87
87
{}
88
88
89
89
- " nixos " :
90
- name : " nixos-<<matrix.pythonVersion>>"
91
- nixpkgs : " nixpkgs-unstable"
90
+ name : " <<matrix.nixpkgs>>-<<matrix.pythonVersion>>"
92
91
matrix :
93
92
parameters :
93
+ nixpkgs :
94
+ - " nixpkgs-24_11"
94
95
pythonVersion :
95
- - " python39"
96
96
- " python310"
97
97
- " python311"
98
+ - " python312"
98
99
99
100
# Eventually, test against PyPy 3.8
100
101
# - "pypy27-buster":
@@ -555,15 +556,12 @@ jobs:
555
556
buildSteps :
556
557
- " run " :
557
558
name : " Unit Test"
559
+ environment :
560
+ # Once dependencies are built, we can allow some more concurrency for our own
561
+ # test suite.
562
+ UNITTEST_CORES : 8
558
563
command : |
559
- source .circleci/lib.sh
560
-
561
- # Translate the nixpkgs selection into a flake reference we
562
- # can use to override the default nixpkgs input.
563
- NIXPKGS=$(nixpkgs_flake_reference <<parameters.nixpkgs>>)
564
-
565
- cache_if_able nix run \
566
- --override-input nixpkgs "$NIXPKGS" \
564
+ nix run \
567
565
.#<<parameters.pythonVersion>>-unittest -- \
568
566
--jobs $UNITTEST_CORES \
569
567
allmydata
@@ -693,15 +691,8 @@ executors:
693
691
docker :
694
692
# Run in a highly Nix-capable environment.
695
693
- << : *DOCKERHUB_AUTH
696
- image : " nixos/nix:2.16.1 "
694
+ image : " nixos/nix:2.25.3 "
697
695
environment :
698
- # currently, all NixOS builds are broken; ignore them
699
- ALLOWED_FAILURE : " yes"
700
-
701
- # CACHIX_AUTH_TOKEN is manually set in the CircleCI web UI and allows us
702
- # to push to CACHIX_NAME. CACHIX_NAME tells cachix which cache to push
703
- # to.
704
- CACHIX_NAME : " tahoe-lafs-opensource"
705
696
# Let us use features marked "experimental". For example, most/all of
706
697
# the `nix <subcommand>` forms.
707
698
NIX_CONFIG : " experimental-features = nix-command flakes"
@@ -724,34 +715,21 @@ commands:
724
715
type : " steps"
725
716
726
717
steps :
727
- - " run " :
728
- # Get cachix for Nix-friendly caching.
729
- name : " Install Basic Dependencies"
730
- command : |
731
- # Get some build environment dependencies and let them float on a
732
- # certain release branch. These aren't involved in the actual
733
- # package build (only in CI environment setup) so the fact that
734
- # they float shouldn't hurt reproducibility.
735
- NIXPKGS="nixpkgs/nixos-23.05"
736
- nix profile install $NIXPKGS#cachix $NIXPKGS#bash $NIXPKGS#jp
737
-
738
- # Activate our cachix cache for "binary substitution". This sets
739
- # up configuration tht lets Nix download something from the cache
740
- # instead of building it locally, if possible.
741
- cachix use "${CACHIX_NAME}"
742
-
743
718
- " checkout"
744
719
745
720
- " run " :
746
721
name : " Build Package"
722
+ environment :
723
+ # CircleCI build environment looks like it has a zillion and a half cores.
724
+ # Don't let Nix autodetect this high core count because it blows up memory
725
+ # usage and fails the test run. Pick a number of cores that suits the build
726
+ # environment we're paying for (the free one!).
727
+ DEPENDENCY_CORES : 3
747
728
command : |
748
- source .circleci/lib.sh
749
- NIXPKGS=$(nixpkgs_flake_reference <<parameters.nixpkgs>>)
750
- cache_if_able nix build \
729
+ nix build \
751
730
--verbose \
752
731
--print-build-logs \
753
732
--cores "$DEPENDENCY_CORES" \
754
- --override-input nixpkgs "$NIXPKGS" \
755
733
.#<<parameters.pythonVersion>>-tahoe-lafs
756
734
757
735
- steps : " <<parameters.buildSteps>>"
0 commit comments