Skip to content

Commit

Permalink
Merge branch 'master' into add-static-library-option
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinstoecker authored Oct 23, 2024
2 parents ca3d3ad + c80f83b commit ad947d7
Show file tree
Hide file tree
Showing 59 changed files with 551 additions and 214 deletions.
88 changes: 61 additions & 27 deletions .github/workflows/releaseDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ jobs:
matrix:
include:
- os: windows-latest
artifact-name: rayx-win64.zip
build-type: Release
- os: ubuntu-latest
artifact-name: rayx-Linux.deb
- os: ubuntu-24.04
build-type: Release

steps:
Expand Down Expand Up @@ -70,64 +68,98 @@ jobs:

- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest'
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_REQUIRE_CUDA=ON
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_REQUIRE_CUDA=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install

# Linux-specific build steps
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-24.04'
run: |
sudo apt update --yes
sudo apt install --yes xorg-dev cmake libgtk-3-dev libdbus-1-dev libhdf5-dev libboost-dev
- name: Install Cuda (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: Jimver/cuda-toolkit@v0.2.16
if: matrix.os == 'ubuntu-24.04'
uses: Jimver/cuda-toolkit@master
id: cuda-toolkit-ubuntu
with:
cuda: '12.3.2'
cuda: '12.4.1'

- name: Configure CMake (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_REQUIRE_CUDA=ON
if: matrix.os == 'ubuntu-24.04'
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_REQUIRE_CUDA=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install

# Build the project
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build-type }}

- name: Test
working-directory: ${{github.workspace}}/build/bin/release
run: ./rayx-core-tst -x

- name: CPack (Windows)
# Generate Windows artifacts (ZIP and NSIS installer)
- name: CPack (Windows - ZIP)
if: matrix.os == 'windows-latest'
working-directory: ${{github.workspace}}/build
run: cpack -G ZIP

- name: CPack (Ubuntu)
if: matrix.os == 'ubuntu-latest'
- name: CPack (Windows - NSIS Installer)
if: matrix.os == 'windows-latest'
working-directory: ${{github.workspace}}/build
run: cpack -G NSIS

# Generate Linux artifacts (DEB, RPM, TAR)
- name: CPack (Ubuntu - DEB)
if: matrix.os == 'ubuntu-24.04'
working-directory: ${{github.workspace}}/build
run: cpack -G DEB

- name: Upload build artifact (Windows)
- name: CPack (Ubuntu - RPM)
if: matrix.os == 'ubuntu-24.04'
working-directory: ${{github.workspace}}/build
run: cpack -G RPM

- name: CPack (Ubuntu - TAR)
if: matrix.os == 'ubuntu-24.04'
working-directory: ${{github.workspace}}/build
run: cpack -G TGZ

# Upload artifacts (Windows)
- name: Upload build artifacts (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{github.workspace}}/build/RAYX-*-win64.zip
name: windows-artifacts
path: |
${{github.workspace}}/build/RAYX-*.zip
${{github.workspace}}/build/RAYX-*.exe
if-no-files-found: error

- name: Upload build artifact (Ubuntu)
if: matrix.os == 'ubuntu-latest'

# Upload artifacts (Ubuntu)
- name: Upload build artifacts (Ubuntu)
if: matrix.os == 'ubuntu-24.04'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{github.workspace}}/build/RAYX-*-Linux.deb
name: ubuntu-artifacts
path: |
${{github.workspace}}/build/RAYX-*.deb
${{github.workspace}}/build/RAYX-*.rpm
${{github.workspace}}/build/RAYX-*.tar.gz
if-no-files-found: error

- name: Extract version from tag
id: get_version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

