@@ -513,7 +513,7 @@ jobs:
513513
514514 build-lnx :
515515 runs-on : [ubuntu-latest]
516- container : ghcr.io/openms/contrib_manylinux_2_34:latest
516+ container : ghcr.io/openms/contrib_manylinux_2_34:latest-x86_64
517517
518518 steps :
519519 # Cancels older builds if still running
@@ -537,17 +537,139 @@ jobs:
537537 uses : SimenB/github-actions-cpu-cores@v2
538538 id : cpu-cores
539539
540- - name : Setup cmake
541- uses : jwlawson/actions-setup-cmake@v2
540+ - name : Build on manylinux for broad compatibility
541+ shell : bash
542+ run : |
543+ PYTHON_VERSIONS=$(cat OpenMS/.github/workflows/python_versions.json)
544+ yum install -y jq
545+ yum install -y ninja-build # Install Ninja for build files
546+ yum install -y cmake # Install CMake
547+ cmake --version
548+
549+ mkdir -p $GITHUB_WORKSPACE/data/wheelhouse/
550+ mkdir -p $GITHUB_WORKSPACE/data/wheelhouse/before_fix/
551+
552+ LD_OLD_LIBRARY_PATH=$LD_LIBRARY_PATH
553+
554+ # compile and configure OpenMS
555+ for py in $(echo "${PYTHON_VERSIONS}" | jq -r '.[]'); do
556+
557+ # Check if there is already and existing build,
558+ # if so: clean previous pyopenms libs,
559+ # do at the top of the python version loop so that we leave the final libraries for testing
560+
561+ if [ -d "OpenMS/bld/pyOpenMS/pyopenms" ]; then
562+ rm OpenMS/bld/pyOpenMS/pyopenms/_pyopenms*.so
563+ fi
564+
565+ py=$(echo "$py" | tr -d " \n")
566+ pynodot=$(echo "$py" | tr -d ".")
567+ PYBIN=$(echo /opt/python/cp*${pynodot})
568+
569+ # Create a venv for this python version
570+ "$PYBIN/bin/python" -m venv $pynodot
571+ source $pynodot/bin/activate
572+
573+ "$PYBIN/bin/pip" install --upgrade pip
574+ # pip install all the stuff
575+ "$PYBIN/bin/pip" install -r $GITHUB_WORKSPACE/OpenMS/src/pyOpenMS/requirements_bld.txt
576+
577+ # configure (don't copy deps since we use auditwheel)
578+
579+ export Python_ROOT_DIR=$PYBIN
580+ export BUILD_NAME="pyopenms-wheels-${{ steps.extract_branch.outputs.RUN_NAME }}-${{ runner.os }}-${{ runner.arch }}-class-pyopenms-$py-${{ github.run_number }}" #TODO make this more expressive
581+
582+ ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cibuild.cmake
583+
584+ # ensure auditwheel can find the libraries
585+ export LD_LIBRARY_PATH=$LD_OLD_LIBRARY_PATH:`pwd`/OpenMS/bld/lib
586+
587+ # strip the libraries before repairing
588+ strip --strip-all OpenMS/bld/lib/libOpenMS.so
589+ strip --strip-all OpenMS/bld/lib/libOpenSwathAlgo.so
590+
591+ pushd OpenMS/bld/pyOpenMS
592+ # Bundle stripped plus external shared libraries into the wheels
593+ for whl in dist/pyopenms*.whl; do
594+ auditwheel repair "$whl" -w wheelhouse/
595+ done
596+
597+ mv wheelhouse/* $GITHUB_WORKSPACE/data/wheelhouse/
598+ popd
599+ export LD_LIBRARY_PATH=$LD_OLD_LIBRARY_PATH
600+
601+ # deactivate the venv
602+ deactivate
603+ done
604+ env :
605+ SOURCE_DIRECTORY : " ${{ github.workspace }}/OpenMS"
606+ CMAKE_GENERATOR : " Ninja"
607+ OPENMS_CONTRIB_LIBS : " /contrib-build/"
608+ BUILD_TYPE : " Release"
609+ BUILD_FLAGS : " -j${{ steps.cpu-cores.outputs.count }}"
610+ NO_DEPENDENCIES : " ON"
611+ Python_FIND_STRATEGY : " LOCATION"
612+ PYOPENMS : " ON"
613+ PY_NUM_THREADS : ${{ steps.cpu-cores.outputs.count }}
614+ CI_PROVIDER : " GitHub-Actions"
615+ CMAKE_CXX_COMPILER : " g++"
616+ CMAKE_PREFIX_PATH : " /contrib-build/"
617+ ENABLE_TUTORIALS : " OFF"
618+ ENABLE_DOCS : " OFF"
619+ ENABLE_STYLE_TESTING : " OFF"
620+ ENABLE_PIPELINE_TESTING : " OFF"
621+ ENABLE_TOPP_TESTING : " OFF"
622+ ENABLE_CLASS_TESTING : " OFF"
623+
624+ - name : Test
625+ shell : bash
626+ run : |
627+ ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
628+ env :
629+ SOURCE_DIRECTORY : " ${{ github.workspace }}/OpenMS"
630+ CI_PROVIDER : " GitHub-Actions"
631+ BUILD_NAME : " ${{ steps.extract_branch.outputs.RUN_NAME }}-${{ runner.os }}-${{ runner.arch }}-class-pyopenms-${{ github.run_number }}"
632+ # The rest of the vars should be saved in the CMakeCache
633+
634+ - uses : actions/upload-artifact@v4
635+ name : Upload artifacts
542636 with :
543- cmake-version : ' 3.25.x'
637+ name : ${{ runner.os }}-${{ runner.arch }}-wheels
638+ path : data/wheelhouse/
639+
640+ build-lnx-arm :
641+ runs-on : [ubuntu-22.04-arm]
642+ container : ghcr.io/openms/contrib_manylinux_2_34:latest-arm64
643+
644+ steps :
645+ # Cancels older builds if still running
646+ - uses : rokroskar/workflow-run-cleanup-action@master
647+ env :
648+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
649+ # Disable warning for this line
650+ if : " !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'" # noqa
651+
652+ - uses : actions/checkout@v4
653+ name : Checkout sources
654+ with :
655+ path : OpenMS
656+
657+ - id : extract_branch
658+ name : Extract branch/PR infos
659+ shell : bash
660+ run : echo "RUN_NAME=${{ github.event.pull_request && github.event.pull_request.number || github.ref_name }}" >> $GITHUB_OUTPUT
661+
662+ - name : Get number of CPU cores
663+ uses : SimenB/github-actions-cpu-cores@v2
664+ id : cpu-cores
544665
545666 - name : Build on manylinux for broad compatibility
546667 shell : bash
547668 run : |
548669 PYTHON_VERSIONS=$(cat OpenMS/.github/workflows/python_versions.json)
549670 yum install -y jq
550671 yum install -y ninja-build # Install Ninja for build files
672+ yum install -y cmake # Install CMake
551673 cmake --version
552674
553675 mkdir -p $GITHUB_WORKSPACE/data/wheelhouse/
@@ -641,15 +763,16 @@ jobs:
641763 name : ${{ runner.os }}-${{ runner.arch }}-wheels
642764 path : data/wheelhouse/
643765
766+
644767# Tests the build workflows
645768 test :
646- needs : [build-win, build-macos, build-lnx, build-macos-arm]
769+ needs : [build-win, build-macos, build-lnx, build-macos-arm, build-lnx-arm ]
647770 runs-on : ${{ matrix.os }}
648771 env :
649772 SYSTEM_VERSION_COMPAT : 0 # courtesy of https://github.com/actions/setup-python/issues/469 in lieu of an actual solution.
650773 strategy :
651774 matrix :
652- os : [ubuntu-latest, macos-15-intel, windows-latest, macos-latest]
775+ os : [ubuntu-latest, macos-15-intel, windows-latest, macos-latest, ubuntu-22.04-arm ]
653776 steps :
654777 - uses : actions/checkout@v4
655778 name : Checkout sources
@@ -659,7 +782,11 @@ jobs:
659782 - name : Install Miniconda
660783 shell : bash
661784 run : |
662- if [[ "${{ runner.os }}" == "Linux" ]]; then
785+ if [[ "${{ runner.os }}" == "Linux" && "${{ runner.arch }}" == "ARM64" ]]; then
786+ MINICONDA_FILENAME=Miniconda3-latest-Linux-aarch64.sh
787+ curl -o $MINICONDA_FILENAME "https://repo.anaconda.com/miniconda/$MINICONDA_FILENAME"
788+ bash ${MINICONDA_FILENAME} -b -f -p $HOME/miniconda3
789+ elif [[ "${{ runner.os }}" == "Linux" && "${{ runner.arch }}" == "X64" ]]; then
663790 MINICONDA_FILENAME=Miniconda3-latest-Linux-x86_64.sh
664791 curl -o $MINICONDA_FILENAME "https://repo.anaconda.com/miniconda/$MINICONDA_FILENAME"
665792 bash ${MINICONDA_FILENAME} -b -f -p $HOME/miniconda3
@@ -741,6 +868,11 @@ jobs:
741868 with :
742869 name : Linux-X64-wheels
743870 path : /home/runner/work/OpenMS/OpenMS/Linux-X64-wheels
871+ - name : Download artifacts
872+ uses : actions/download-artifact@v4
873+ with :
874+ name : Linux-ARM64-wheels
875+ path : /home/runner/work/OpenMS/OpenMS/Linux-ARM64-wheels
744876 - name : Download artifacts
745877 uses : actions/download-artifact@v4
746878 with :
0 commit comments