From 7d06c018efc7b1eba5d5beb0fbbffae3126a3dc6 Mon Sep 17 00:00:00 2001 From: Jannis Maier Date: Tue, 15 Oct 2024 09:54:04 +0200 Subject: [PATCH] Updating for Ubuntu 24.04 runner --- .github/workflows/releaseDeploy.yml | 25 +++++++++--------- .github/workflows/testUbuntu.yml | 27 ++++++++------------ .github/workflows/testUbuntuClang.yml | 26 +++++++++++-------- CMakeLists.txt | 6 ++--- Extern/CLI11 | 2 +- Extern/HighFive | 2 +- Extern/VMA | 2 +- Extern/alpaka | 2 +- Extern/glfw | 2 +- Extern/googletest | 2 +- Extern/imgui | 2 +- Extern/stb | 2 +- Intern/rayx-core/src/Data/Locate.cpp | 6 ++--- Intern/rayx-core/src/Data/Locate.h | 6 ++--- Intern/rayx-core/src/Material/NffTable.cpp | 2 +- Intern/rayx-core/src/Material/PalikTable.cpp | 2 +- Intern/rayx-core/src/Shader/Rand.h | 2 ++ 17 files changed, 58 insertions(+), 60 deletions(-) diff --git a/.github/workflows/releaseDeploy.yml b/.github/workflows/releaseDeploy.yml index 87f64391..0472604b 100644 --- a/.github/workflows/releaseDeploy.yml +++ b/.github/workflows/releaseDeploy.yml @@ -14,7 +14,7 @@ jobs: include: - os: windows-latest build-type: Release - - os: ubuntu-latest + - os: ubuntu-24.04 build-type: Release steps: @@ -68,25 +68,24 @@ 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 -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install + run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_ENABLE_CUDA=OFF -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 + 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 -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install + if: matrix.os == 'ubuntu-24.04' + run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_ENABLE_CUDA=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install # Build the project - name: Build @@ -109,17 +108,17 @@ jobs: # Generate Linux artifacts (DEB, RPM, TAR) - name: CPack (Ubuntu - DEB) - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-24.04' working-directory: ${{github.workspace}}/build run: cpack -G DEB - name: CPack (Ubuntu - RPM) - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-24.04' working-directory: ${{github.workspace}}/build run: cpack -G RPM - name: CPack (Ubuntu - TAR) - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-24.04' working-directory: ${{github.workspace}}/build run: cpack -G TGZ @@ -136,7 +135,7 @@ jobs: # Upload artifacts (Ubuntu) - name: Upload build artifacts (Ubuntu) - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-24.04' uses: actions/upload-artifact@v4 with: name: ubuntu-artifacts @@ -158,7 +157,7 @@ jobs: release: name: Create Release needs: build-and-release - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/testUbuntu.yml b/.github/workflows/testUbuntu.yml index ddeeb670..f04bb135 100644 --- a/.github/workflows/testUbuntu.yml +++ b/.github/workflows/testUbuntu.yml @@ -16,36 +16,29 @@ env: 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: ubuntu-latest + 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 diff --git a/.github/workflows/testUbuntuClang.yml b/.github/workflows/testUbuntuClang.yml index 845753e3..6133f5a8 100644 --- a/.github/workflows/testUbuntuClang.yml +++ b/.github/workflows/testUbuntuClang.yml @@ -16,19 +16,26 @@ env: 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: ubuntu-latest + 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 @@ -38,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}} diff --git a/CMakeLists.txt b/CMakeLists.txt index f9b724f1..f19affa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.25.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.15 FATAL_ERROR) # ---- Project ---- -project(RAYX VERSION 0.21.3) -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) diff --git a/Extern/CLI11 b/Extern/CLI11 index 4ecbdd83..6c7b07a8 160000 --- a/Extern/CLI11 +++ b/Extern/CLI11 @@ -1 +1 @@ -Subproject commit 4ecbdd83e51eb49d1e4e99bea7c55e36c0426d34 +Subproject commit 6c7b07a878ad834957b98d0f9ce1dbe0cb204fc9 diff --git a/Extern/HighFive b/Extern/HighFive index 0d0259e8..4a326f35 160000 --- a/Extern/HighFive +++ b/Extern/HighFive @@ -1 +1 @@ -Subproject commit 0d0259e823a0e8aee2f036ba738c703ac4a0721c +Subproject commit 4a326f350d93d5847368105f840a1bd7e4094969 diff --git a/Extern/VMA b/Extern/VMA index 7942b798..009ecd19 160000 --- a/Extern/VMA +++ b/Extern/VMA @@ -1 +1 @@ -Subproject commit 7942b798289f752dc23b0a79516fd8545febd718 +Subproject commit 009ecd192c1289c7529bff248a16cfe896254816 diff --git a/Extern/alpaka b/Extern/alpaka index 887aee93..a4142d3f 160000 --- a/Extern/alpaka +++ b/Extern/alpaka @@ -1 +1 @@ -Subproject commit 887aee9304669331b9fc756132ef81aa61f4c349 +Subproject commit a4142d3feb7686d803e1ec5f25d7b2278337f455 diff --git a/Extern/glfw b/Extern/glfw index b35641f4..7b6aead9 160000 --- a/Extern/glfw +++ b/Extern/glfw @@ -1 +1 @@ -Subproject commit b35641f4a3c62aa86a0b3c983d163bc0fe36026d +Subproject commit 7b6aead9fb88b3623e3b3725ebb42670cbe4c579 diff --git a/Extern/googletest b/Extern/googletest index a7f443b8..b514bdc8 160000 --- a/Extern/googletest +++ b/Extern/googletest @@ -1 +1 @@ -Subproject commit a7f443b80b105f940225332ed3c31f2790092f47 +Subproject commit b514bdc898e2951020cbdca1304b75f5950d1f59 diff --git a/Extern/imgui b/Extern/imgui index 6d948ab4..b0185efd 160000 --- a/Extern/imgui +++ b/Extern/imgui @@ -1 +1 @@ -Subproject commit 6d948ab47ecf984239af01434f3ed03808dbf188 +Subproject commit b0185efd248e5d56a6728da6a4746d5826a14370 diff --git a/Extern/stb b/Extern/stb index 013ac3be..31707d14 160000 --- a/Extern/stb +++ b/Extern/stb @@ -1 +1 @@ -Subproject commit 013ac3beddff3dbffafd5177e7972067cd2b5083 +Subproject commit 31707d14fdb75da66b3eed52a2236a70af0d0960 diff --git a/Intern/rayx-core/src/Data/Locate.cpp b/Intern/rayx-core/src/Data/Locate.cpp index ffb693ad..b95420da 100644 --- a/Intern/rayx-core/src/Data/Locate.cpp +++ b/Intern/rayx-core/src/Data/Locate.cpp @@ -70,7 +70,7 @@ std::filesystem::path ResourceHandler::getExecutablePath() { } // General method to get the full path based on the base directory (e.g., data or font directory) -std::filesystem::path ResourceHandler::getFullPath(const std::string& baseDir, const std::string& relativePath) { +std::filesystem::path ResourceHandler::getFullPath(const std::filesystem::path& baseDir, const std::filesystem::path& relativePath) { // First, check in user-defined lookup paths for (const auto& lookupPath : lookUpPaths) { std::filesystem::path path = lookupPath / baseDir / relativePath; @@ -108,9 +108,9 @@ std::filesystem::path ResourceHandler::getFullPath(const std::string& baseDir, c } // Retrieve the full path of a resource based on the platform -std::filesystem::path ResourceHandler::getResourcePath(const std::string& relativePath) { return getFullPath(RAYX_DATA_DIR, relativePath); } +std::filesystem::path ResourceHandler::getResourcePath(const std::filesystem::path& relativePath) { return getFullPath(RAYX_DATA_DIR, relativePath); } // Retrieve the full path of a font based on the platform -std::filesystem::path ResourceHandler::getFontPath(const std::string& relativePath) { return getFullPath(RAYX_FONTS_DIR, relativePath); } +std::filesystem::path ResourceHandler::getFontPath(const std::filesystem::path& relativePath) { return getFullPath(RAYX_FONTS_DIR, relativePath); } } // namespace RAYX diff --git a/Intern/rayx-core/src/Data/Locate.h b/Intern/rayx-core/src/Data/Locate.h index 267a39c9..81cc53f5 100644 --- a/Intern/rayx-core/src/Data/Locate.h +++ b/Intern/rayx-core/src/Data/Locate.h @@ -19,10 +19,10 @@ class RAYX_API ResourceHandler { std::filesystem::path getExecutablePath(); // Retrieves a resource file's full path based on the relative path - std::filesystem::path getResourcePath(const std::string& relativePath); + std::filesystem::path getResourcePath(const std::filesystem::path& relativePath); // Retrieves a font file's full path based on the relative path - std::filesystem::path getFontPath(const std::string& relativePath); + std::filesystem::path getFontPath(const std::filesystem::path& relativePath); // Adds a new lookup path where the handler will search for resources void addLookUpPath(const std::filesystem::path& path); @@ -31,7 +31,7 @@ class RAYX_API ResourceHandler { ResourceHandler() = default; bool fileExists(const std::string& path); bool fileExists(const std::filesystem::path& path); - std::filesystem::path getFullPath(const std::string& baseDir, const std::string& relativePath); + std::filesystem::path getFullPath(const std::filesystem::path& baseDir, const std::filesystem::path& relativePath); std::vector lookUpPaths; // Maintains insertion order }; diff --git a/Intern/rayx-core/src/Material/NffTable.cpp b/Intern/rayx-core/src/Material/NffTable.cpp index 6de1b8ce..00b3d82e 100644 --- a/Intern/rayx-core/src/Material/NffTable.cpp +++ b/Intern/rayx-core/src/Material/NffTable.cpp @@ -14,7 +14,7 @@ bool NffTable::load(const char* element, NffTable* out) { std::transform(elementString.begin(), elementString.end(), elementString.begin(), [](unsigned char c) { return std::tolower(c); }); - std::filesystem::path f = ResourceHandler::getInstance().getResourcePath("Data/nff/" + elementString + ".nff"); + std::filesystem::path f = ResourceHandler::getInstance().getResourcePath(std::filesystem::path("Data") / "nff" / (elementString + ".nff")); RAYX_VERB << "Loading NffTable from " << f; std::ifstream s(f); diff --git a/Intern/rayx-core/src/Material/PalikTable.cpp b/Intern/rayx-core/src/Material/PalikTable.cpp index b154221c..bc0ba5d3 100644 --- a/Intern/rayx-core/src/Material/PalikTable.cpp +++ b/Intern/rayx-core/src/Material/PalikTable.cpp @@ -12,7 +12,7 @@ bool PalikTable::load(const char* element, PalikTable* out) { std::string elementString = element; std::transform(elementString.begin(), elementString.end(), elementString.begin(), [](unsigned char c) { return std::toupper(c); }); - std::filesystem::path f = ResourceHandler::getInstance().getResourcePath("Data/PALIK/" + elementString + ".NKP"); + std::filesystem::path f = ResourceHandler::getInstance().getResourcePath(std::filesystem::path("Data") / "PALIK" / (elementString + ".NKP")); RAYX_VERB << "Loading PalikTable from " << f; std::ifstream s(f); diff --git a/Intern/rayx-core/src/Shader/Rand.h b/Intern/rayx-core/src/Shader/Rand.h index f2e610c0..bd1cc745 100644 --- a/Intern/rayx-core/src/Shader/Rand.h +++ b/Intern/rayx-core/src/Shader/Rand.h @@ -2,6 +2,8 @@ #include "Core.h" +#include + namespace RAYX { /*