-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⬆️ update workflows and project configuration (#62)
- Loading branch information
Showing
11 changed files
with
2,453 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,57 @@ | ||
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/[email protected] | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
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' }} | ||
|
||
# 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.qudits | ||
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.qudits | ||
permissions: | ||
id-token: write | ||
attestations: write | ||
contents: read | ||
needs: [python-packaging] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,13 @@ 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: | ||
cmake-args: "" | ||
cmake-args-ubuntu: -G Ninja | ||
|
@@ -31,21 +31,25 @@ jobs: | |
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 | ||
|
||
python-tests: | ||
name: 🐍 Test | ||
needs: change-detection | ||
if: fromJSON(needs.change-detection.outputs.run-python-tests) | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
with: | ||
skip-testing-latest-python: true | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
|
||
code-ql: | ||
name: 📝 CodeQL | ||
needs: change-detection | ||
if: fromJSON(needs.change-detection.outputs.run-code-ql) | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
|
||
cd: | ||
name: 🚀 CD | ||
needs: change-detection | ||
if: fromJSON(needs.change-detection.outputs.run-cd) | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
|
||
required-checks-pass: # This job does nothing and is only used for branch protection | ||
name: 🚦 Check | ||
|
@@ -56,6 +60,7 @@ jobs: | |
- cpp-linter | ||
- python-tests | ||
- code-ql | ||
- cd | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
|
@@ -78,4 +83,8 @@ jobs: | |
fromJSON(needs.change-detection.outputs.run-code-ql) | ||
&& '' || 'code-ql,' | ||
}} | ||
${{ | ||
fromJSON(needs.change-detection.outputs.run-cd) | ||
&& '' || 'cd,' | ||
}} | ||
jobs: ${{ toJSON(needs) }} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.