diff --git a/.ci/check-pr-labels-step-bash.yml b/.ci/check-pr-labels-step-bash.yml deleted file mode 100644 index 402b6fb266..0000000000 --- a/.ci/check-pr-labels-step-bash.yml +++ /dev/null @@ -1,13 +0,0 @@ -steps: -- bash: | - if [[ -n "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}" ]]; then - label="no ci build" - url="https://api.github.com/repos/UniStuttgart-VISUS/megamol/issues/${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}/labels" - curl -s "${url}" | grep -q "\"${label}\"" - exit_code=$? - if [[ $exit_code -eq 0 ]]; then - echo "##[error]Cancel build! Was requested by setting the '${label}' label on the pull request." - exit 1 - fi - fi - displayName: 'Check PR label' diff --git a/.ci/check-pr-labels-step-pwsh.yml b/.ci/check-pr-labels-step-pwsh.yml deleted file mode 100644 index 982a3d8ec2..0000000000 --- a/.ci/check-pr-labels-step-pwsh.yml +++ /dev/null @@ -1,14 +0,0 @@ -steps: -- powershell: | - if ($Env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER) { - $label = "no ci build" - $url = "https://api.github.com/repos/UniStuttgart-VISUS/megamol/issues/$Env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/labels" - $response = Invoke-RestMethod -Uri $url - foreach($element in $response) { - if ($element.name -eq $label) { - echo "##[error]Cancel build! Was requested by setting the '$label' label on the pull request." - exit 1 - } - } - } - displayName: 'Check PR label' diff --git a/.ci/check_format.sh b/.ci/check_format.sh index c7c38b45a9..582da1fe1c 100755 --- a/.ci/check_format.sh +++ b/.ci/check_format.sh @@ -89,17 +89,17 @@ while read -r file; do if [[ "$is_cpp" == true ]]; then # ClangFormat if [[ "$_fix" == true ]]; then - clang-format-16 -i "$file" + clang-format-17 -i "$file" else # Workaround "set -e" and store exit code format_exit_code=0 - output="$(clang-format-16 --dry-run --Werror "$file" 2>&1)" || format_exit_code=$? + output="$(clang-format-17 --dry-run --Werror "$file" 2>&1)" || format_exit_code=$? if [[ $format_exit_code -ne 0 ]]; then EXIT_CODE=1 echo "::error::ClangFormat found issues in: $file" #echo "$output" # Show detailed diff. Requires ClangFormat to run again, but should mostly affect only a few files. - clang-format-16 "$file" | diff --color=always -u "$file" - || true + clang-format-17 "$file" | diff --color=always -u "$file" - || true fi fi diff --git a/.ci/install-clang-format.sh b/.ci/install-clang-format.sh index 164a537d78..9fd38c381e 100755 --- a/.ci/install-clang-format.sh +++ b/.ci/install-clang-format.sh @@ -3,5 +3,5 @@ set -e set -o pipefail wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc -sudo add-apt-repository --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" -sudo apt-get install -y clang-format-16 +sudo add-apt-repository --yes "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-17 main" +sudo apt-get install -y clang-format-17 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..c5ddac77a1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,188 @@ +name: Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + MM_DEFAULT_CONFIG: >- + -DMEGAMOL_VCPKG_DOWNLOAD_CACHE=ON + -DMEGAMOL_WARNING_LEVEL="Off" + -DMEGAMOL_PLUGIN_MEGAMOL101_GL=ON + -DMEGAMOL_USE_CGAL=ON + -DMEGAMOL_USE_PROFILING=ON + -DMEGAMOL_USE_STACKTRACE=ON + -DMEGAMOL_USE_TRACY=ON + -DMEGAMOL_USE_VTKM=ON + MM_NO_GL_CONFIG: >- + -DMEGAMOL_VCPKG_DOWNLOAD_CACHE=ON + -DMEGAMOL_WARNING_LEVEL="Off" + -DMEGAMOL_USE_OPENGL=OFF + +jobs: + vcpkg_cache: + # Skip on PR from forked repo as no secrets are available. + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} + strategy: + fail-fast: false + matrix: + job: + - name: 'Windows' + os: 'windows-2022' + container: '' + generator: 'Visual Studio 17 2022' + cc: '' + cxx: '' + ignore_features: 'MPI POWER' + - name: 'Ubuntu-GCC' + os: 'ubuntu-24.04' + container: 'ghcr.io/unistuttgart-visus/megamol_ci_ubuntu:master' + generator: 'Ninja' + cc: 'gcc-13' + cxx: 'g++-13' + ignore_features: 'CUESDK VR_INTEROP POWER' + - name: 'Ubuntu-Clang' + os: 'ubuntu-24.04' + container: 'ghcr.io/unistuttgart-visus/megamol_ci_ubuntu:master' + generator: 'Ninja' + cc: 'clang-18' + cxx: 'clang++-18' + ignore_features: 'CUESDK VR_INTEROP POWER' + name: "Vcpkg-${{ matrix.job.name }}" + runs-on: ${{ matrix.job.os }} + container: + image: ${{ matrix.job.container }} + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - name: Download Vcpkg + # Download vcpkg in advance, to download only once. MegaMol will detect the vcpkg directory in the repo root + # folder automatically. + run: | + version=$(LC_ALL=C.UTF-8 grep -oP 'set\(MEGAMOL_VCPKG_VERSION "\K[^"]+' CMakeLists.txt) + git clone https://github.com/microsoft/vcpkg.git vcpkg + cd vcpkg && git reset --hard $version && cd .. + shell: bash + - name: Find MegaMol Feature Options + run: | + import json + with open('vcpkg.json') as f: + features = json.load(f)['features'] + features = [f.upper().replace('-', '_') for f in features if 'dependencies' in features[f]] + ignored = '${{ matrix.job.ignore_features }}'.split() + features = [f for f in features if f not in ignored] + with open('MEGAMOL_FEATURES', 'w') as f: + f.write(' '.join(features)) + shell: python3 {0} + - name: Build Vcpkg Ports + # Vcpkg ports may are required with different feature sets, based on the MegaMol features, e.g., `megamol` + # requires `a` and `megamol[foo]` requires `a[bar]`. We need to build both `a` and `a[foo]` for the cache. The + # problem extents to all transitive dependencies. Because we cannot try to build all possible combinations of + # enabled MegaMol features, we use the following heuristic to hopefully cover most cases: 1. MegaMol with no + # features, 2. MegaMol with all features, 3. For every feature MegaMol with only this feature enabled. + run: | + echo "::group::Build Cache No Features" + cmake -S . -B "$GITHUB_WORKSPACE/build" -G "${{ matrix.job.generator }}" \ + -DMEGAMOL_STOP_AFTER_VCPKG=ON \ + -DMEGAMOL_DISABLE_ALL_FEATURES=ON + rm -rf "$GITHUB_WORKSPACE/build" + echo "::endgroup::" + echo "::group::Build Cache All Features" + cmake -S . -B "$GITHUB_WORKSPACE/build" -G "${{ matrix.job.generator }}" \ + -DMEGAMOL_STOP_AFTER_VCPKG=ON \ + -DMEGAMOL_ENABLE_ALL_FEATURES=ON \ + $(echo "${{ matrix.job.ignore_features }}" | sed -e 's/\([^ ]*\)/-DMEGAMOL_USE_\1=OFF/g') + rm -rf "$GITHUB_WORKSPACE/build" + echo "::endgroup::" + features=$(- + cmake -S . -B $GITHUB_WORKSPACE/build -G "Ninja" + ${{ matrix.job.no-gl && env.MM_NO_GL_CONFIG || env.MM_DEFAULT_CONFIG }} + - name: Build + run: cmake --build $GITHUB_WORKSPACE/build --config ${{ matrix.job.configuration }} --parallel 2 + build_linux: + if: ${{ always() }} + needs: vcpkg_cache + strategy: + fail-fast: false + matrix: + job: + - name: 'GCC-Debug' + container: megamol_ci_ubuntu + cc: gcc-13 + cxx: g++-13 + configuration: Debug + no-gl: false + - name: 'Clang-Release' + container: megamol_ci_ubuntu + cc: clang-18 + cxx: clang++-18 + configuration: Release + no-gl: false + - name: 'GCC-Release-No-GL' + container: megamol_ci_ubuntu + cc: gcc-13 + cxx: g++-13 + configuration: Release + no-gl: true + name: "Linux-${{ matrix.job.name }}" + runs-on: ubuntu-24.04 + container: + image: ghcr.io/unistuttgart-visus/${{ matrix.job.container }}:master + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - name: Configure + run: >- + cmake -S . -B $GITHUB_WORKSPACE/build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.job.configuration }} + ${{ matrix.job.no-gl && env.MM_NO_GL_CONFIG || env.MM_DEFAULT_CONFIG }} + - name: Build + run: cmake --build $GITHUB_WORKSPACE/build + env: + CC: ${{ matrix.job.cc }} + CXX: ${{ matrix.job.cxx }} diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000000..eb7a81ab44 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,55 @@ +name: Checks + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + style_check: + name: Style-Check + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - name: Install clang-format + run: .ci/install-clang-format.sh + - name: Run format check + run: .ci/check_format.sh + - name: Save PR number + if: ${{ failure() && github.event_name == 'pull_request' }} + run: | + mkdir -p ./pr + echo ${{ github.event.number }} > ./pr/NR + - uses: actions/upload-artifact@v3 + if: ${{ failure() && github.event_name == 'pull_request' }} + with: + name: pr + path: pr/ + plugin_check: + name: Plugin-Check + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - name: Run plugin check + run: .ci/check_plugins.sh + shader_check: + name: Shader-Check + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - name: Download glslang + run: | + mkdir bin + wget "https://github.com/KhronosGroup/glslang/releases/download/main-tot/glslang-main-linux-Release.zip" + unzip -j "glslang-main-linux-Release.zip" "bin/glslang" -d ./bin + rm "glslang-main-linux-Release.zip" + echo "./bin" >> $GITHUB_PATH + - name: Run shader check + run: .ci/check_shaders.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 651cdff7ab..c85fab413e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -20,26 +20,28 @@ jobs: - dockerfile_dir: oraclelinux image_name: megamol_ci_oraclelinux name: Docker-Build - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: contents: read packages: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + show-progress: false - name: Docker login - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Docker metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.config.image_name }} - name: Docker build/push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: .ci/docker/${{ matrix.config.dockerfile_dir }} push: true diff --git a/.github/workflows/shader_check.yml b/.github/workflows/shader_check.yml deleted file mode 100644 index 827c5946ea..0000000000 --- a/.github/workflows/shader_check.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Shader-Check - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - shader_check: - name: Shader-Check - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - name: Download glslang - run: | - mkdir bin - wget "https://github.com/KhronosGroup/glslang/releases/download/main-tot/glslang-main-linux-Release.zip" - unzip -j "glslang-main-linux-Release.zip" "bin/glslang" -d ./bin - rm "glslang-main-linux-Release.zip" - echo "./bin" >> $GITHUB_PATH - - name: Run shader check - run: .ci/check_shaders.sh diff --git a/.github/workflows/style_check.yml b/.github/workflows/style_check.yml deleted file mode 100644 index 23e6a0c241..0000000000 --- a/.github/workflows/style_check.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Style-Check - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - style_check: - name: Style-Check - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - name: Install clang-format - run: .ci/install-clang-format.sh - - name: Run format check - run: .ci/check_format.sh - - name: Save PR number - if: ${{ failure() && github.event_name == 'pull_request' }} - run: | - mkdir -p ./pr - echo ${{ github.event.number }} > ./pr/NR - - uses: actions/upload-artifact@v3 - if: ${{ failure() && github.event_name == 'pull_request' }} - with: - name: pr - path: pr/ - plugin_check: - name: Plugin-Check - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - name: Run plugin check - run: .ci/check_plugins.sh diff --git a/.github/workflows/style_check_comment.yml b/.github/workflows/style_check_comment.yml index 15d84f2897..6beca8069a 100644 --- a/.github/workflows/style_check_comment.yml +++ b/.github/workflows/style_check_comment.yml @@ -11,11 +11,11 @@ jobs: style_check_comment: name: Style-Check-Comment if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ - name: Download artifact - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ @@ -39,7 +39,7 @@ jobs: }); - run: unzip pr.zip - name: Comment - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | var fs = require('fs'); diff --git a/.github/workflows/style_fix.yml b/.github/workflows/style_fix.yml index 303a50c53c..bb0b3d6892 100644 --- a/.github/workflows/style_fix.yml +++ b/.github/workflows/style_fix.yml @@ -8,11 +8,11 @@ jobs: style_fix: name: Style-Fix if: ${{ github.event.issue.pull_request && github.event.comment.body == '/format' }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Get PR Info id: pr-info - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const pr = await github.rest.pulls.get({ @@ -23,18 +23,20 @@ jobs: core.setOutput('REPO', pr.data.head.repo.full_name); core.setOutput('REF', pr.data.head.ref); # Checkout master - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: master path: master token: ${{ secrets.PAT_MEGAMOLSERVICE }} + show-progress: false # Checkout PR repo/branch - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: ${{ steps.pr-info.outputs.REPO }} ref: ${{ steps.pr-info.outputs.REF }} path: pr token: ${{ secrets.PAT_MEGAMOLSERVICE }} + show-progress: false - name: Install clang-format run: master/.ci/install-clang-format.sh - name: Fix style @@ -55,7 +57,7 @@ jobs: fi - name: Comment if: ${{ failure() }} - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({ diff --git a/.github/workflows/vcpkg_cache.yml b/.github/workflows/vcpkg_cache.yml deleted file mode 100644 index 11ee80a337..0000000000 --- a/.github/workflows/vcpkg_cache.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Vcpkg Cache - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - workflow_dispatch: - -jobs: - windows: - # Skip on PR from forked repo as no secrets are available. - if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} - strategy: - fail-fast: false - matrix: - opengl: [ON, OFF] - name: "Windows (OpenGL-${{ matrix.opengl }})" - runs-on: windows-2019 - steps: - - uses: actions/checkout@v3 - - name: Configure - run: >- - cmake -S . -B ${{ github.workspace }}/build -G "Visual Studio 16 2019" - -DMEGAMOL_STOP_AFTER_VCPKG=ON - -DMEGAMOL_USE_CGAL=ON - -DMEGAMOL_USE_OPENGL=${{ matrix.opengl }} - -DMEGAMOL_USE_OSPRAY=ON - -DMEGAMOL_USE_STACKTRACE=ON - -DMEGAMOL_USE_TRACY=ON - env: - VCPKG_BINARY_SOURCES: "clear;http,https://vcpkg-cache.megamol.org/{triplet}-{name}-{sha},readwrite,Authorization: Token ${{ secrets.CACHING_SERVER_SECRET }}" - linux: - # Skip on PR from forked repo as no secrets are available. - if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} - strategy: - fail-fast: false - matrix: - docker_image: [megamol_ci_ubuntu] - compiler: - - cc: clang-18 - cxx: clang++-18 - - cc: gcc-13 - cxx: g++-13 - opengl: [ON, OFF] - name: "${{ matrix.docker_image }} (${{ matrix.compiler.cc }}, OpenGL-${{ matrix.opengl }})" - runs-on: ubuntu-22.04 - container: - image: ghcr.io/unistuttgart-visus/${{ matrix.docker_image }}:master - steps: - - uses: actions/checkout@v3 - - name: Configure - run: >- - cmake -S . -B ${{ github.workspace }}/build -G "Unix Makefiles" - -DMEGAMOL_STOP_AFTER_VCPKG=ON - -DMEGAMOL_USE_CGAL=ON - -DMEGAMOL_USE_OPENGL=${{ matrix.opengl }} - -DMEGAMOL_USE_OSPRAY=ON - -DMEGAMOL_USE_STACKTRACE=ON - -DMEGAMOL_USE_TRACY=ON - env: - CC: ${{ matrix.compiler.cc }} - CXX: ${{ matrix.compiler.cxx }} - VCPKG_BINARY_SOURCES: "clear;http,https://vcpkg-cache.megamol.org/{triplet}-{name}-{sha},readwrite,Authorization: Token ${{ secrets.CACHING_SERVER_SECRET }}" diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 5398f4556e..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,141 +0,0 @@ - -trigger: -- master - -pr: -- master - -variables: - defaultConfig: >- - -DMEGAMOL_VCPKG_DOWNLOAD_CACHE=ON - -DMEGAMOL_WARNING_LEVEL="Off" - -DMEGAMOL_PLUGIN_MEGAMOL101_GL=ON - -DMEGAMOL_PLUGIN_IMAGESERIES=ON - -DMEGAMOL_PLUGIN_IMAGESERIES_GL=ON - -DMEGAMOL_USE_CGAL=ON - -DMEGAMOL_USE_PROFILING=ON - -DMEGAMOL_USE_STACKTRACE=ON - -DMEGAMOL_USE_TRACY=ON - -DMEGAMOL_USE_VTKM=ON - nonGlConfig: >- - -DMEGAMOL_VCPKG_DOWNLOAD_CACHE=ON - -DMEGAMOL_WARNING_LEVEL="Off" - -DMEGAMOL_USE_OPENGL=OFF - -jobs: -- job: Windows - variables: - VCPKG_DEFAULT_BINARY_CACHE: '$(Agent.BuildDirectory)\vcpkg_cache\archives' - X_VCPKG_REGISTRIES_CACHE: '$(Agent.BuildDirectory)\vcpkg_cache\registries' - - strategy: - matrix: - 'VS2019 Release': - configuration: Release - generator: 'Visual Studio 16 2019' - cmakeExtraArgs: '$(defaultConfig)' - 'VS2019 Debug': - configuration: Debug - generator: 'Visual Studio 16 2019' - cmakeExtraArgs: '$(defaultConfig)' - 'VS2019 Release (nonGL)': - configuration: Release - generator: 'Visual Studio 16 2019' - cmakeExtraArgs: '$(nonGlConfig)' - - timeoutInMinutes: 720 - - pool: - name: 'default' - demands: - - Agent.OS -equals Windows_NT - - cmake - - VisualStudio_16.0 - - steps: - - template: .ci/check-pr-labels-step-pwsh.yml - - powershell: | - New-Item -ItemType "directory" -Path "$Env:VCPKG_DEFAULT_BINARY_CACHE" -Force - New-Item -ItemType "directory" -Path "$Env:X_VCPKG_REGISTRIES_CACHE" -Force - displayName: 'Setup vcpkg cache directories' - - task: CMake@1 - displayName: 'CMake Configure' - inputs: - cmakeArgs: '.. -G"$(generator)" -A"x64" $(cmakeExtraArgs)' - - task: CMake@1 - displayName: 'CMake Build' - inputs: - cmakeArgs: '--build . --config $(configuration)' - -- job: Linux - variables: - VCPKG_DEFAULT_BINARY_CACHE: '$(Agent.BuildDirectory)/vcpkg_cache/archives' - X_VCPKG_REGISTRIES_CACHE: '$(Agent.BuildDirectory)/vcpkg_cache/registries' - - strategy: - matrix: - ## Temporarily disabled until more CI machines are available! - #'GCC13 / Make / Release': - # dockerImage: megamol_ci_ubuntu - # cCompiler: gcc-13 - # cxxCompiler: g++-13 - # configuration: Release - # generator: 'Unix Makefiles' - # cmakeExtraArgs: '$(defaultConfig)' - 'GCC13 / Make / Debug': - dockerImage: megamol_ci_ubuntu - cCompiler: gcc-13 - cxxCompiler: g++-13 - configuration: Debug - generator: 'Unix Makefiles' - cmakeExtraArgs: '$(defaultConfig)' - ## Temporarily disabled until more CI machines are available! - #'GCC13 / Ninja / Release': - # dockerImage: megamol_ci_ubuntu - # cCompiler: gcc-13 - # cxxCompiler: g++-13 - # configuration: Release - # generator: 'Ninja' - # cmakeExtraArgs: '$(defaultConfig)' - ## Temporarily changed to Ninja instead of Make until more CI machines are available! - 'Clang18 / Ninja / Release': - dockerImage: megamol_ci_ubuntu - cCompiler: clang-18 - cxxCompiler: clang++-18 - configuration: Release - generator: 'Ninja' - cmakeExtraArgs: '$(defaultConfig)' - 'GCC13 / Ninja / Release (nonGL)': - dockerImage: megamol_ci_ubuntu - cCompiler: gcc-13 - cxxCompiler: g++-13 - configuration: Release - generator: 'Ninja' - cmakeExtraArgs: '$(nonGlConfig)' - - timeoutInMinutes: 720 - - pool: - name: 'default' - demands: - - Agent.OS -equals Linux - - docker - - container: ghcr.io/unistuttgart-visus/$(dockerImage):master - - steps: - - template: .ci/check-pr-labels-step-bash.yml - - bash: | - mkdir -p $VCPKG_DEFAULT_BINARY_CACHE - mkdir -p $X_VCPKG_REGISTRIES_CACHE - displayName: 'Setup vcpkg cache directories' - - bash: echo "##vso[task.setvariable variable=numberOfCpuCores]$(nproc)" - displayName: 'Bash get number of CPU cores' - - task: CMake@1 - displayName: 'CMake Configure' - inputs: - cmakeArgs: '.. -G"$(generator)" -DCMAKE_C_COMPILER=$(cCompiler) -DCMAKE_CXX_COMPILER=$(cxxCompiler) -DCMAKE_BUILD_TYPE=$(configuration) $(cmakeExtraArgs)' - - task: CMake@1 - displayName: 'CMake Build' - inputs: - cmakeArgs: '--build . --parallel $(numberOfCpuCores)' diff --git a/cmake/megamol_feature_option.cmake b/cmake/megamol_feature_option.cmake index d87a2dec71..ebe009ade5 100644 --- a/cmake/megamol_feature_option.cmake +++ b/cmake/megamol_feature_option.cmake @@ -30,10 +30,13 @@ function(megamol_feature_option OPTION_NAME OPTION_DESCRIPTION OPTION_DEFAULT) message(FATAL_ERROR "MegaMol feature option \"${OPTION_NAME_LOWER}\" is missing in vcpkg.json") endif () - # Allow CI to override all features to default to on. + # Allow CI to override all features to default to on/off. if (MEGAMOL_ENABLE_ALL_FEATURES) set(OPTION_DEFAULT ON) endif () + if (MEGAMOL_DISABLE_ALL_FEATURES) + set(OPTION_DEFAULT OFF) + endif () if (${ARGC} GREATER 3) cmake_dependent_option(MEGAMOL_USE_${OPTION_NAME} "${OPTION_DESCRIPTION}" "${OPTION_DEFAULT}" "${ARGV3}" OFF) diff --git a/cmake/vcpkg_triplets/x64-linux-dynamic.cmake b/cmake/vcpkg_triplets/x64-linux-dynamic.cmake new file mode 100644 index 0000000000..96281a5071 --- /dev/null +++ b/cmake/vcpkg_triplets/x64-linux-dynamic.cmake @@ -0,0 +1,12 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) + +set(VCPKG_FIXUP_ELF_RPATH ON) + +# Debug build is very large, i.e., runs into GitHub Actions runner limits. +if (PORT EQUAL "vtk-m") + set(VCPKG_BUILD_TYPE release) +endif () diff --git a/cmake/vcpkg_triplets/x64-linux.cmake b/cmake/vcpkg_triplets/x64-linux.cmake index be799b594e..985b9a4697 100644 --- a/cmake/vcpkg_triplets/x64-linux.cmake +++ b/cmake/vcpkg_triplets/x64-linux.cmake @@ -7,3 +7,8 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux) if (PORT EQUAL "tbb") set(VCPKG_LIBRARY_LINKAGE dynamic) endif () + +# Debug build is very large, i.e., runs into GitHub Actions runner limits. +if (PORT EQUAL "vtk-m") + set(VCPKG_BUILD_TYPE release) +endif () diff --git a/cmake/vcpkg_triplets/x64-windows-static.cmake b/cmake/vcpkg_triplets/x64-windows-static.cmake index 16974a476f..b47109cbdb 100644 --- a/cmake/vcpkg_triplets/x64-windows-static.cmake +++ b/cmake/vcpkg_triplets/x64-windows-static.cmake @@ -7,3 +7,8 @@ set(VCPKG_DISABLE_COMPILER_TRACKING ON) if (PORT EQUAL "tbb") set(VCPKG_LIBRARY_LINKAGE dynamic) endif () + +# Debug build is very large, i.e., runs into GitHub Actions runner limits. +if (PORT EQUAL "vtk-m") + set(VCPKG_BUILD_TYPE release) +endif () diff --git a/cmake/vcpkg_triplets/x64-windows.cmake b/cmake/vcpkg_triplets/x64-windows.cmake index 07d640a35b..b5fddd64c5 100644 --- a/cmake/vcpkg_triplets/x64-windows.cmake +++ b/cmake/vcpkg_triplets/x64-windows.cmake @@ -3,3 +3,8 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE dynamic) set(VCPKG_DISABLE_COMPILER_TRACKING ON) + +# Debug build is very large, i.e., runs into GitHub Actions runner limits. +if (PORT EQUAL "vtk-m") + set(VCPKG_BUILD_TYPE release) +endif () diff --git a/plugins/datatools/src/ParticleNeighborhoodGraph.cpp b/plugins/datatools/src/ParticleNeighborhoodGraph.cpp index 326a530fbb..f0634565b9 100644 --- a/plugins/datatools/src/ParticleNeighborhoodGraph.cpp +++ b/plugins/datatools/src/ParticleNeighborhoodGraph.cpp @@ -245,7 +245,7 @@ void ParticleNeighborhoodGraph::calcData(geocalls::MultiParticleDataCall* data) float bboxCentY = bboxCent.Y(); float bboxCentZ = bboxCent.Z(); -#define _COORD(x, y, z) ((x) + ((y) + ((z) *y_size)) * x_size) +#define _COORD(x, y, z) ((x) + ((y) + ((z) * y_size)) * x_size) std::vector grid(d.get_count()); std::vector gridCell(x_size * y_size * z_size); diff --git a/plugins/imageseries/CMakeLists.txt b/plugins/imageseries/CMakeLists.txt index 91230d3f3d..e7a051e188 100644 --- a/plugins/imageseries/CMakeLists.txt +++ b/plugins/imageseries/CMakeLists.txt @@ -1,10 +1,10 @@ # MegaMol -# Copyright (c) 2021-2023, MegaMol Dev Team +# Copyright (c) 2021, MegaMol Dev Team # All rights reserved. # megamol_plugin(imageseries - BUILD_DEFAULT OFF + BUILD_DEFAULT ON DEPENDS_PLUGINS mmstd ) diff --git a/plugins/imageseries_gl/CMakeLists.txt b/plugins/imageseries_gl/CMakeLists.txt index 2ad3b0fc68..9658dd6cdb 100644 --- a/plugins/imageseries_gl/CMakeLists.txt +++ b/plugins/imageseries_gl/CMakeLists.txt @@ -1,10 +1,10 @@ # MegaMol -# Copyright (c) 2021-2023, MegaMol Dev Team +# Copyright (c) 2021, MegaMol Dev Team # All rights reserved. # megamol_plugin(imageseries_gl - BUILD_DEFAULT OFF + BUILD_DEFAULT ON DEPENDS_FEATURES opengl DEPENDS_PLUGINS diff --git a/plugins/protein_cuda/src/quicksurf/WKFThreads.cpp b/plugins/protein_cuda/src/quicksurf/WKFThreads.cpp index 3db35999e5..13cf28a5df 100644 --- a/plugins/protein_cuda/src/quicksurf/WKFThreads.cpp +++ b/plugins/protein_cuda/src/quicksurf/WKFThreads.cpp @@ -254,7 +254,7 @@ static void wkf_cpuid(unsigned int eax, unsigned int ecx, unsigned int* abcd) { #if defined(_MSC_VER) __cpuidex((int*) abcd, eax, ecx); #else - // uint32_t ebx, edx; + // uint32_t ebx, edx; unsigned int ebx = 0, edx = 0; #if defined(__i386__) && defined(__PIC__) /* in case of PIC under 32-bit EBX cannot be clobbered */ diff --git a/vislib/include/vislib/math/AbstractMatrix.h b/vislib/include/vislib/math/AbstractMatrix.h index 7a82f4dc1a..6be1664b86 100644 --- a/vislib/include/vislib/math/AbstractMatrix.h +++ b/vislib/include/vislib/math/AbstractMatrix.h @@ -177,7 +177,7 @@ unsigned int AbstractMatrix::FindEigenvalues( */ template T AbstractMatrix::Determinant() const { -#define A(r, c) a[(r) *D + (c)] +#define A(r, c) a[(r) * D + (c)] double a[D * D]; // input matrix for algorithm double f; // Multiplication factor. double max; // Row pivotising. diff --git a/vislib/include/vislib/math/AbstractMatrixImpl.h b/vislib/include/vislib/math/AbstractMatrixImpl.h index 408adf4af7..3c9e4b62b9 100644 --- a/vislib/include/vislib/math/AbstractMatrixImpl.h +++ b/vislib/include/vislib/math/AbstractMatrixImpl.h @@ -778,7 +778,7 @@ Vector AbstractMatrixImpl::GetRow(const int row) const { template class C> bool AbstractMatrixImpl::Invert() { -#define A(r, c) a[(r) *2 * D + (c)] +#define A(r, c) a[(r) * 2 * D + (c)] double a[2 * D * D]; // input matrix for algorithm double f; // Multiplication factor. double max; // Row pivotising. @@ -1382,7 +1382,7 @@ unsigned int AbstractMatrixImpl::findEigenvaluesSym( if (((outEigenvalues == NULL) && (outEigenvectors == NULL)) || (size == 0)) return 0; -#define A(r, c) a[(r) *D + (c)] +#define A(r, c) a[(r) * D + (c)] double a[D * D]; // input matrix for algorithm double d[D]; // diagonal elements double e[D]; // off-diagonal elements diff --git a/vislib/src/sys/sysfunctions.cpp b/vislib/src/sys/sysfunctions.cpp index 92673dda0d..893a277a4d 100644 --- a/vislib/src/sys/sysfunctions.cpp +++ b/vislib/src/sys/sysfunctions.cpp @@ -319,7 +319,7 @@ bool vislib::sys::ReadTextFile( } break; case TEXTFF_UNICODE: #ifdef _WIN32 - CASE_TEXTFF_UNICODE : + CASE_TEXTFF_UNICODE: #endif /* _WIN32 */ { vislib::StringW tmp; @@ -402,7 +402,7 @@ bool vislib::sys::ReadTextFile( } break; case TEXTFF_UNICODE: #ifdef _WIN32 - CASE_TEXTFF_UNICODE : + CASE_TEXTFF_UNICODE: #endif /* _WIN32 */ { wchar_t* src = outStr.AllocateBuffer(static_cast((len / sizeof(wchar_t)) + sizeof(wchar_t))); @@ -615,7 +615,7 @@ bool vislib::sys::WriteTextFile( goto CASE_TEXTFF_ASCII; break; case TEXTFF_ASCII: - CASE_TEXTFF_ASCII : { + CASE_TEXTFF_ASCII: { // no BOM possible StringA::Size len = text.Length(); return (static_cast(file.Write(text.PeekBuffer(), len)) == len); @@ -697,7 +697,7 @@ bool vislib::sys::WriteTextFile( break; case TEXTFF_UNICODE: #ifdef _WIN32 - CASE_TEXTFF_UNICODE : + CASE_TEXTFF_UNICODE: #endif /* _WIN32 */ { #ifdef _WIN32 @@ -710,7 +710,7 @@ bool vislib::sys::WriteTextFile( return (static_cast(file.Write(text.PeekBuffer(), len)) == len); } break; case TEXTFF_UTF8: - CASE_TEXTFF_UTF8 : { + CASE_TEXTFF_UTF8: { vislib::StringA bytes; UTF8Encoder::Encode(bytes, text); if (bom != TEXTFF_BOM_NO) {