Repository navigation
multi environments ci workflow #697
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
base: main
Are you sure you want to change the base?
Changes from 14 commits
5582631
59491df
3915b30
43af38e
0361e72
e542519
575b74c
a37ece0
8e5c637
3ca7f34
4fd3965
860e9f1
50bda05
2bf06f7
86993af
e25f8a8
fd0bc28
a7c0fef
4a82dbb
1a2fbd6
f471ac7
c9ac6ed
713b74a
67fcd82
eff534b
704e862
bb5fdba
df19447
78ce8b6
2160e6c
6d450af
1f9af15
f7e816e
9d52d86
e8c2f8f
7a5f728
e191d2d
192eeff
3ec9c9c
e0a43e8
0259462
81aca70
63f3a40
8c05465
45942a8
7e81240
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,20 +19,59 @@ concurrency: | |
|
|
||
| jobs: | ||
| build: | ||
| name: Test Py${{ matrix.python-version }} (${{ matrix.test-group.name }}) | ||
| runs-on: ubuntu-latest | ||
| name: Test Py${{ matrix.python-version }} on ${{ matrix.os }} (${{ matrix.test-group.name }}) | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 120 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
| python-version: ["3.11.*", "3.12.*"] | ||
| test-group: | ||
| - name: core | ||
| paths: "tests/circuit_tests tests/core_tests tests/primitives_tests tests/jax_tests tests/test_typing.py" | ||
| - name: algorithms-and-integrations | ||
| paths: "tests/algorithms_tests tests/operators_tests tests/block_encodings_tests tests/interface_tests tests/stim_integration_tests" | ||
|
|
||
| # Default flags for Linux and macOS | ||
| pip-extras: ["[dev,catalyst,xdsl,iqm]"] | ||
| pytest-flags: [""] | ||
|
|
||
| steps: | ||
| # Inject Windows configurations explicitly into the matrix | ||
| include: | ||
| - os: windows-latest | ||
| python-version: "3.11.*" | ||
| test-group: | ||
| name: core | ||
| paths: "tests/circuit_tests tests/core_tests tests/primitives_tests tests/jax_tests tests/test_typing.py" | ||
| pip-extras: "[dev-windows,xdsl,iqm]" | ||
| pytest-flags: '-k "not test_catalyst_interface and not test_qubit_array_fusion"' | ||
|
|
||
| - os: windows-latest | ||
| python-version: "3.11.*" | ||
| test-group: | ||
| name: algorithms-and-integrations | ||
| paths: "tests/algorithms_tests tests/operators_tests tests/block_encodings_tests tests/interface_tests tests/stim_integration_tests" | ||
| pip-extras: "[dev-windows,xdsl,iqm]" | ||
| pytest-flags: '--ignore=tests/interface_tests/test_converter_qrisp_to_qml.py' | ||
|
|
||
| - os: windows-latest | ||
| python-version: "3.12.*" | ||
| test-group: | ||
| name: core | ||
| paths: "tests/circuit_tests tests/core_tests tests/primitives_tests tests/jax_tests tests/test_typing.py" | ||
| pip-extras: "[dev-windows,xdsl,iqm]" | ||
| pytest-flags: '-k "not test_catalyst_interface and not test_qubit_array_fusion"' | ||
|
|
||
| - os: windows-latest | ||
| python-version: "3.12.*" | ||
| test-group: | ||
| name: algorithms-and-integrations | ||
| paths: "tests/algorithms_tests tests/operators_tests tests/block_encodings_tests tests/interface_tests tests/stim_integration_tests" | ||
| pip-extras: "[dev-windows,xdsl,iqm]" | ||
| pytest-flags: '--ignore=tests/interface_tests/test_converter_qrisp_to_qml.py' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since a lot of these lines are repetitive, you could refactor them into unique lines where you do not have to write the python version by hand. See https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations and https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#using-a-multi-dimensional-matrix Also, I see certain OS are skipping some unit tests. I assume that module is incompatible with the OS? You should add a comment about each such that someone who edits the workflow in the future knows why the |
||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v6 | ||
|
|
@@ -42,7 +81,7 @@ jobs: | |
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -e ".[dev,catalyst,xdsl,iqm]" | ||
| pip install -e ".${{ matrix.pip-extras }}" | ||
| - name: Test with pytest (${{ matrix.test-group.name }}) | ||
| run: | | ||
| pytest ${{ matrix.test-group.paths }} | ||
| pytest ${{ matrix.test-group.paths }} ${{ matrix.pytest-flags }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,16 +74,23 @@ docs = [ | |
| dev-code-style = [ | ||
| "ruff", | ||
| ] | ||
| dev-testing = [ | ||
| dev-testing-windows = [ | ||
| "pytest==9.1.0", | ||
| "qiskit-aer", | ||
| "pyscf", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. simply curious: is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is, alongside
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good to know! Should we think about documenting this in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what I can see, there is no documentation about installing Qrisp in a Windows environment, so I think this is a great suggestion. We can discuss it in the software engineering meeting. |
||
| "cirq", | ||
| "tqecd", | ||
| ] | ||
| dev-testing = [ | ||
| "qrisp[dev-testing-windows]", | ||
| "pyscf", | ||
|
|
||
| ] | ||
| dev = [ | ||
| "qrisp[dev-code-style,dev-testing]", | ||
| ] | ||
| dev_windows = [ | ||
| "qrisp[dev-code-style, dev-testing-windows]", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/eclipse-qrisp/Qrisp" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not too sure if
dev-windowsis correct here? In the toml file, the group you defined isdev_windows. I am mostly confused why the CI did not raise an error here. maybe I am missing something here 😅There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, this is because of name normalization...will correct it