Skip to content

Commit 4a36687

Browse files
committed
Merge branch 'master' of https://github.com/tahoe-lafs/tahoe-lafs into 1101.feature
2 parents d7f520b + 4809397 commit 4a36687

40 files changed

+479
-1108
lines changed

.circleci/config.yml

Lines changed: 26 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ dockerhub-auth-template: &DOCKERHUB_AUTH
4848
<<: *DOCKERHUB_CONTEXT
4949
- "build-image-fedora-35":
5050
<<: *DOCKERHUB_CONTEXT
51-
- "build-image-oraclelinux-8":
52-
<<: *DOCKERHUB_CONTEXT
5351
# Restore later as PyPy38
5452
#- "build-image-pypy27-buster":
5553
# <<: *DOCKERHUB_CONTEXT
@@ -88,19 +86,16 @@ workflows:
8886
- "ubuntu-22-04":
8987
{}
9088

91-
# Equivalent to RHEL 8; CentOS 8 is dead.
92-
- "oraclelinux-8":
93-
{}
94-
9589
- "nixos":
96-
name: "<<matrix.pythonVersion>>"
97-
nixpkgs: "nixpkgs-unstable"
90+
name: "<<matrix.nixpkgs>>-<<matrix.pythonVersion>>"
9891
matrix:
9992
parameters:
93+
nixpkgs:
94+
- "nixpkgs-24_11"
10095
pythonVersion:
101-
- "python39"
10296
- "python310"
10397
- "python311"
98+
- "python312"
10499

105100
# Eventually, test against PyPy 3.8
106101
#- "pypy27-buster":
@@ -130,7 +125,7 @@ workflows:
130125
# of Python, we probably have to do something here.
131126
pythonVersion:
132127
- "3.9"
133-
- "3.11"
128+
- "3.12"
134129

135130
- "integration":
136131
# Run even the slow integration tests here. We need the `--` to
@@ -229,7 +224,7 @@ jobs:
229224
# version-specific binary packages so include the Python version
230225
# in this key, as well as the canonical source of our
231226
# dependencies.
232-
- &CACHE_KEY "pip-packages-v1-<< parameters.pythonVersion >>-{{ checksum \"setup.py\" }}"
227+
- &CACHE_KEY "pip-packages-v1-<< parameters.pythonVersion >>-{{ checksum \"pyproject.toml\" }}"
233228

234229
- "run":
235230
name: "Fix $env:PATH"
@@ -249,11 +244,6 @@ jobs:
249244
# PowerShell string escape character.
250245
Add-Content -Path $Profile.CurrentUserAllHosts -Value "`$env:PATH = `"$p;$q;`$env:PATH`""
251246
252-
- "run":
253-
name: "Display tool versions"
254-
command: |
255-
python misc/build_helpers/show-tool-versions.py
256-
257247
- "run":
258248
# It's faster to install a wheel than a source package. If we don't
259249
# have a cached wheelhouse then build all of the wheels and dump
@@ -280,10 +270,15 @@ jobs:
280270
name: "Install Dependencies"
281271
environment:
282272
# By this point we should no longer need an index.
283-
PIP_NO_INDEX: "1"
273+
## PIP_NO_INDEX: "1"
284274
command: |
285275
python -m pip install .[testenv] .[test]
286276
277+
- "run":
278+
name: "Display tool versions"
279+
command: |
280+
python misc/build_helpers/show-tool-versions.py
281+
287282
- "run":
288283
name: "Run Unit Tests"
289284
environment:
@@ -540,37 +535,6 @@ jobs:
540535
<<: *UTF_8_ENVIRONMENT
541536
TAHOE_LAFS_TOX_ENVIRONMENT: "py310"
542537

543-
oraclelinux-8: &RHEL_DERIV
544-
docker:
545-
- <<: *DOCKERHUB_AUTH
546-
image: "tahoelafsci/oraclelinux:8-py3.8"
547-
user: "nobody"
548-
549-
environment:
550-
<<: *UTF_8_ENVIRONMENT
551-
TAHOE_LAFS_TOX_ENVIRONMENT: "py38"
552-
553-
# pip cannot install packages if the working directory is not readable.
554-
# We want to run a lot of steps as nobody instead of as root.
555-
working_directory: "/tmp/project"
556-
557-
steps:
558-
- "checkout"
559-
- run: *SETUP_VIRTUALENV
560-
- run: *RUN_TESTS
561-
- store_test_results: *STORE_TEST_RESULTS
562-
- store_artifacts: *STORE_TEST_LOG
563-
- store_artifacts: *STORE_ELIOT_LOG
564-
- store_artifacts: *STORE_OTHER_ARTIFACTS
565-
- run: *SUBMIT_COVERAGE
566-
567-
fedora-35:
568-
<<: *RHEL_DERIV
569-
docker:
570-
- <<: *DOCKERHUB_AUTH
571-
image: "tahoelafsci/fedora:35-py3"
572-
user: "nobody"
573-
574538
nixos:
575539
parameters:
576540
nixpkgs:
@@ -592,15 +556,12 @@ jobs:
592556
buildSteps:
593557
- "run":
594558
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
595563
command: |
596-
source .circleci/lib.sh
597-
598-
# Translate the nixpkgs selection into a flake reference we
599-
# can use to override the default nixpkgs input.
600-
NIXPKGS=$(nixpkgs_flake_reference <<parameters.nixpkgs>>)
601-
602-
cache_if_able nix run \
603-
--override-input nixpkgs "$NIXPKGS" \
564+
nix run \
604565
.#<<parameters.pythonVersion>>-unittest -- \
605566
--jobs $UNITTEST_CORES \
606567
allmydata
@@ -698,14 +659,6 @@ jobs:
698659
PYTHON_VERSION: "3.10"
699660

