Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ improve CI/CD and package itself #322

Merged
merged 69 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
a511ab4
add reusable ci workflow
nquetschlich Apr 21, 2024
00f5469
🩹
nquetschlich Apr 21, 2024
3b6f41a
📦 adjusted package structure
nquetschlich Apr 21, 2024
58f397b
👷 improved nox file
nquetschlich Apr 21, 2024
b2bb8ee
✅ adjusted tests to run faster
nquetschlich Apr 21, 2024
495a087
✅ added wheel requirement
nquetschlich Apr 21, 2024
233bcb6
✅ adjusted nox file
nquetschlich Apr 21, 2024
231fde7
🎨 replace absolute imports with relative imports
burgholzer Apr 21, 2024
e7bef99
🔥 remove redundant global variable
burgholzer Apr 21, 2024
4b2515a
🩹 make zip file path platform independent
burgholzer Apr 21, 2024
4a260f2
🩹 proper package minimums
burgholzer Apr 21, 2024
36e54b5
Merge branch 'main' into add_reusable_workflows
burgholzer Apr 21, 2024
d978c26
🩹 fix merge
burgholzer Apr 21, 2024
9920084
🔧 even better minimums
burgholzer Apr 21, 2024
93a1ebf
🚨 ignore deprecation warning from docutils
burgholzer Apr 21, 2024
1887b44
🔧 simplify CodeQL workflow call
burgholzer Apr 21, 2024
2a703b1
🔥 remove superfluous workflow runs
burgholzer Apr 21, 2024
40ffd13
⚗️ maybe now
burgholzer Apr 21, 2024
caf8bf2
📦 went back to absolute imports
nquetschlich Apr 21, 2024
c17cf1f
✨ use reusable CD workflow
burgholzer Apr 22, 2024
fbde4da
🩹 fix pre-generated zip workflow
burgholzer Apr 22, 2024
a500124
🎨 adjusted path handling
nquetschlich Apr 22, 2024
05a1200
🚨 added to be ignored warning
nquetschlich Apr 22, 2024
b01057b
Merge remote-tracking branch 'cda-tum/add_reusable_workflows' into ad…
burgholzer Apr 22, 2024
7f77c0f
🎨 more concise GitHub token
burgholzer Apr 22, 2024
726f3b6
⚗️ try new workflows
burgholzer Apr 22, 2024
a7ae645
🩹 fix tests maybe
nquetschlich Apr 22, 2024
a169318
🎨 pre-commit fixes
pre-commit-ci[bot] Apr 22, 2024
fda4d4e
🐛 try to find the correct warning to ignore
nquetschlich Apr 22, 2024
67d930a
👷 adjusted reusable workflow version
nquetschlich Apr 23, 2024
c61a803
✅ hopefully fixed test
nquetschlich Apr 23, 2024
98d3a93
💡 added warning to be ignored
nquetschlich Apr 23, 2024
c527d91
👷 adjusted nox file
nquetschlich Apr 23, 2024
b596059
🐛 removed unit divisor
nquetschlich Apr 23, 2024
133e221
🐛 removed unit divisor
nquetschlich Apr 23, 2024
81985f9
📌 adjusted setuptools dependency
nquetschlich Apr 23, 2024
95a4376
📌 added numpy dep
nquetschlich Apr 23, 2024
236c7ae
📌 adjusted deps
nquetschlich Apr 23, 2024
7a069c0
📌 adjusted deps
nquetschlich Apr 23, 2024
8a76098
📌 adjusted deps
nquetschlich Apr 23, 2024
dfc50f6
🩹 try to fix install setup on windows
nquetschlich Apr 23, 2024
dd644d7
💡improved importerror message
nquetschlich Apr 23, 2024
3197b02
📌 adjusted qiskit_nature dep
nquetschlich Apr 23, 2024
1a08d9f
📌 adjusted qiskit_nature/pyscf dep
nquetschlich Apr 23, 2024
0ea6afe
✅ adjusted test
nquetschlich Apr 23, 2024
ba592b3
🔥 removed zip function since so far the zip has been created manually…
nquetschlich Apr 23, 2024
0fa5d13
✅ added test for win and groundstate
nquetschlich Apr 23, 2024
cb7c52a
📌 removed unnecessary dependency
nquetschlich Apr 23, 2024
e1b98f7
💡 adjusted Error Type and removed redundant test
nquetschlich Apr 23, 2024
ba5569e
🩹 deactivate timeout for windows
nquetschlich Apr 23, 2024
a8e7c98
🩹 adjusted timeout behavior and test for windows
nquetschlich Apr 23, 2024
7bca573
🩹 adjusted timeout behavior and test for windows
nquetschlich Apr 23, 2024
d22dad5
📌 adjusted qiskit_nature dep
nquetschlich Apr 23, 2024
bc7e8e1
🔥 removed repo structure from readme
nquetschlich Apr 23, 2024
d8f05b6
💡 added MQT statement in readme
nquetschlich Apr 23, 2024
10d9a95
🩹 fixed pyscf windows handling
nquetschlich Apr 23, 2024
a37f05c
🎨 simplified util function
nquetschlich Apr 23, 2024
b5b1b77
✅ try to fix windows test
nquetschlich Apr 23, 2024
5c8f980
✅ try to fix windows test
nquetschlich Apr 23, 2024
c3969ba
✅ try to fix windows test
nquetschlich Apr 23, 2024
464431a
Merge branch 'main' into add_reusable_workflows
nquetschlich Apr 24, 2024
e455df7
✅ accelerated test by simplification
nquetschlich Apr 24, 2024
8545f11
🎨 removed dead code
nquetschlich Apr 24, 2024
291a52c
Update README.md
nquetschlich Apr 24, 2024
62a09c4
💡 adjusted error msg
nquetschlich Apr 24, 2024
4201b26
👷 trigger codecov only after all reports are there
nquetschlich Apr 24, 2024
9fe20a1
👷 trigger codecov only after all reports are there
nquetschlich Apr 24, 2024
6f71837
👷 trigger codecov only after all reports are there
nquetschlich Apr 24, 2024
aa0d884
🔥 removed superfluous test
nquetschlich Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CD
on:
release:
types: [published]
workflow_dispatch:

