mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 18:06:46 +00:00
Merge pull request #658 from tahoe-lafs/3251.python3-tahoe-depgraph
Generate module dependency graph data (wrt Python 3 porting) on CI.
This commit is contained in:
commit
31bbe67038
@ -41,6 +41,10 @@ workflows:
|
|||||||
# integration tests.
|
# integration tests.
|
||||||
- "debian-9"
|
- "debian-9"
|
||||||
|
|
||||||
|
# Generate the underlying data for a visualization to aid with Python 3
|
||||||
|
# porting.
|
||||||
|
- "build-porting-depgraph"
|
||||||
|
|
||||||
images:
|
images:
|
||||||
# Build the Docker images used by the ci jobs. This makes the ci jobs
|
# Build the Docker images used by the ci jobs. This makes the ci jobs
|
||||||
# faster and takes various spurious failures out of the critical path.
|
# faster and takes various spurious failures out of the critical path.
|
||||||
@ -292,6 +296,33 @@ jobs:
|
|||||||
- store_artifacts: *STORE_OTHER_ARTIFACTS
|
- store_artifacts: *STORE_OTHER_ARTIFACTS
|
||||||
- run: *SUBMIT_COVERAGE
|
- run: *SUBMIT_COVERAGE
|
||||||
|
|
||||||
|
# Generate up-to-date data for the dependency graph visualizer.
|
||||||
|
build-porting-depgraph:
|
||||||
|
# Get a system in which we can easily install Tahoe-LAFS and all its
|
||||||
|
# dependencies. The dependency graph analyzer works by executing the code.
|
||||||
|
# It's Python, what do you expect?
|
||||||
|
<<: *DEBIAN
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- "checkout"
|
||||||
|
|
||||||
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
# Jean-Paul Calderone <exarkun@twistedmatrix.com> (CircleCI depgraph key)
|
||||||
|
# This lets us push to tahoe-lafs/tahoe-depgraph in the next step.
|
||||||
|
- "86:38:18:a7:c0:97:42:43:18:46:55:d6:21:b0:5f:d4"
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: "Setup Python Environment"
|
||||||
|
command: |
|
||||||
|
/tmp/venv/bin/pip install -e /tmp/project
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: "Generate dependency graph data"
|
||||||
|
command: |
|
||||||
|
. /tmp/venv/bin/activate
|
||||||
|
./misc/python3/depgraph.sh
|
||||||
|
|
||||||
build-image: &BUILD_IMAGE
|
build-image: &BUILD_IMAGE
|
||||||
# This is a template for a job to build a Docker image that has as much of
|
# This is a template for a job to build a Docker image that has as much of
|
||||||
# the setup as we can manage already done and baked in. This cuts down on
|
# the setup as we can manage already done and baked in. This cuts down on
|
||||||
|
34
misc/python3/depgraph.sh
Executable file
34
misc/python3/depgraph.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
if [ "${CIRCLE_BRANCH}" != "master" ]; then
|
||||||
|
echo "Declining to update dependency graph for non-master build."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
TAHOE="${PWD}"
|
||||||
|
git clone -b gh-pages git@github.com:tahoe-lafs/tahoe-depgraph.git
|
||||||
|
cd tahoe-depgraph
|
||||||
|
|
||||||
|
# Generate the maybe-changed data.
|
||||||
|
python tahoe-depgraph.py "${TAHOE}"
|
||||||
|
|
||||||
|
if git diff-index --quiet HEAD; then
|
||||||
|
echo "Declining to commit without any changes."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
git config user.name 'Build Automation'
|
||||||
|
git config user.email 'tahoe-dev@tahoe-lafs.org'
|
||||||
|
|
||||||
|
git add tahoe-deps.json tahoe-ported.json.
|
||||||
|
git commit -m "\
|
||||||
|
Built from ${CIRCLE_REPOSITORY_URL}@${CIRCLE_SHA1}
|
||||||
|
|
||||||
|
tahoe-depgraph was $(git rev-parse HEAD)
|
||||||
|
"
|
||||||
|
|
||||||
|
# Publish it on GitHub.
|
||||||
|
git push -q origin gh-pages
|
1
misc/python3/ported-modules.txt
Normal file
1
misc/python3/ported-modules.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
allmydata.util.namespace
|
1
newsfragments/3152.other
Normal file
1
newsfragments/3152.other
Normal file
@ -0,0 +1 @@
|
|||||||
|
Progress towards Python 3 compatibility is now visible at <https://tahoe-lafs.github.io/tahoe-depgraph/>.
|
Loading…
x
Reference in New Issue
Block a user