Skip to content

Commit

Permalink
Merge branch 'qt6' of https://github.com/cbielow/OpenMS into qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
cbielow committed Jun 27, 2024
2 parents 576eb53 + 32de090 commit 36c9768
Show file tree
Hide file tree
Showing 55 changed files with 12,473 additions and 8,185 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/openms_ci_matrix_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,10 @@ jobs:

- name: Install Qt (Windows)
if: startsWith(matrix.os, 'windows')
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: '5.15.2' # 5.12.7 is broken https://bugreports.qt.io/browse/QTBUG-81715, > 5.15.2 is not available on official archives (https://github.com/miurahr/aqtinstall/issues/636)
version: '6.7.2'
cache: 'false'
aqtversion: '==3.1.*'
archives: 'qtsvg qtimageformats qtbase'

- name: Setup build tools (and system contrib on Linux and Mac)
Expand All @@ -234,7 +233,7 @@ jobs:
sudo add-apt-repository universe
sudo apt update
sudo apt-get -qq install -y build-essential cmake autoconf patch libtool git automake ninja-build xvfb ccache
sudo apt-get -qq install -y qtbase5-dev libqt5svg5-dev libqt5opengl5-dev
sudo apt-get -qq install -y qt6-base-dev libqt6svg6-dev libqt6opengl6-dev libqt6openglwidgets6 libgl-dev
sudo apt-get -qq install -y libeigen3-dev libboost-random-dev libboost-regex-dev libboost-iostreams-dev \
libboost-date-time-dev libboost-math-dev libxerces-c-dev zlib1g-dev libsvm-dev libbz2-dev coinor-libcoinmp-dev libhdf5-dev
Expand All @@ -246,18 +245,18 @@ jobs:
fi
if [[ "${{ matrix.os }}" == windows-* ]]; then
# Qt5_DIR set by Install Qt5 step
echo "cmake_prefix=$Qt5_DIR/lib/cmake;$Qt5_DIR" >> $GITHUB_OUTPUT
# QT_ROOT_DIR set by Install Qt step
echo "cmake_prefix=$QT_ROOT_DIR/lib/cmake;$QT_ROOT_DIR" >> $GITHUB_OUTPUT
choco install ccache ninja cmake -y --no-progress
## GH CLI "SHOULD BE" installed. Sometimes I had to manually install nonetheless. Super weird.
# 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
# Install eigen from choco
choco install eigen -y --no-progress
echo "eigen_choco=C:\ProgramData\chocolatey\lib\eigen\share\cmake" >> $GITHUB_OUTPUT
choco install doxygen.portable ghostscript graphviz -y --no-progress
if [[ "${{ steps.set-vars.outputs.pkg_type }}" != "none" ]]; then
choco install doxygen.portable ghostscript graphviz -y --no-progress
# uses a custom NSIS, which provides 8-k string support and has UltraModernUI integrated already
curl --no-progress-meter -L -o NSIS.tar.gz https://github.com/OpenMS/NSIS/raw/main/NSIS.tar.gz
## overwrite existing NSIS (which has only 1k-string support)
Expand All @@ -269,12 +268,9 @@ jobs:
## Needed for Qt. Install before to overwrite the default softlinks on the GH runners
brew install python3 --force --overwrite
brew install --quiet ccache autoconf automake libtool ninja && brew link --overwrite ccache
brew install libsvm xerces-c boost eigen sqlite coinutils cbc cgl clp qt@5
echo "cmake_prefix=$(brew --prefix qt@5)/lib/cmake;$(brew --prefix qt@5)" >> $GITHUB_OUTPUT
echo "Qt5_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5" >> $GITHUB_ENV
if [[ "${{ steps.set-vars.outputs.pkg_type }}" != "none" ]]; then
brew install --quiet doxygen ghostscript graphviz
fi
brew install libsvm xerces-c boost eigen sqlite coinutils cbc cgl clp qt
echo "cmake_prefix=$(brew --prefix qt)/lib/cmake;$(brew --prefix qt)" >> $GITHUB_OUTPUT
brew install --quiet doxygen ghostscript graphviz
fi
- name: Cache contrib (Windows)
Expand Down Expand Up @@ -458,8 +454,8 @@ jobs:
type: 'tar'
directory: ${{ github.workspace }}
path: OpenMS
exclusions: 'bld/* ./source.tar.gz THIRDPARTY/* .git/*'
filename: 'source.tar.gz'
exclusions: 'bld/* ./OpenMS-${{ steps.create_changelog.outputs.version_number }}.tar.gz THIRDPARTY/* .git/*'
filename: 'OpenMS-${{ steps.create_changelog.outputs.version_number }}.tar.gz'



