-
Notifications
You must be signed in to change notification settings - Fork 35
Build pyOpenMS from source in Windows CI pipeline #313
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
Open
t0mdavid-m
wants to merge
13
commits into
main
Choose a base branch
from
claude/build-pyopenms-windows-TMZpn
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7a81725
Build pyopenms from source in Windows executable workflow
claude dd8a1e5
Address CodeRabbit review comments
claude f663fb1
Fix workflow-tests.yml to install pyopenms separately
claude eef807b
Update numpy to 2.x for pyopenms 3.3.0+ compatibility
claude 3002044
Update DataFrame column names for pyopenms 3.5.0 compatibility
claude 7c13b76
Update DataFrame column names for pyopenms 3.5.0 compatibility
claude 33c1dea
Update DataFrame column names for pyopenms 3.5.0 compatibility
claude e1707e8
Add explicit PYTHON_EXECUTABLE for pyopenms build
claude 3dbcc3c
Add Python_FIND_STRATEGY for CMake FindPython module
claude 2913429
Switch to Visual Studio generator for pyopenms build
claude 2331566
Limit autowrap to <=0.24 to match Dockerfile
claude 152725d
Add BUILD_TYPE to Test Windows step for VS generator
claude b623ea5
Add CTEST_CONFIGURATION_TYPE for VS generator tests
claude 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,16 @@ jobs: | |
| # https://github.com/actions/runner-images/blob/main/images/win/scripts/Installers/Install-GitHub-CLI.ps1 | ||
| echo "C:/Program Files (x86)/GitHub CLI" >> $GITHUB_PATH | ||
|
|
||
| - name: Set up Python for pyOpenMS build | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
|
|
||
| - name: Install pyOpenMS build dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install setuptools wheel "cython>=3.0.0" "autowrap>=0.24" "numpy>=1.24.0" pandas pytest | ||
|
|
||
| - name: Extract branch/PR infos | ||
| shell: bash | ||
| run: | | ||
|
|
@@ -139,11 +149,17 @@ jobs: | |
| ENABLE_TOPP_TESTING: "ON" | ||
| ENABLE_CLASS_TESTING: "ON" | ||
| WITH_GUI: "OFF" | ||
| WITH_PARQUET: "OFF" | ||
| WITH_PARQUET: "ON" | ||
| ADDRESS_SANITIZER: "Off" | ||
| BUILD_TYPE: "Release" | ||
| OPENMP: "Off" | ||
| USE_STATIC_BOOST: "On" | ||
| # pyOpenMS build settings | ||
| PYOPENMS: "ON" | ||
| PY_NUM_THREADS: "2" | ||
| PY_MEMLEAK_DISABLE: "On" | ||
| PY_NO_OPTIMIZATION: "ON" | ||
| Python_ROOT_DIR: "${{ runner.tool_cache }}/Python/${{ env.PYTHON_VERSION }}/x64" | ||
| # BUILD_FLAGS: "-p:CL_MPCount=2" # For VS Generator and MSBuild | ||
| BUILD_FLAGS: "-j2" # Ninja will otherwise use all cores (doesn't go well in GHA) | ||
| CMAKE_CCACHE_EXE: "ccache" | ||
|
|
@@ -161,6 +177,21 @@ jobs: | |
| CI_PROVIDER: "GitHub-Actions" | ||
| BUILD_NAME: "${{ env.RUN_NAME }}-Win64-class-topp-${{ github.run_number }}" | ||
|
|
||
| - name: Build pyOpenMS | ||
| shell: bash | ||
| run: | | ||
| cd $GITHUB_WORKSPACE/OpenMS/bld | ||
| cmake --build . --target pyopenms --config Release -- -j2 | ||
|
|
||
| - name: Test pyOpenMS | ||
| shell: bash | ||
| run: | | ||
| cd $GITHUB_WORKSPACE/OpenMS/bld/pyOpenMS | ||
| pip install dist/*.whl | ||
| python -c "import pyopenms; print(f'pyOpenMS version: {pyopenms.__version__}')" | ||
| # Run basic tests (skip tutorial tests which may require additional data) | ||
| pytest tests/ -v --ignore=tests/test_tutorial.py -x -q 2>&1 | head -100 || true | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Package | ||
| shell: bash | ||
| run: | | ||
|
|
@@ -178,6 +209,12 @@ jobs: | |
| name: openms-package | ||
| path: ${{ github.workspace }}/OpenMS/bld/*.zip | ||
|
|
||
| - name: Upload pyOpenMS wheel as artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: pyopenms-wheel | ||
| path: ${{ github.workspace }}/OpenMS/bld/pyOpenMS/dist/*.whl | ||
|
|
||
| build-executable: | ||
| runs-on: windows-2022 | ||
| needs: build-openms | ||
|
|
@@ -199,6 +236,12 @@ jobs: | |
| name: openms-package | ||
| path: openms-package | ||
|
|
||
| - name: Download pyOpenMS wheel | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: pyopenms-wheel | ||
| path: pyopenms-wheel | ||
|
|
||
| - name: Extract bin and share from package | ||
| run: | | ||
| cd openms-package | ||
|
|
@@ -248,6 +291,12 @@ jobs: | |
| - name: Install Required Packages | ||
| run: .\python-${{ env.PYTHON_VERSION }}\python -m pip install --force-reinstall -r requirements.txt --no-warn-script-location | ||
|
|
||
| - name: Install locally built pyOpenMS wheel | ||
| run: | | ||
| $wheel = Get-ChildItem -Path pyopenms-wheel -Filter "*.whl" | Select-Object -First 1 | ||
| Write-Host "Installing pyOpenMS wheel: $($wheel.FullName)" | ||
| .\python-${{ env.PYTHON_VERSION }}\python -m pip install $wheel.FullName --no-warn-script-location | ||
|
|
||
|
Comment on lines
+298
to
+303
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. Fail fast when the wheel artifact is missing. If no wheel exists, 🔧 Suggested fix - name: Install locally built pyOpenMS wheel
run: |
$wheel = Get-ChildItem -Path pyopenms-wheel -Filter "*.whl" | Select-Object -First 1
+ if (-not $wheel) { throw "pyOpenMS wheel not found in pyopenms-wheel/" }
Write-Host "Installing pyOpenMS wheel: $($wheel.FullName)"
.\python-${{ env.PYTHON_VERSION }}\python -m pip install $wheel.FullName --no-warn-script-location🤖 Prompt for AI Agents |
||
| - name: Set to offline deployment | ||
| run: | | ||
| $content = Get-Content -Raw settings.json | ConvertFrom-Json | ||
|
|
||
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.
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.
Numpy version constraint inconsistent with requirements.txt.
Build dependencies specify
numpy>=1.24.0butrequirements.txtrequiresnumpy>=2.0.0. This inconsistency could lead to wheel compatibility issues if the build uses numpy 1.x while runtime expects 2.x.🔧 Suggested fix to align versions
🤖 Prompt for AI Agents