Skip to content

Commit

Permalink
Merge branch 'develop' into fix_toppas_tv
Browse files Browse the repository at this point in the history
  • Loading branch information
cbielow authored Nov 23, 2023
2 parents 367918e + 59ee60e commit fd8d1f0
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 11 deletions.
80 changes: 70 additions & 10 deletions .github/workflows/openms_ci_matrix_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
inputs:
package:
type: boolean
description: Build and upload packages/installer?
description: Build and upload packages/installer/documentation?
default: false
knime:
type: boolean
Expand Down Expand Up @@ -78,8 +78,10 @@ jobs:
echo "xvfb=xvfb-run -a" >> $GITHUB_OUTPUT
echo "static_boost=OFF" >> $GITHUB_OUTPUT
if [ "$DO_PACKAGE" = true ]; then
echo "enable_docs=ON" >> $GITHUB_OUTPUT
echo "pkg_type=deb" >> $GITHUB_OUTPUT
else
echo "enable_docs=OFF" >> $GITHUB_OUTPUT
echo "pkg_type=none" >> $GITHUB_OUTPUT
fi
echo "cxx_compiler=${{ matrix.compiler }}-${{ matrix.compiler_ver }}" >> $GITHUB_OUTPUT
Expand All @@ -94,8 +96,10 @@ jobs:
echo "static_boost=ON" >> $GITHUB_OUTPUT
if [ "$DO_PACKAGE" = true ]; then
echo "pkg_type=nsis" >> $GITHUB_OUTPUT
echo "enable_docs=ON" >> $GITHUB_OUTPUT
else
echo "pkg_type=none" >> $GITHUB_OUTPUT
echo "pkg_type=none" >> $GITHUB_OUTPUT
echo "enable_docs=OFF" >> $GITHUB_OUTPUT
fi
echo "cxx_compiler=${{ matrix.compiler }}" >> $GITHUB_OUTPUT
fi
Expand All @@ -109,8 +113,11 @@ jobs:
echo "static_boost=ON" >> $GITHUB_OUTPUT
if [ "$DO_PACKAGE" = true ]; then
echo "pkg_type=pkg" >> $GITHUB_OUTPUT
echo "enable_docs=ON" >> $GITHUB_OUTPUT
else
echo "pkg_type=none" >> $GITHUB_OUTPUT
echo "enable_docs=OFF" >> $GITHUB_OUTPUT
fi
if [[ "${{ matrix.compiler }}" == "xcode" ]]; then
sudo xcode-select -s '/Applications/Xcode_${{ matrix.compiler_ver }}.app/Contents/Developer'
Expand Down Expand Up @@ -156,6 +163,8 @@ jobs:
if [[ "${{ steps.set-vars.outputs.pkg_type }}" != "none" ]]; then
sudo apt-get -qq install -y doxygen ghostscript graphviz
echo "Testing doxygen"
doxygen --version
fi
fi
Expand Down Expand Up @@ -295,7 +304,7 @@ jobs:
ENABLE_STYLE_TESTING: "OFF"
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
ENABLE_TUTORIALS: "OFF"
ENABLE_DOCS: ${{ steps.set-vars.outputs.enable_docs }}
ENABLE_GCC_WERROR: "OFF" # TODO think about that
SEARCH_ENGINES_DIRECTORY: ${{ github.workspace }}/_thirdparty
WITH_GUI: "ON"
Expand Down Expand Up @@ -362,6 +371,26 @@ jobs:
${{ github.workspace }}/OpenMS/bld/*.exe
${{ github.workspace }}/OpenMS/bld/*.deb
${{ github.workspace }}/OpenMS/bld/*.pkg
#Zip the documentation first, since there are :: which make the upload action choke.
- if: steps.set-vars.outputs.pkg_type != 'none' && startsWith(matrix.os, 'ubuntu')
name: Zip Documentation
uses: thedoctor0/zip-release@0.7.6
with:
type: 'zip'
directory: ${{ github.workspace }}/OpenMS/bld/doc
exclusions: '/CMakeFiles/* /doxygen/* /code_examples/*'
filename: 'documentation.zip'

- if: steps.set-vars.outputs.pkg_type != 'none' && startsWith(matrix.os, 'ubuntu')
# Only upload docs when we are building the package, use the ubuntu build simply 'cause its fast
name: Upload Documentation as artifacts
uses: actions/upload-artifact@v3
with:
name: documentation
path: |
${{ github.workspace }}/OpenMS/bld/doc/documentation.zip
- if: steps.set-vars.outputs.pkg_type != 'none' || inputs.knime
name: Generate KNIME descriptors and payloads
Expand All @@ -372,7 +401,6 @@ jobs:
cmake -DSEARCH_ENGINES_DIRECTORY="$GITHUB_WORKSPACE/_thirdparty" -DENABLE_PREPARE_KNIME_PACKAGE=ON .
cmake --build . --target prepare_knime_package
- if: steps.set-vars.outputs.pkg_type != 'none' || inputs.knime
name: Upload KNIME payload and descriptors as artifacts
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -414,7 +442,38 @@ jobs:
run: |
echo "Upload"
if [[ "${{ env.RUN_NAME }}" == "nightly" ]]; then
folder=nightly
folder=nightlyGHA # TODO: Change back when we deactivate Jenkins
elif [[ "${{ env.RUN_NAME }}" == "release/*" ]]; then
tmpfolder=${{ env.RUN_NAME }}
folder=${tmpfolder/release/RC_GHA} # TODO: change back to RC after proper release
else
folder=experimental/${{ env.RUN_NAME }}
fi
echo "Uploading installers to: " $folder
mkdir -p ~/.ssh/
echo "$PASS" > ~/.ssh/private.key
sudo chmod 600 ~/.ssh/private.key
rsync --progress -avz -e "ssh -i ~/.ssh/private.key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/* "$USER@$HOST:/OpenMSInstaller/${folder}"
- name: Download Documentation
uses: actions/download-artifact@v3
with:
name: documentation
path: docs

- name: Upload Documentation
shell: bash
env:
PASS: ${{ secrets.ARCHIVE_RRSYNC_SSH }}
USER: ${{ secrets.ARCHIVE_RRSYNC_USER }}
HOST: ${{ secrets.ARCHIVE_RRSYNC_HOST }}
run: |
unzip $GITHUB_WORKSPACE/docs/documentation.zip -d $GITHUB_WORKSPACE/docs
rm $GITHUB_WORKSPACE/docs/documentation.zip
echo "Upload"
if [[ "${{ env.RUN_NAME }}" == "nightly" ]]; then
folder=nightlyGHA # TODO: Change back when we deactivate Jenkins
elif [[ "${{ env.RUN_NAME }}" == "release/*" ]]; then
tmpfolder=${{ env.RUN_NAME }}
folder=${tmpfolder/release/RC_GHA} # TODO: change back to RC after proper release
Expand All @@ -426,8 +485,9 @@ jobs:
mkdir -p ~/.ssh/
echo "$PASS" > ~/.ssh/private.key
sudo chmod 600 ~/.ssh/private.key
# rsync --progress -avz -e "ssh -i ~/.ssh/private.key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/* "$USER@$HOST:/OpenMSInstaller/${folder}"
# Upload documentation FIXME
rsync --progress -avz -e "ssh -i ~/.ssh/private.key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/docs/ "$USER@$HOST:/Documentation/${folder}"
# TODO create softlinks to latest nightly
# TODO create and upload file hashes, at least for release candidate

Expand Down Expand Up @@ -596,14 +656,14 @@ jobs:
run: |
echo "Upload"
if [[ "${{ env.RUN_NAME }}" == "nightly" ]]; then
folder=nightly
folder=nightlyGHA
elif [[ "${{ env.RUN_NAME }}" == "release/*" ]]; then
tmpfolder=${{ env.RUN_NAME }}
folder=${tmpfolder/release/RC}
folder=${tmpfolder/release/RC}GHA
else
folder=experimental/${{ env.RUN_NAME }}
fi
echo $folder
echo "Uploading KNIME site to:" $folder
# correct permissions of files to upload
chmod -R o+r $GITHUB_WORKSPACE/de.openms.update/target/repository/*
Expand All @@ -614,4 +674,4 @@ jobs:
mkdir -p ~/.ssh/
echo "$PASS" > ~/.ssh/private.key
sudo chmod 600 ~/.ssh/private.key
# rsync --progress -avz -e "ssh -i ~/.ssh/private.key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/de.openms.update/target/repository/* "$USER@$HOST:/knime-plugin/updateSite/$folder/"
rsync --progress -avz -e "ssh -i ~/.ssh/private.key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/de.openms.update/target/repository/* "$USER@$HOST:/knime-plugin/updateSite/$folder/"
2 changes: 1 addition & 1 deletion src/openms/source/CHEMISTRY/SpectrumAnnotator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace OpenMS
}
const Param& sap = sa.getParameters();
spec.setMetaValue("fragment_mass_tolerance", sap.getValue("tolerance"));
spec.setMetaValue("fragment_mass_tolerance_ppm", false);
spec.setMetaValue("fragment_mass_tolerance_ppm", sap.getValue("is_relative_tolerance").toBool());
spec.setStringDataArrays(PeakSpectrum::StringDataArrays(1, type_annotations));
spec.setFloatDataArrays(PeakSpectrum::FloatDataArrays(1, error_annotations));
}
Expand Down

0 comments on commit fd8d1f0

Please sign in to comment.