Expand All @@ -468,9 +464,9 @@ jobs:
if: steps.set-vars.outputs.pkg_type != 'none' && startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: source.tar.gz
name: OpenMS-${{ steps.create_changelog.outputs.version_number }}.tar.gz
path: |
${{ github.workspace }}/source.tar.gz
${{ github.workspace }}/OpenMS-${{ steps.create_changelog.outputs.version_number }}.tar.gz
# Only upload docs when we are building the package, use the ubuntu build simply 'cause its fast
Expand Down Expand Up @@ -539,7 +535,7 @@ jobs:
- name: Download source archive as artifact
uses: actions/download-artifact@v4
with:
name: source.tar.gz
name: OpenMS-${{ steps.create_changelog.outputs.version_number }}.tar.gz

- name: Download changelog as artifact
if: inputs.do_release
Expand Down
85 changes: 57 additions & 28 deletions .github/workflows/pyopenms-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ name: pyopenms-wheels-and-packages
# events but only for the master branch
on:
workflow_dispatch:
inputs:
upload-to-pypi:
type: boolean
description: actually upload the release package to pypi.org
default: false
push:
tags:
- 'Release*'
Expand All @@ -26,8 +31,12 @@ jobs:
with:
cmake-version: '3.25.x'

- name: Reduce PATH
run: echo "PATH=C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin;C:\Program Files\Java\jdk8u265-b01\bin;C:\ProgramData\kind;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\PowerShell\7;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Reduce PATH # This fixes a bug described in https://github.com/facebook/watchman/commit/59bcfbf91d2a24ab580b8a78e384f133cc202383
run: echo "DISTUTILS_USE_SDK=1"

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand All @@ -46,20 +55,26 @@ jobs:
curl -o $MINICONDA_FILENAME "https://repo.anaconda.com/miniconda/$MINICONDA_FILENAME"
./Miniconda3-latest-Windows-x86_64.exe //InstallationType=JustMe //RegisterPython=0 //S //D=$HOME/miniconda3
- name: Download contrib build from archive (Windows)
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd OpenMS/contrib
# Download the file using the URL fetched from GitHub
gh release download -R OpenMS/contrib --pattern 'contrib_build-Windows.tar.gz'
# Extract the archive
7z x -so contrib_build-Windows.tar.gz | 7z x -si -ttar
rm contrib_build-Windows.tar.gz
ls -la
# https://github.com/marketplace/actions/visual-studio-shell
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x64