jobs:
python-packaging:
name: 🐍 Packaging
uses: cda-tum/mqt-core/.github/workflows/reusable-python-packaging.yml@v2.4.1
with:
pure-python: true

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.bench
permissions:
id-token: write
needs: [python-packaging]
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1

upload_webserver:
if: github.event_name == 'release' && github.event.action == 'published'
name: 🚀 Deploy to Webserver
needs: deploy
runs-on: ubuntu-latest
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS }}
CDA_HOST_NAME: tueicda-cda.srv.mwn.de
CDA_USER_NAME: web-user
CDA_TARGET_DIR: /var/www/cda/app/mqtbench/
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create version file
run: |
echo "version = \"$(git describe --tags --always)\"" > mqtbench_version.txt
- name: Setup SSH via the stored Action Secrets
run: |
mkdir -p ~/.ssh
echo "${KNOWN_HOSTS}" >> ~/.ssh/known_hosts
echo "${DEPLOY_KEY}" > ~/.ssh/my_rsync_key
echo "IdentityFile ~/.ssh/my_rsync_key" >> ~/.ssh/config
chmod -R 700 ~/.ssh
- name: Copy version file to the webserver
working-directory: ${{ github.workspace }}
run: |
rsync -avz -e ssh mqtbench_version.txt ${CDA_USER_NAME}@${CDA_HOST_NAME}:${CDA_TARGET_DIR}/mqtbench_version.txt
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
change-detection:
name: 🔍 Change
uses: cda-tum/mqt-core/.github/workflows/reusable-change-detection.yml@v2.4.1

python-tests:
name: 🐍 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: cda-tum/mqt-core/.github/workflows/reusable-python-ci.yml@v2.4.1
secrets:
token: ${{ secrets.CODECOV_TOKEN }}

code-ql:
name: 📝 CodeQL
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-code-ql)
uses: cda-tum/mqt-core/.github/workflows/reusable-code-ql-python.yml@v2.4.1

required-checks-pass: # This job does nothing and is only used for branch protection
name: 🚦 Check
if: always()
needs:
- change-detection
- python-tests
- code-ql
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
allowed-skips: >-
${{
fromJSON(needs.change-detection.outputs.run-python-tests)
&& '' || 'python-tests,'
}}
${{
fromJSON(needs.change-detection.outputs.run-code-ql)
&& '' || 'code-ql,'
}}
jobs: ${{ toJSON(needs) }}
44 changes: 0 additions & 44 deletions .github/workflows/codeql.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/coverage.yml

This file was deleted.

101 changes: 0 additions & 101 deletions .github/workflows/deploy.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/mypy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
6 changes: 2 additions & 4 deletions .github/workflows/test_pregenerated_zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
- name: Install MQT Predictor
run: pip install .[test]
- name: Run tests
run: |
pip install pytest
pytest -v tests/compilation/test_pregenerated_zip.py
run: pytest -v tests/compilation/test_pregenerated_zip.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ repos:
hooks:
- id: codespell
args: ["-L", "wille,linz,fro"]
exclude: "mqt/benchviewer/templates/legal.html"
exclude: "mqt/bench/viewer/templates/legal.html"

# Format configuration files with prettier
- repo: https://github.com/pre-commit/mirrors-prettier
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

MQT Bench is a quantum circuit benchmark suite with cross-level support, i.e., providing the same benchmark algorithms for different abstraction levels throughout the quantum computing
software stack.
MQT Bench is part of the [_Munich Quantum Toolkit_ (_MQT_)](https://mqt.readthedocs.io) by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/).
nquetschlich marked this conversation as resolved.
Show resolved Hide resolved

<p align="center">
<a href="https://mqt.readthedocs.io/projects/bench">
Expand Down Expand Up @@ -51,15 +52,6 @@ print(qc_algorithmic_level.draw())

**Detailed documentation and examples are available at [ReadTheDocs](https://mqt.readthedocs.io/projects/bench).**

# Repository Structure

- src/mqt/: main source directory
- bench: Directory for the MQT Bench package
- bench/benchmarks: Directory for the benchmarks
- benchviewer: Directory for the webpage (which can be started locally and is also hosted at
[https://www.cda.cit.tum.de/mqtbench/](https://www.cda.cit.tum.de/mqtbench/))
- tests: Directory for the tests for MQT Bench

## Acknowledgements

The Munich Quantum Toolkit has been supported by the European
Expand Down
Loading
Loading