Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into wip-smt-na
Browse files Browse the repository at this point in the history
  • Loading branch information
ystade committed Nov 13, 2024
2 parents 42c9a53 + 422ac36 commit 5312aa8
Show file tree
Hide file tree
Showing 50 changed files with 2,833 additions and 183 deletions.
36 changes: 0 additions & 36 deletions .github/dependabot.yml

This file was deleted.

12 changes: 5 additions & 7 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,30 @@ categories:
- "feature"
- "enhancement"
- "usability"
- "refactor"
- title: "🐛 Bug Fixes"
labels:
- "bug"
- "fix"
- title: "📄 Documentation"
labels:
- "documentation"
- title: "🤖 CI"
labels:
- "continuous integration"
- title: "📦 Packaging"
labels:
- "packaging"
- title: "🧹 Code Quality"
labels:
- "code quality"
- title: "🤖 CI"
labels:
- "continuous integration"
- title: "⬆️ Dependencies"
collapse-after: 5
labels:
- "dependencies"
- "submodules"
- "github_actions"
- "pre-commit"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&'
version-resolver:
Expand All @@ -41,10 +43,6 @@ version-resolver:
labels:
- "patch"
default: patch
autolabeler:
- label: "dependencies"
title:
- "/update pre-commit hooks/i"

template: |
## 👀 What Changed
Expand Down
38 changes: 38 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: ["config:recommended", ":gitSignOff"],
prHourlyLimit: 10,
enabledManagers: ["github-actions", "pre-commit", "pep621"],
"pre-commit": {
enabled: true
},
lockFileMaintenance: {
"enabled": true,
// "automerge": true, disabled due to endless update loops caused by setuptools_scm
},
configMigration: true,
labels: ["dependencies"],
schedule: ["every weekend"],
packageRules: [
{
matchManagers: ["github-actions"],
addLabels: ["github-actions"],
commitMessagePrefix: "⬆\uFE0F\uD83D\uDC68\u200D\uD83D\uDCBB"
},
{
matchManagers: ["pep621"],
addLabels: ["python"],
commitMessagePrefix: "⬆\uFE0F\uD83D\uDC0D"
},
{
matchManagers: ["pre-commit"],
addLabels: ["pre-commit"],
commitMessagePrefix: "⬆\uFE0F\uD83E\uDE9D",
},
{
"description": "Automerge patch updates",
"matchUpdateTypes": ["patch"],
"automerge": true
}
]
}
54 changes: 41 additions & 13 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,61 @@
name: CD
on:
push:
branches: [main]
release:
types: [published]
workflow_dispatch:
pull_request:
paths:
- .github/workflows/cd.yml

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
attestations: write
contents: read
id-token: write

jobs:
# Builds the sdist and wheels on all supported platforms and uploads the resulting
# wheels as GitHub artifacts `dev-cibw-*`, `test-cibw-*`, or `cibw-*`, depending on
# whether the workflow is triggered from a PR, a push to main, or a release, respectively.
python-packaging:
name: 🐍 Packaging
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.3
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.4
with:
# Do not include local version information on pushes to main to facilitate TestPyPI uploads.
no-local-version: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
# Do not build emulated wheels on pushes to main to reduce runner load for CD.
build-emulated-wheels: ${{ github.ref != 'refs/heads/main' || github.event_name != 'push' }}
# Make sure Z3 is available
setup-z3: true
z3-version: 4.12.6 # 4.13.0 has incorrectly tagged manylinux wheels
# 4.13.0 has incorrectly tagged manylinux wheels
z3-version: 4.12.6

# Downloads the previously generated artifacts and deploys to TestPyPI on pushes to main
deploy-test-pypi:
name: 🚀 Deploy to Test PyPI
runs-on: ubuntu-latest
environment:
name: test-pypi
url: https://test.pypi.org/p/mqt.qmap
needs: [python-packaging]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/download-artifact@v4
with:
pattern: test-cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
attestations: true