700661

701-
build-image-oraclelinux-8:
702-
<<: *BUILD_IMAGE
703-
704-
environment:
705-
DISTRO: "oraclelinux"
706-
TAG: "8"
707-
PYTHON_VERSION: "3.8"
708-
709662
build-image-fedora-35:
710663
<<: *BUILD_IMAGE
711664

@@ -730,20 +683,16 @@ executors:
730683
# requirements and goals.
731684
# https://circleci.com/developer/orbs/orb/circleci/windows#executors-server-2022
732685
machine:
733-
image: "windows-server-2022-gui:2023.06.1"
686+
image: "windows-server-2022-gui:current"
734687
shell: "powershell.exe -ExecutionPolicy Bypass"
735688
resource_class: "windows.large"
736689

737690
nix:
738691
docker:
739692
# Run in a highly Nix-capable environment.
740693
- <<: *DOCKERHUB_AUTH
741-
image: "nixos/nix:2.16.1"
694+
image: "nixos/nix:2.25.3"
742695
environment:
743-
# CACHIX_AUTH_TOKEN is manually set in the CircleCI web UI and allows us
744-
# to push to CACHIX_NAME. CACHIX_NAME tells cachix which cache to push
745-
# to.
746-
CACHIX_NAME: "tahoe-lafs-opensource"
747696
# Let us use features marked "experimental". For example, most/all of
748697
# the `nix <subcommand>` forms.
749698
NIX_CONFIG: "experimental-features = nix-command flakes"
@@ -766,42 +715,21 @@ commands:
766715
type: "steps"
767716

768717
steps:
769-
- "run":
770-
# Get cachix for Nix-friendly caching.
771-
name: "Install Basic Dependencies"
772-
command: |
773-
# Get some build environment dependencies and let them float on a
774-
# certain release branch. These aren't involved in the actual
775-
# package build (only in CI environment setup) so the fact that
776-
# they float shouldn't hurt reproducibility.
777-
NIXPKGS="nixpkgs/nixos-23.05"
778-
nix profile install $NIXPKGS#cachix $NIXPKGS#bash $NIXPKGS#jp
779-
780-
# Activate our cachix cache for "binary substitution". This sets
781-
# up configuration tht lets Nix download something from the cache
782-
# instead of building it locally, if possible.
783-
cachix use "${CACHIX_NAME}"
784-
785718
- "checkout"
786719

787-
- "run":
788-
# The Nix package doesn't know how to do this part, unfortunately.
789-
name: "Generate version"
790-
command: |
791-
nix-shell \
792-
-p 'python3.withPackages (ps: [ ps.setuptools ])' \
793-
--run 'python setup.py update_version'
794-
795720
- "run":
796721
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
797728
command: |
798-
source .circleci/lib.sh
799-
NIXPKGS=$(nixpkgs_flake_reference <<parameters.nixpkgs>>)
800-
cache_if_able nix build \
729+
nix build \
801730
--verbose \
802731
--print-build-logs \
803732
--cores "$DEPENDENCY_CORES" \
804-
--override-input nixpkgs "$NIXPKGS" \
805733
.#<<parameters.pythonVersion>>-tahoe-lafs
806734
807735
- steps: "<<parameters.buildSteps>>"

.circleci/create-virtualenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ virtualenv --python "${PYTHON}" "${BOOTSTRAP_VENV}"
2626
PIP="${BOOTSTRAP_VENV}/bin/pip"
2727

2828
# Tell pip where it can find any existing wheels.
29-
export PIP_FIND_LINKS="file://${WHEELHOUSE_PATH}"
29+
##export PIP_FIND_LINKS="file://${WHEELHOUSE_PATH}"
3030

3131
# Get "certifi" to avoid bug #2913. Basically if a `setup_requires=...` causes
3232
# a package to be installed (with setuptools) then it'll fail on certain

.circleci/lib.sh

Lines changed: 0 additions & 148 deletions
This file was deleted.

.circleci/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ TIMEOUT="timeout --kill-after 1m 45m"
6767
# via tox and then scraping it out is hideous and failure prone.
6868
export SUBUNITREPORTER_OUTPUT_PATH="${SUBUNIT2}"
6969
export TAHOE_LAFS_TRIAL_ARGS="${TAHOE_LAFS_TRIAL_ARGS:---reporter=subunitv2-file --rterrors}"
70-
export PIP_NO_INDEX="1"
70+
##export PIP_NO_INDEX="1"
7171

7272
# Make output unbuffered, so progress reports from subunitv2-file get streamed
7373
# and notify CircleCI we're still alive.

0 commit comments

Comments
 (0)