mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
Add a CI job which runs depgraph.
It can also push the results to GitHub pages.
This commit is contained in:
parent
183385a94b
commit
42a01f0046
@ -41,6 +41,10 @@ workflows:
|
||||
# # integration tests.
|
||||
# - "debian-9"
|
||||
|
||||
# Generate the underlying data for a visualization to aid with Python 3
|
||||
# porting.
|
||||
- "build-porting-depgraph"
|
||||
|
||||
images:
|
||||
# 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.
|
||||
@ -292,6 +296,18 @@ jobs:
|
||||
- store_artifacts: *STORE_OTHER_ARTIFACTS
|
||||
- run: *SUBMIT_COVERAGE
|
||||
|
||||
build-porting-depgraph:
|
||||
# Generate up-to-date data for the dependency graph visualizer.
|
||||
docker:
|
||||
- image: "python:3.7-buster"
|
||||
|
||||
steps:
|
||||
- "checkout"
|
||||
- run:
|
||||
name: "Generate dependency graph data"
|
||||
command: |
|
||||
./misc/python3/depgraph.sh
|
||||
|
||||
build-image: &BUILD_IMAGE
|
||||
# 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
|
||||
|
35
misc/python3/depgraph.sh
Normal file
35
misc/python3/depgraph.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/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
|
||||
|
||||
git config user.name 'Build Automation'
|
||||
git config user.email 'tahoe-dev@tahoe-lafs.org'
|
||||
|
||||
TAHOE="${PWD}"
|
||||
git clone 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 --cached HEAD; then
|
||||
echo "Declining to commit without any changes."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Commit everything that changed. It should be tahoe-deps.json and
|
||||
# tahoe-ported.json.
|
||||
git commit -am "\
|
||||
Built from ${CIRCLE_REPOSITORY_URL}@${CIRCLE_SHA1}
|
||||
|
||||
tahoe-depgraph was $(git --git-dir ../.git rev-parse HEAD
|
||||
"
|
||||
|
||||
# Publish it on GitHub.
|
||||
git push -q origin gh-pages
|
Loading…
Reference in New Issue
Block a user