- name: Archive source code
run: |
git archive HEAD --format=zip --output=${{github.workspace}}/build/RAYX-source-v${{env.version}}.zip
release:
name: Create Release
needs: build-and-release
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
# Checkout CHANGELOG.md
- name: Checkout code
uses: actions/checkout@v4
with:
Expand All @@ -148,9 +180,11 @@ jobs:
with:
body_path: ${{github.workspace}}/CHANGELOG.md
files: |
${{github.workspace}}/artifacts/rayx-win64.zip/*.zip
${{github.workspace}}/artifacts/rayx-Linux.deb/*.deb
${{github.workspace}}/artifacts/windows-artifacts/*.zip
${{github.workspace}}/artifacts/windows-artifacts/*.exe
${{github.workspace}}/artifacts/ubuntu-artifacts/*.deb
${{github.workspace}}/artifacts/ubuntu-artifacts/*.rpm
${{github.workspace}}/artifacts/ubuntu-artifacts/*.tar.gz
${{github.workspace}}/artifacts/ubuntu-artifacts/RAYX-source-v${{env.version}}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


38 changes: 20 additions & 18 deletions .github/workflows/testUbuntu.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
name: testUbuntu

on: [push, pull_request]
on:
push:
branches:
- '**' # Run on all branches
tags-ignore:
- 'v*' # Ignore tag pushes matching 'v*'
pull_request:
branches:
- '**' # Run for all pull requests

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Make some space
- name: Update Repositories to Ubuntu 24.04
run: |
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/share/swift
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache
sudo rm -rf /opt/ghc
sudo rm -rf /opt/az
df -h
sudo sed -i 's/jammy/lunar/g' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
sudo apt update
- name: Install dependencies
- name: Install Vulkan SDK
run: |
sudo wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.224-focal.list https://packages.lunarg.com/vulkan/1.3.224/lunarg-vulkan-1.3.224-focal.list
sudo apt update --yes
sudo apt install --yes vulkan-sdk xorg-dev cmake libgtk-3-dev libdbus-1-dev libboost-dev
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/lunarg.gpg
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.296-noble.list https://packages.lunarg.com/vulkan/1.3.296/lunarg-vulkan-1.3.296-noble.list
sudo apt update && sudo apt install --yes vulkan-sdk xorg-dev cmake libgtk-3-dev libdbus-1-dev libboost-dev
- name: Install Cuda
uses: Jimver/cuda-toolkit@v0.2.16
uses: Jimver/cuda-toolkit@master
id: cuda-toolkit
with:
cuda: '12.3.2'
cuda: '12.4.1'

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DRAYX_REQUIRE_CUDA=ON
Expand Down
37 changes: 25 additions & 12 deletions .github/workflows/testUbuntuClang.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
name: testUbuntuClang

on: [push, pull_request]
on:
push:
branches:
- '**' # Run on all branches
tags-ignore:
- 'v*' # Ignore tag pushes matching 'v*'
pull_request:
branches:
- '**' # Run for all pull requests

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
- name: Update Repositories to Ubuntu 24.04
run: |
sudo sed -i 's/jammy/lunar/g' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
sudo apt update
- name: Install Vulkan SDK
run: |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/lunarg.gpg
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.296-noble.list https://packages.lunarg.com/vulkan/1.3.296/lunarg-vulkan-1.3.296-noble.list
sudo apt update && sudo apt install --yes vulkan-sdk xorg-dev cmake libgtk-3-dev libdbus-1-dev libboost-dev
- name: Install llvm
run: |
sudo wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.224-focal.list https://packages.lunarg.com/vulkan/1.3.224/lunarg-vulkan-1.3.224-focal.list
sudo apt update --yes
sudo apt install --yes vulkan-sdk xorg-dev cmake libgtk-3-dev libdbus-1-dev libboost-dev
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 17
Expand All @@ -29,13 +45,10 @@ jobs:
run: |
CC="clang-17" CXX="clang++-17" cmake -B ${{github.workspace}}/build \
-DWERROR=YES \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DRAYX_ENABLE_CUDA=OFF \
-DCMAKE_CXX_FLAGS="-fopenmp -Werror" \
-DCMAKE_EXE_LINKER_FLAGS="-L/usr/lib/llvm-17/lib -lomp"
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: CXX="clang++-17 -Werror" cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Run
working-directory: ${{github.workspace}}
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/testWindows.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
name: testWindows

on: [push, pull_request]
on:
push:
branches:
- '**' # Run on all branches
tags-ignore:
- 'v*' # Ignore tag pushes matching 'v*'
pull_request:
branches:
- '**' # Run for all pull requests

env:
BUILD_TYPE: Release

jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -35,10 +44,10 @@ jobs:
uses: MarkusJx/install-boost@v2.4.5
id: install-boost
with:
boost_version: 1.84.0
boost_install_dir: ${{github.workspace}}/boost
platform_version: 2019
toolset: msvc
boost_version: 1.84.0
boost_install_dir: ${{github.workspace}}/boost
platform_version: 2019
toolset: msvc

- name: Add Boost to PATH
run: |
Expand All @@ -50,7 +59,7 @@ jobs:
shell: pwsh
run: .\Scripts\setup-cuda.ps1
env:
INPUT_CUDA_VERSION: 12.5.1
INPUT_CUDA_VERSION: 12.5.1

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DRAYX_REQUIRE_CUDA=ON
Expand Down
44 changes: 30 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
cmake_minimum_required(VERSION 3.25.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)

# ---- Project ----
project(RAYX VERSION 0.21.2)
set(CMAKE_CXX_STANDARD 23)
project(RAYX VERSION 0.21.7)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_STANDARD 20)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)

# ------------------

# ---- Options ----
option(WERROR "add -Werror option" "NO") # inactive per default
option(RAYX_ENABLE_CUDA "This option enables the search for CUDA. Project will be compiled without cuda if not found." ON)
option(RAYX_REQUIRE_CUDA "If option 'RAYX_ENABLE_CUDA' is ON, this option will add the requirement that cuda must be found." OFF)
option(RAYX_STATIC_LIB "Build static library" OFF)

# ------------------

# ---- Subdirectories ----
add_subdirectory(Extern)
add_subdirectory(Intern)

# ---- Code Coverage ----
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/Extern/cmake)

# ------------------

# ---- CPack ----
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_VENDOR "RAYX")
set(CPACK_PACKAGE_CONTACT "Max Mustermann <" ${PROJECT_NAME} "@helmholtz-berlin.de>")
include(CPack)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_DESCRIPTION "${PROJECT_NAME} - For simulating and designing beamlines at synchrotron light sources")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} - For simulating and designing beamlines at synchrotron light sources")
set(CPACK_PACKAGE_VENDOR "Helmhotz-Zentrum Berlin")
set(CPACK_PACKAGE_CONTACT "jannis.maier@helmholtz-berlin.de")

# Disable GoogleTest installation
set(INSTALL_GTEST OFF CACHE BOOL "Disable installation of GoogleTest" FORCE)
set(INSTALL_GMOCK OFF CACHE BOOL "Disable installation of GoogleMock" FORCE)

# Install directories
if(APPLE)
set(INSTALL_DATA_DIR "Library/Application Support/${PROJECT_NAME}")
set(INSTALL_FONTS_DIR "Library/Fonts/${PROJECT_NAME}")
elseif(UNIX AND NOT APPLE)
set(INSTALL_DATA_DIR "share/${PROJECT_NAME}")
set(INSTALL_FONTS_DIR "share/fonts/${PROJECT_NAME}")
elseif(WIN32)
set(INSTALL_DATA_DIR ".")
set(INSTALL_FONTS_DIR ".")
endif()
# ------------------


# ---- Subdirectories ----
add_subdirectory(Extern)
add_subdirectory(Intern)
# ------------------
2 changes: 1 addition & 1 deletion Extern/HighFive
Submodule HighFive updated 38 files
+6 −15 .github/workflows/ci.yml
+2 −4 .github/workflows/clang_format.yml
+4 −3 .github/workflows/coverage.yml
+4 −2 .github/workflows/gh-pages.yml
+5 −3 .github/workflows/version_file.yml
+17 −0 CHANGELOG.md
+1 −1 CMakeLists.txt
+2 −1 README.md
+1 −0 doc/Doxyfile
+134 −0 doc/migration_guide.md
+12 −2 include/highfive/H5Attribute.hpp
+17 −0 include/highfive/H5DataSpace.hpp
+10 −1 include/highfive/H5DataType.hpp
+3 −3 include/highfive/H5Version.hpp
+14 −4 include/highfive/bits/H5Attribute_misc.hpp
+3 −3 include/highfive/bits/H5DataType_misc.hpp
+6 −0 include/highfive/bits/H5Dataspace_misc.hpp
+27 −7 include/highfive/bits/H5Inspector_misc.hpp
+3 −15 include/highfive/bits/H5Node_traits.hpp
+2 −23 include/highfive/bits/H5Node_traits_misc.hpp
+12 −12 include/highfive/bits/H5ReadWrite_misc.hpp
+141 −15 include/highfive/bits/H5Slice_traits.hpp
+20 −4 include/highfive/bits/H5Slice_traits_misc.hpp
+2 −0 include/highfive/bits/H5Utils.hpp
+10 −1 include/highfive/bits/H5_definitions.hpp
+21 −0 include/highfive/bits/h5s_wrapper.hpp
+2 −2 include/highfive/h5easy_bits/H5Easy_Eigen.hpp
+2 −2 include/highfive/h5easy_bits/H5Easy_opencv.hpp
+2 −2 include/highfive/h5easy_bits/H5Easy_xtensor.hpp
+0 −42 src/examples/read_write_fixedlen_string.cpp
+1 −1 src/examples/read_write_raw_ptr.cpp
+3 −1 tests/unit/CMakeLists.txt
+1 −1 tests/unit/data_generator.hpp
+10 −0 tests/unit/deprecated/CMakeLists.txt
+172 −0 tests/unit/deprecated/test_fixed_len_string_array.cpp
+57 −0 tests/unit/test_high_five_selection.cpp
+38 −0 tests/unit/test_legacy.cpp
+9 −188 tests/unit/tests_high_five_base.cpp
2 changes: 1 addition & 1 deletion Extern/VMA
Submodule VMA updated 1 files
+0 −2 include/vk_mem_alloc.h
Loading

0 comments on commit ad947d7

Please sign in to comment.