Skip to content

Add dependabot to regularly update spack packages and refactor spack-matrix#32

Open
finsberg wants to merge 2 commits into
mainfrom
update-packages-and-generate-spack-matrix
Open

Add dependabot to regularly update spack packages and refactor spack-matrix#32
finsberg wants to merge 2 commits into
mainfrom
update-packages-and-generate-spack-matrix

Conversation

@finsberg
Copy link
Copy Markdown
Member

@finsberg finsberg commented May 17, 2026

Implement Automated Spack Package Dependabot and Dynamic CI Matrix

Description

This PR introduces a custom, automated "Dependabot-like" workflow for our Spack packages and heavily refactors the CI testing pipeline to be much more maintainable.

Previously, the CI matrix required copying and pasting large YAML blocks for every tested package, and tracking upstream package updates was a manual process. This PR solves both issues by introducing a JSON-driven CI matrix and a native Python updater script.

Key Changes & New Files

  • .github/workflows/spack-dependabot.yml: A new weekly scheduled workflow. It runs the package updater, formats the changes with ruff, and opens a PR natively using the GitHub CLI (gh).

  • .github/scripts/update_packages.py: The core updater script. It parses package.py files, queries GitHub and PyPI for newer releases, computes the sha256 checksums of the source tarballs, and safely injects the new versions into both the Spack package definitions and the CI configuration.

  • .github/ci-test-config.json: A new centralized configuration file containing the test targets, specs, and import names for all tested packages. Adding a new package to the CI now only requires adding it to this file.

  • .github/scripts/generate_matrix.py: A helper script that translates the JSON configuration into a dynamic matrix format compatible with GitHub Actions.

  • .github/workflows/spack-matrix.yml: Refactored the main testing workflow, leveraging the dynamically generated matrix.

Motivation and Context

Automates the tedious process of tracking upstream releases.

Ensures new versions are immediately and automatically tested against the dynamic CI matrix before merging.

Significantly reduces boilerplate YAML, making it much easier to add and manage tested packages moving forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant