0.63.0 - "Epiphany" #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate Diagrams | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| diagrams: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| actions: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install Graphviz | |
| run: sudo apt-get update && sudo apt-get install -y graphviz | |
| - name: Install pyreverse dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Pin pylint to keep pyreverse output stable across releases | |
| python -m pip install "pylint==3.3.1" | |
| - name: Generate diagrams | |
| run: | | |
| mkdir -p docs/diagrams | |
| pyreverse -o png -p linux-benchmark lb_runner lb_controller lb_app lb_ui lb_analytics lb_provisioner -S | |
| # pyreverse naming differs across pylint versions; glob and normalize. | |
| shopt -s nullglob | |
| classes_png=(classes*.png) | |
| packages_png=(packages*.png) | |
| if [ ${#classes_png[@]} -eq 0 ] || [ ${#packages_png[@]} -eq 0 ]; then | |
| echo "pyreverse did not generate expected PNGs. Found:" | |
| ls -la | |
| exit 1 | |
| fi | |
| mv "${classes_png[0]}" docs/diagrams/classes.png | |
| mv "${packages_png[0]}" docs/diagrams/packages.png | |
| pyreverse -o puml -p linux-benchmark lb_runner lb_controller lb_app lb_ui lb_analytics lb_provisioner -S | |
| classes_puml=(classes*.puml) | |
| packages_puml=(packages*.puml) | |
| if [ ${#classes_puml[@]} -eq 0 ] || [ ${#packages_puml[@]} -eq 0 ]; then | |
| echo "pyreverse did not generate expected PUMLs. Found:" | |
| ls -la | |
| exit 1 | |
| fi | |
| mv "${classes_puml[0]}" docs/diagrams/classes.puml | |
| mv "${packages_puml[0]}" docs/diagrams/packages.puml | |
| - name: Upload diagrams artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: diagrams-${{ github.ref_name }} | |
| path: docs/diagrams | |
| if-no-files-found: error | |
| - name: Attach diagrams to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| docs/diagrams/*.png | |
| docs/diagrams/*.puml |