# Downloads the previously generated artifacts and deploys to PyPI on published releases.
deploy:
if: github.event_name == 'release' && github.event.action == 'published'
name: 🚀 Deploy to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mqt.qmap
permissions:
id-token: write
attestations: write
contents: read
needs: [python-packaging]
steps:
- uses: actions/download-artifact@v4
Expand All @@ -38,7 +64,9 @@ jobs:
path: dist
merge-multiple: true
- name: Generate artifact attestation for sdist and wheel(s)
uses: actions/attest-build-provenance@v1.4.3
uses: actions/attest-build-provenance@v1.4.4
with:
subject-path: "dist/*"
- uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
26 changes: 20 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,50 @@ concurrency:
jobs:
change-detection:
name: 🔍 Change
uses: cda-tum/mqt-workflows/.github/workflows/reusable-change-detection.yml@v1.3
uses: cda-tum/mqt-workflows/.github/workflows/reusable-change-detection.yml@v1.4

cpp-tests:
name: 🇨‌ Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-ci.yml@v1.3
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-ci.yml@v1.4
with:
setup-z3: true

cpp-linter:
name: 🇨‌ Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-linter.yml@v1.3
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-linter.yml@v1.4
with:
setup-z3: true

python-tests:
name: 🐍 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-ci.yml@v1.3
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-ci.yml@v1.4
with:
skip-testing-latest-python: true
setup-z3: true

code-ql:
name: 📝 CodeQL
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-code-ql)
uses: cda-tum/mqt-workflows/.github/workflows/reusable-code-ql.yml@v1.3
uses: cda-tum/mqt-workflows/.github/workflows/reusable-code-ql.yml@v1.4
with:
setup-z3: true

cd:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.4
with:
setup-z3: true
# 4.13.0 has incorrectly tagged manylinux wheels
z3-version: 4.12.6

required-checks-pass: # This job does nothing and is only used for branch protection
name: 🚦 Check
if: always()
Expand All @@ -58,6 +67,7 @@ jobs:
- cpp-linter
- python-tests
- code-ql
- cd
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand All @@ -80,4 +90,8 @@ jobs:
fromJSON(needs.change-detection.outputs.run-code-ql)
&& '' || 'code-ql,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'cd,'
}}
jobs: ${{ toJSON(needs) }}
4 changes: 2 additions & 2 deletions .github/workflows/update-mqt-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ concurrency:
jobs:
update-mqt-core:
name: ⬆️ Update MQT Core
uses: cda-tum/mqt-workflows/.github/workflows/reusable-mqt-core-update.yml@v1.3
uses: cda-tum/mqt-workflows/.github/workflows/reusable-mqt-core-update.yml@v1.4
with:
update-to-head: ${{ github.event.inputs.update-to-head || false }}
update-to-head: ${{ github.event.inputs.update-to-head == 'true' }}
19 changes: 10 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
ci:
autoupdate_commit_msg: "⬆️🪝 update pre-commit hooks"
autofix_commit_msg: "🎨 pre-commit fixes"
autoupdate_schedule: quarterly
skip: [mypy]

repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -30,7 +31,7 @@ repos:

# Clean jupyter notebooks
- repo: https://github.com/srstevenson/nb-clean
rev: 3.3.0
rev: 4.0.1
hooks:
- id: nb-clean
args:
Expand All @@ -56,7 +57,7 @@ repos:

# Python linting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
rev: v0.7.3
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand All @@ -66,14 +67,14 @@ repos:

# Also run Black on examples in the documentation
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies: [black==24.*]

# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
files: ^(src/mqt|test/python|noxfile.py)
Expand All @@ -88,13 +89,13 @@ repos:

# Check for spelling
- repo: https://github.com/crate-ci/typos
rev: v1.24.5
rev: v1.27.3
hooks:
- id: typos

# Clang-format the C++ part of the code base automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
rev: v19.1.3
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down Expand Up @@ -133,14 +134,14 @@ repos:

# Check JSON schemata
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
rev: 0.29.4
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

# Check the pyproject.toml file
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2024.08.26
rev: 2024.10.21
hooks:
- id: validate-pyproject
1 change: 1 addition & 0 deletions .python_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
4 changes: 3 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ build:
then
exit 183;
fi
# Unshallow the git clone and fetch tags to get proper version information
- git fetch --unshallow --tags
pre_install:
- wget https://github.com/Z3Prover/z3/releases/download/z3-4.12.2/z3-4.12.2-x64-glibc-2.35.zip
- unzip z3-4.12.2-x64-glibc-2.35.zip

sphinx:
configuration: docs/source/conf.py
configuration: docs/conf.py

python:
install:
Expand Down
1 change: 1 addition & 0 deletions docs/Contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../.github/contributing.rst
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/Support.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../.github/support.rst
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
Loading

0 comments on commit 5312aa8

Please sign in to comment.