- name: Load contrib build
run: |
mkdir contribbld
cd contribbld
curl -o contribbld.tar.gz https://abibuilder.cs.uni-tuebingen.de/archive/openms/contrib/windows/x64/msvc-14.2/contrib_build.tar.gz
tar -xzf contribbld.tar.gz
rm contribbld.tar.gz
- name: Setup conda paths
shell: bash
run: |
Expand All @@ -74,7 +89,7 @@ jobs:
pushd bld
# TODO: set generator via variable, then we can share this step
cmake --version
cmake -G "Visual Studio 17 2022" -A x64 -DOPENMS_CONTRIB_LIBS="$GITHUB_WORKSPACE/contribbld" -DCMAKE_PREFIX_PATH="$(echo $Qt5_Dir)/lib/cmake;${Qt5_Dir}" ../OpenMS
cmake -G "Visual Studio 17 2022" -A x64 -DOPENMS_CONTRIB_LIBS="$GITHUB_WORKSPACE/OpenMS/contrib" -DCMAKE_PREFIX_PATH="$(echo $Qt5_Dir)/lib/cmake;${Qt5_Dir}" ../OpenMS
# Note: multiple --targets only supported by CMake 3.15+
cmake --build . --config Release --target OpenMS
Expand Down Expand Up @@ -103,14 +118,14 @@ jobs:
pip install -U pip
pip install -U autowrap
pip install -U pytest
pip install -U numpy
pip install 'numpy<=1.26.4'
pip install -U wheel
echo $CURRENT_PYTHON_EXECUTABLE
# build pyopenms distribution
cmake --version
cmake -DPYTHON_EXECUTABLE:FILEPATH=$CURRENT_PYTHON_EXECUTABLE -DPYOPENMS=ON -DPY_NUM_THREADS=4 .
cmake -DPYTHON_EXECUTABLE:FILEPATH=$CURRENT_PYTHON_EXECUTABLE -DPYOPENMS=ON -DPY_NUM_THREADS=${{ steps.cpu-cores.outputs.count }} .
cmake --build . --config Release --target pyopenms
# copy to directory
Expand Down Expand Up @@ -139,6 +154,10 @@ jobs:
with:
path: OpenMS

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
Expand Down Expand Up @@ -187,7 +206,7 @@ jobs:
pushd bld
# Use -DCMAKE_FIND_DEBUG_MODE=ON for debug
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_PREFIX_PATH="$(brew --prefix libomp);$(echo $Qt5_Dir)/lib/cmake;${Qt5_Dir}" -DCMAKE_OSX_DEPLOYMENT_TARGET=12 -DBOOST_USE_STATIC=OFF ../OpenMS
make -j4 OpenMS
make -j${{ steps.cpu-cores.outputs.count }} OpenMS
mkdir pyopenms_whls
Expand All @@ -205,13 +224,13 @@ jobs:
pip install -U pip
pip install -U autowrap
pip install -U pytest
pip install -U numpy
pip install 'numpy<=1.26.4'
pip install -U wheel
pip install -U pandas
# build pyopenms distribution (macOS)
cmake -DPYTHON_EXECUTABLE:FILEPATH=$CURRENT_PYTHON_EXECUTABLE -DPYOPENMS=ON -DPY_NUM_THREADS=4 .
make -j4 pyopenms
cmake -DPYTHON_EXECUTABLE:FILEPATH=$CURRENT_PYTHON_EXECUTABLE -DPYOPENMS=ON -DPY_NUM_THREADS=${{ steps.cpu-cores.outputs.count }} .
make -j${{ steps.cpu-cores.outputs.count }} pyopenms
# copy to directory
cp pyOpenMS/dist/*.whl pyopenms_whls/
Expand Down Expand Up @@ -249,6 +268,10 @@ jobs:
with:
path: OpenMS

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
Expand Down Expand Up @@ -297,7 +320,7 @@ jobs:
pushd bld
# Use -DCMAKE_FIND_DEBUG_MODE=ON for debug
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_PREFIX_PATH="$(brew --prefix libomp);$(echo $Qt5_Dir)/lib/cmake;${Qt5_Dir}" -DCMAKE_OSX_DEPLOYMENT_TARGET=12 -DBOOST_USE_STATIC=OFF ../OpenMS
make -j4 OpenMS
make -j${{ steps.cpu-cores.outputs.count }} OpenMS
mkdir pyopenms_whls
Expand All @@ -315,13 +338,13 @@ jobs:
pip install -U pip
pip install -U autowrap
pip install -U pytest
pip install -U numpy
pip install 'numpy<=1.26.4'
pip install -U wheel
pip install -U pandas
# build pyopenms distribution (macOS)
cmake -DPYTHON_EXECUTABLE:FILEPATH=$CURRENT_PYTHON_EXECUTABLE -DPYOPENMS=ON -DPY_NUM_THREADS=4 .
make -j4 pyopenms
cmake -DPYTHON_EXECUTABLE:FILEPATH=$CURRENT_PYTHON_EXECUTABLE -DPYOPENMS=ON -DPY_NUM_THREADS=${{ steps.cpu-cores.outputs.count }} .
make -j${{ steps.cpu-cores.outputs.count }} pyopenms
# copy to directory
cp pyOpenMS/dist/*.whl pyopenms_whls/
Expand Down Expand Up @@ -357,6 +380,10 @@ jobs:
with:
path: OpenMS

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
Expand All @@ -377,7 +404,7 @@ jobs:
mkdir openms-build
cd openms-build
cmake -DCMAKE_BUILD_TYPE="Release" -DOPENMS_CONTRIB_LIBS="/contrib-build/" -DCMAKE_PREFIX_PATH="/contrib-build/" $GITHUB_WORKSPACE/OpenMS
make -j4 OpenMS
make -j${{ steps.cpu-cores.outputs.count }} OpenMS
# compile and configure OpenMS
for py in $(echo "${PYTHON_VERSIONS}" | jq -r '.[]'); do
Expand All @@ -393,13 +420,13 @@ jobs:
"$PYBIN/bin/pip" install -U Cython
"$PYBIN/bin/pip" install -U setuptools
"$PYBIN/bin/pip" install -U wheel
"$PYBIN/bin/pip" install -U numpy
"$PYBIN/bin/pip" install 'numpy<=1.26.4'
"$PYBIN/bin/pip" install -U pytest
"$PYBIN/bin/pip" install -U autowrap
# configure (don't copy deps since we use auditwheel)
cmake -DNO_DEPENDENCIES=ON -DOPENMS_CONTRIB_LIBS="/contrib-build/" -DCMAKE_PREFIX_PATH="/contrib-build/" -DPYOPENMS=On -DPython_ROOT_DIR=$PYBIN -DPython_FIND_STRATEGY="LOCATION" -DPY_NUM_THREADS=4 $GITHUB_WORKSPACE/OpenMS
make -j4 pyopenms
cmake -DNO_DEPENDENCIES=ON -DOPENMS_CONTRIB_LIBS="/contrib-build/" -DCMAKE_PREFIX_PATH="/contrib-build/" -DPYOPENMS=On -DPython_ROOT_DIR=$PYBIN -DPython_FIND_STRATEGY="LOCATION" -DPY_NUM_THREADS=${{ steps.cpu-cores.outputs.count }} $GITHUB_WORKSPACE/OpenMS
make -j${{ steps.cpu-cores.outputs.count }} pyopenms
# ensure auditwheel can find the libraries
export LD_LIBRARY_PATH=$LD_OLD_LIBRARY_PATH:`pwd`/lib
Expand Down Expand Up @@ -551,18 +578,20 @@ jobs:
ls -la wheels/
- name: Publish package to nightly PyPI
if: "contains(github.ref, 'develop') || contains(github.ref, 'nightly')"
# Upload the wheels to our pypi server for develop, nightly and release branches (unless it's explictly stated to upload it to pypi.org)
if: contains(github.ref, 'develop') || contains(github.ref, 'nightly') || (contains(github.ref, 'Release') && inputs.upload-to-pypi == 'false')
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://pypi.cs.uni-tuebingen.de/
repository-url: https://pypi.cs.uni-tuebingen.de/
user: openms
password: ${{ secrets.abiservices_pypi_pw }}
packages-dir: ${{ github.workspace }}/wheels

- name: Publish package to PyPI
if: "contains(github.ref, 'Release')"
if: contains(github.ref, 'Release') && inputs.upload-to-pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
repository-url: https://test.pypi.org/
password: ${{ secrets.pypi_api_token_release }}
packages-dir: ${{ github.workspace }}/wheels
12 changes: 6 additions & 6 deletions .github/workflows/test_pyopenms.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Test nightly pyOpenMS on different platforms
name: Test pyOpenMS on different platforms

on:
workflow_dispatch: # Trigger manually
workflow_run:
workflows: [ pyopenms-wheels ]
workflow_run: # Trigger on pyopenms-wheels
workflows: ["pyopenms-wheels-and-packages"]
types:
- completed

Expand All @@ -15,11 +15,11 @@ jobs:
matrix: ${{ steps.python_versions.outputs.content }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Read python_versions.json
id: python_versions
uses: juliangruber/read-file-action@v1
uses: juliangruber/read-file-action@v1.1.7
with:
path: .github/workflows/python_versions.json

Expand All @@ -35,7 +35,7 @@ jobs:
python-version: ${{ fromJson(needs.read-python-versions.outputs.matrix) }}
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/update_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,10 @@ jobs:
gh workflow run openms-ci-full --ref develop
env:
GH_TOKEN: ${{ github.token }}

- name: Build wheels
if: steps.compare_branches.outputs.behind == 'true' || inputs.force
run: |
gh workflow run pyopenms-wheels-and-packages --ref nightly
env:
GH_TOKEN: ${{ github.token }}
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ Cleanup/Removal:
- PeakPickerCWT_test
- PeakShape_test

- Deprecated (and likely removed in the next release)
- XTandemAdapter
------------------------------------------------------------------------------------------
---- OpenMS 3.1 (released 10/2023) ----
------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if(ENABLE_DOCS)
set(DOXYGEN_MIN_REQUIRED "1.8.13")

if (DOXYGEN_VERSION VERSION_LESS DOXYGEN_MIN_REQUIRED )
message(STATUS "Warning: Doxygen ( vers. installed = ${DOXYGEN_VERSION} < ${DOXYGEN_MIN_REQUIRED}) does not correctly process \\includedoc commands in developer's installation instructions. This will make them incomplete. Upgrade Doxygen to fix.")
message(STATUS "Warning: Doxygen ( vers. installed = ${DOXYGEN_VERSION} < ${DOXYGEN_MIN_REQUIRED}) does not correctly process \\include commands in developer's installation instructions. This will make them incomplete. Upgrade Doxygen to fix.")
endif()

## if not found, use empty string to avoid `warning: the dot tool could not be found as 'DOXYGEN_DOT_EXECUTABLE-NOTFOUND/dot.exe'` in doxygen-error.log
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/install/install-linux.doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<tt>HAS_XSERVER=Off</tt>, especially as you may not have compiled Qt with
OpenGL and you may not have an X server.

\includedoc "../doxygen/install/common-cmake-parameters.doxygen"
\include "../doxygen/install/common-cmake-parameters.doxygen"

A full list of the CMake variables is shown when you execute

Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/install/install-macs.doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
</ol>


\includedoc "../doxygen/install/common-cmake-parameters.doxygen"
\include "../doxygen/install/common-cmake-parameters.doxygen"

After CMake was executed, you can list the make targets by calling:

Expand Down
Loading

0 comments on commit 36c9768

Please sign in to comment.