-
Notifications
You must be signed in to change notification settings - Fork 35
Fix python examples fail #108
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ecd2dca
fix: add margin check
yuejiaointel 90ee121
fix: margin check for other python files and cpp tests check in pipeline
yuejiaointel 86f1172
feature: new pipeline for python example tests
yuejiaointel 9cf65a1
fix: use assert equal
yuejiaointel 242c6dc
fix: license header
yuejiaointel 2c8181d
ci-test
yuejiaointel 4a74e86
fix: remove added file add in cibuildwheel instead
yuejiaointel fb09083
fix: format
yuejiaointel 62e903b
fix: remove unsed var
yuejiaointel 88a6acd
Merge branch 'main' into fix_python_examples_fail
mihaic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,84 @@ | ||
| # Copyright 2025 Intel Corporation | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: Python Test | ||
| run-name: ${{ github.event.inputs.run_name || github.event.pull_request.title }} | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| # This allows a subsequently queued workflow run to interrupt previous runs | ||
| concurrency: | ||
| group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| python-build: | ||
| name: ${{ matrix.cxx }} | ||
| runs-on: self-hosted | ||
| strategy: | ||
| matrix: | ||
| cxx: | ||
| - g++-11 | ||
| - clang++-13 | ||
| include: | ||
| - cxx: g++-11 | ||
| cc: gcc-11 | ||
| - cxx: clang++-13 | ||
| cc: clang-13 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install MKL | ||
| timeout-minutes: 5 | ||
| run: | | ||
| .github/scripts/setup_apt_repo_linux.sh | ||
| sudo apt install intel-oneapi-mkl intel-oneapi-mkl-devel | ||
| # Setup environment variables for building against MKL. | ||
| # Persist the environment variables for use across multiple subsequent actions. | ||
| source /opt/intel/oneapi/setvars.sh | ||
| printenv >> $GITHUB_ENV | ||
|
|
||
| # Install inside the temporary working directory. | ||
| - name: Build Wheel | ||
| env: | ||
| CXX: ${{ matrix.cxx }} | ||
| CC: ${{ matrix.cc }} | ||
| TEMP_WORKSPACE: ${{ runner.temp }}/usr | ||
| run: | | ||
| cd ${GITHUB_WORKSPACE}/bindings/python | ||
| python setup.py bdist_wheel --cmake-executable="cmake" --build-type=RelWithDebugInfo -- -- -j$(nproc) | ||
| pip install ./dist/scalable_vs*.whl --target=${TEMP_WORKSPACE} | ||
|
|
||
| # Make sure to add the location of the generated wheel to the python path. | ||
| - name: Run tests | ||
| env: | ||
| PYTHONPATH: ${{ runner.temp }}/usr | ||
| CTEST_OUTPUT_ON_FAILURE: 1 | ||
| working-directory: ${{ runner.temp }} | ||
| run: python -m unittest discover -s ${GITHUB_WORKSPACE}/bindings/python | ||
|
|
||
| - name: Run examples | ||
| env: | ||
| PYTHONPATH: ${{ runner.temp }}/usr | ||
| CTEST_OUTPUT_ON_FAILURE: 1 | ||
| working-directory: ${{ runner.temp }} | ||
| run: python -m unittest discover -p "example*.py" -s ${GITHUB_WORKSPACE}/examples/python | ||
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.