Skip to content

fix compile errors #259

fix compile errors

fix compile errors #259

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: openms-ci
# Controls when the action will run. Triggers the workflow on push or pull request
# events
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-win:
runs-on: windows-2022
outputs:
job-status: ${{ job.status }}
steps:
- uses: actions/checkout@v3
with:
path: OpenMS
- 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\2022\\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install Qt
uses: jurplel/install-qt-action@v3
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)
host: 'windows' # default: win64_msvc2017_64
target: 'desktop'
install-deps: 'true'
cache: 'false'
aqtversion: '==3.1.*'
# https://github.com/marketplace/actions/visual-studio-shell
- name: Set up Visual Studio shell
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- name: Setup build tools
shell: bash
run: |
choco install ccache ninja cmake
## 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
- name: Extract branch/PR infos
shell: bash
run: |
cd OpenMS
RUN_NAME_LOCAL=$(echo ${GITHUB_REF#refs/heads/} | tr / -)
echo "RUN_NAME=${RUN_NAME_LOCAL}" >> $GITHUB_ENV
echo "BASE_REF=$(gh pr view --json baseRefName -q .baseRefName || echo ${RUN_NAME_LOCAL})" >> $GITHUB_ENV
id: extract_branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache contrib
id: cache-contrib-win
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/OpenMS/contrib
key: ${{ runner.os }}-contrib3
- name: Load contrib build
if: steps.cache-contrib-win.outputs.cache-hit != 'true'
run: |
cd OpenMS/contrib
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 ccache cache
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-ccache-${{ env.RUN_NAME }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-ccache-${{ env.RUN_NAME }}
${{ runner.os }}-ccache-${{ env.BASE_REF }}
${{ runner.os }}-ccache-
- name: Add THIRDPARTY
shell: bash
run: |
# initialize THIRDPARTY
cd OpenMS
git submodule update --init THIRDPARTY
cd ..
# add third-party binaries to PATH
# use flat THIRDPARTY structure
mkdir -p _thirdparty
cp -R OpenMS/THIRDPARTY/Windows/64bit/* _thirdparty/
cp -R OpenMS/THIRDPARTY/All/* _thirdparty/
# add third-party binaries to PATH
for thirdpartytool in ${{ github.workspace }}/_thirdparty/*
do
echo $thirdpartytool >> $GITHUB_PATH
done
- name: Build Windows
shell: bash
run: |
mkdir $GITHUB_WORKSPACE/OpenMS/bld/
ctest --output-on-failure -V -S ../OpenMS/OpenMS/tools/ci/cibuild.cmake
env:
#OS_PREFIX_PATH: "${{ env.Qt5_DIR }}/lib/cmake;${{ env.Qt5_DIR }}"
CONTRIB_BUILD_DIRECTORY: "${{ github.workspace }}/OpenMS/contrib"
CI_PROVIDER: "GitHub-Actions"
CMAKE_GENERATOR: "Ninja"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
BUILD_NAME: "${{ env.RUN_NAME }}-Win64-class-topp-${{ github.run_number }}"
ENABLE_STYLE_TESTING: "OFF"
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
WITH_GUI: "ON"
ADDRESS_SANITIZER: "Off"
BUILD_TYPE: "Release"
OPENMP: "Off"
USE_STATIC_BOOST: "On"
# 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"
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 12
CCACHE_MAXSIZE: 400M
- name: Test Windows
shell: bash
run: $LAUNCHER ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
env:
LAUNCHER: ""
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
CI_PROVIDER: "GitHub-Actions"
BUILD_NAME: "${{ env.RUN_NAME }}-Win64-class-topp-${{ github.run_number }}"
build-macos:
runs-on: macos-latest
outputs:
job-status: ${{ job.status }}
steps:
- uses: actions/checkout@v3
with:
path: OpenMS
- name: Extract branch/PR infos
shell: bash
run: |
cd OpenMS
RUN_NAME_LOCAL=$(echo ${GITHUB_REF#refs/heads/} | tr / -)
echo "RUN_NAME=${RUN_NAME_LOCAL}" >> $GITHUB_ENV
echo "BASE_REF=$(gh pr view --json baseRefName -q .baseRefName || echo ${RUN_NAME_LOCAL})" >> $GITHUB_ENV
id: extract_branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install ccache
run: |
brew install ccache && brew link --overwrite ccache
- name: Setup ccache cache
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-ccache-${{ env.RUN_NAME }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch
# (probably only access to default branch "develop" is allowed).
# TODO: Check if this is even necessary. This should be the default lookup order by GH.
# So maybe ${{ runner.os }}-ccache- is enough.
restore-keys: |
${{ runner.os }}-ccache-${{ env.RUN_NAME }}
${{ runner.os }}-ccache-${{ env.BASE_REF }}
${{ runner.os }}-ccache-
- name: Install Qt
uses: jurplel/install-qt-action@v3
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)
host: 'mac'
target: 'desktop'
install-deps: 'true'
cache: 'false'
setup-python: 'false' # see https://github.com/jurplel/install-qt-action/issues/130
aqtversion: '==3.1.*'
- name: Install build tools
run: brew install autoconf automake libtool ninja
- name: Cache contrib
id: cache-contrib-os
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/OpenMS/contrib
key: ${{ runner.os }}-contrib3
- name: Load contrib build
if: steps.cache-contrib-os.outputs.cache-hit != 'true'
run: |
cd OpenMS/contrib
curl -o contribbld.tar.gz https://abibuilder.cs.uni-tuebingen.de/archive/openms/contrib/macOS/10.15.5/x64/appleclang-11.0.0/contrib_build.tar.gz
tar -xzf contribbld.tar.gz
rm contribbld.tar.gz
- name: Fix contrib install names
shell: bash
run: |
shopt -s nullglob # ensure that for loop is only executated if there is at least one .dylib file
for lib in $GITHUB_WORKSPACE/OpenMS/contrib/lib/*.dylib
do
install_name_tool -id $lib $lib
done
# create symlinks like brew https://github.com/Homebrew/homebrew-core/blob/master/Formula/qt.rb#L61
# Warning: Qt5_DIR will change meaning in the new jurplel/install-qt-action. Use QT_ROOT_DIR instead
# https://github.com/jurplel/install-qt-action/blob/master/README_upgrade_guide.md
pushd $Qt5_DIR/include
for f in $Qt5_DIR/lib/*.framework/Headers
do
lnknm=$(basename "${f%/*}" ".framework")
ln -s $f $lnknm
done
for f in $Qt5_DIR/lib/*.framework/Versions/5/Qt*
do
install_name_tool -id $f $f
done
popd
- name: Add THIRDPARTY
shell: bash
run: |
# initialize THIRDPARTY
cd OpenMS
git submodule update --init THIRDPARTY
cd ..
# add third-party binaries to PATH
# use flat THIRDPARTY structure
mkdir -p _thirdparty
cp -R OpenMS/THIRDPARTY/MacOS/64bit/* _thirdparty/
cp -R OpenMS/THIRDPARTY/All/* _thirdparty/
# add third-party binaries to PATH
for thirdpartytool in ${{ github.workspace }}/_thirdparty/*
do
echo $thirdpartytool >> $GITHUB_PATH
done
- name: Build macOS
run: |
mkdir $GITHUB_WORKSPACE/OpenMS/bld/
ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cibuild.cmake
# For debugging full logs: find $GITHUB_WORKSPACE/OpenMS/bld/ -name "LastBuild*" -type f -exec cat {} \;
env:
OS_PREFIX_PATH: "${{ env.Qt5_Dir }}/lib/cmake;${{ env.Qt5_Dir }}"
CONTRIB_BUILD_DIRECTORY: "${{ github.workspace }}/OpenMS/contrib"
CI_PROVIDER: "GitHub-Actions"
CMAKE_GENERATOR: "Ninja"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
BUILD_NAME: "${{ env.RUN_NAME }}-macOS-class-topp-${{ github.run_number }}"
OPENMS_CONTRIB_LIBS: "${{ github.workspace }}/OpenMS/contrib"
ENABLE_STYLE_TESTING: "OFF"
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
WITH_GUI: "ON"
ADDRESS_SANITIZER: "Off"
BUILD_TYPE: "Release"
OPENMP: "On"
USE_STATIC_BOOST: "On"
BUILD_FLAGS: "-j3"
CMAKE_CCACHE_EXE: "ccache"
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 12
CCACHE_MAXSIZE: 400M
- name: Test macOS
run: $LAUNCHER ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
env:
LAUNCHER: ""
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
CI_PROVIDER: "GitHub-Actions"
BUILD_NAME: "${{ env.RUN_NAME }}-macOS-clang-class-topp-${{ github.run_number }}"
build-lnx:
runs-on: ubuntu-latest
outputs:
job-status: ${{ job.status }}
steps:
# Cancels older builds if still running
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"
- uses: actions/checkout@v3
name: Checkout sources
with:
path: OpenMS
- name: Extract branch/PR infos
shell: bash
run: |
cd OpenMS
RUN_NAME_LOCAL=$(echo ${GITHUB_REF#refs/heads/} | tr / -)
echo "RUN_NAME=${RUN_NAME_LOCAL}" >> $GITHUB_ENV
echo "BASE_REF=$(gh pr view --json baseRefName -q .baseRefName || echo ${RUN_NAME_LOCAL})" >> $GITHUB_ENV
id: extract_branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dev tools, xvfb, ...
run: |
sudo add-apt-repository universe
sudo apt update
sudo apt-get install -y build-essential cmake autoconf patch libtool git automake ninja-build xvfb ccache
sudo apt-get install -y qtbase5-dev libqt5svg5-dev libqt5opengl5-dev
sudo apt-get 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
- name: Setup ccache cache
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-ccache-${{ env.RUN_NAME }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-ccache-${{ env.RUN_NAME }}
${{ runner.os }}-ccache-${{ env.BASE_REF }}
${{ runner.os }}-ccache-
- name: Add THIRDPARTY
shell: bash
run: |
# initialize THIRDPARTY
cd OpenMS
git submodule update --init THIRDPARTY
cd ..
# add third-party binaries to PATH
# use flat THIRDPARTY structure
mkdir -p _thirdparty
cp -R OpenMS/THIRDPARTY/Linux/64bit/* _thirdparty/
cp -R OpenMS/THIRDPARTY/All/* _thirdparty/
# add third-party binaries to PATH
for thirdpartytool in ${{ github.workspace }}/_thirdparty/*
do
echo $thirdpartytool >> $GITHUB_PATH
done
- name: Build lnx
run: |
mkdir $GITHUB_WORKSPACE/OpenMS/bld/
ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cibuild.cmake
# For debugging full logs: find $GITHUB_WORKSPACE/OpenMS/bld/ -name "LastBuild*" -type f -exec cat {} \;
env:
OS_PREFIX_PATH: "${{ env.Qt5_Dir }}/lib/cmake;${{ env.Qt5_Dir }}"
CONTRIB_BUILD_DIRECTORY: "/contrib-build"
CI_PROVIDER: "GitHub-Actions"
CMAKE_GENERATOR: "Ninja"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
BUILD_NAME: "${{ env.RUN_NAME }}-Ubuntu-gcc-class-topp-${{ github.run_number }}"
ENABLE_STYLE_TESTING: "OFF"
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
WITH_GUI: "ON"
ADDRESS_SANITIZER: "Off"
BUILD_TYPE: "Release"
OPENMP: "On"
USE_STATIC_BOOST: "Off"
BUILD_FLAGS: "-j2"
CMAKE_CCACHE_EXE: "ccache"
CCACHE_BASEDIR: "${{ github.workspace }}"
CCACHE_DIR: "${{ github.workspace }}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 12
CCACHE_MAXSIZE: 400M
CCACHE_SLOPPINESS: time_macros,include_file_ctime,include_file_mtime
CCACHE_COMPILERCHECK: content
- name: Test lnx
run: $LAUNCHER ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
env:
LAUNCHER: "xvfb-run"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
CI_PROVIDER: "GitHub-Actions"
BUILD_NAME: "${{ env.RUN_NAME }}-Ubuntu-gcc-class-topp-${{ github.run_number }}"
build-lnx-clang:
runs-on: ubuntu-22.04
outputs:
job-status: ${{ job.status }}
steps:
# Cancels older builds if still running
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"
- uses: actions/checkout@v3
name: Checkout sources
with:
path: OpenMS
- name: Extract branch/PR infos
shell: bash
run: |
cd OpenMS
RUN_NAME_LOCAL=$(echo ${GITHUB_REF#refs/heads/} | tr / -)
echo "RUN_NAME=${RUN_NAME_LOCAL}" >> $GITHUB_ENV
echo "BASE_REF=$(gh pr view --json baseRefName -q .baseRefName || echo ${RUN_NAME_LOCAL})" >> $GITHUB_ENV
id: extract_branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dev tools, xvfb, ...
run: |
sudo add-apt-repository universe
sudo apt update
sudo apt-get install build-essential cmake autoconf patch libtool git automake ninja-build xvfb ccache
sudo apt-get install qtbase5-dev libqt5svg5-dev libqt5opengl5-dev
sudo apt-get install 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
- name: Setup ccache cache
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-clng-ccache-${{ env.RUN_NAME }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-clng-ccache-${{ env.RUN_NAME }}
${{ runner.os }}-clng-ccache-${{ env.BASE_REF }}
${{ runner.os }}-clng-ccache-
- name: Add THIRDPARTY
shell: bash
run: |
# initialize THIRDPARTY
cd OpenMS
git submodule update --init THIRDPARTY
cd ..
# add third-party binaries to PATH
# use flat THIRDPARTY structure
mkdir -p _thirdparty
cp -R OpenMS/THIRDPARTY/Linux/64bit/* _thirdparty/
cp -R OpenMS/THIRDPARTY/All/* _thirdparty/
# add third-party binaries to PATH
for thirdpartytool in ${{ github.workspace }}/_thirdparty/*
do
echo $thirdpartytool >> $GITHUB_PATH
done
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: 15
platform: x64
- name: Build lnx-clang
run: |
mkdir $GITHUB_WORKSPACE/OpenMS/bld/
ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cibuild.cmake
env:
OS_PREFIX_PATH: "${{ env.Qt5_DIR }}/lib/cmake;${{ env.Qt5_DIR }}"
CONTRIB_BUILD_DIRECTORY: "/contrib-build"
CI_PROVIDER: "GitHub-Actions"
CMAKE_GENERATOR: "Ninja"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
BUILD_NAME: "${{ env.RUN_NAME }}-Ubuntu-clang-class-topp-${{ github.run_number }}"
ENABLE_STYLE_TESTING: "OFF"
ENABLE_TOPP_TESTING: "ON"
ENABLE_CLASS_TESTING: "ON"
WITH_GUI: "ON"
ADDRESS_SANITIZER: "Off"
BUILD_TYPE: "Release"
OPENMP: "On"
USE_STATIC_BOOST: "Off"
BUILD_FLAGS: "-j2"
CMAKE_CCACHE_EXE: "ccache"
CCACHE_BASEDIR: "${{ github.workspace }}"
CCACHE_DIR: "${{ github.workspace }}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 12
CCACHE_MAXSIZE: 400M
CCACHE_SLOPPINESS: time_macros,include_file_ctime,include_file_mtime
CCACHE_COMPILERCHECK: content
- name: Test lnx-clang
run: $LAUNCHER ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
env:
LAUNCHER: "xvfb-run"
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
CI_PROVIDER: "GitHub-Actions"
BUILD_NAME: "${{ env.RUN_NAME }}-Ubuntu-clang-class-topp-${{ github.run_number }}"
overall-status:
runs-on: ubuntu-latest
needs: [build-win, build-lnx, build-lnx-clang, build-macos]
if: ${{ always() }}
steps:
- name: Check on failures
if: ${{ needs.build-win.outputs.job-status != 'Success' || needs.build-lnx.outputs.job-status != 'Success' || needs.build-lnx-clang.outputs.job-status != 'Success' || needs.build-macos.outputs.job-status != 'Success' }}
run: exit 1