diff --git a/.github/workflows/build-quick.yml b/.github/workflows/build-quick.yml index 0ad98947..fbee439b 100644 --- a/.github/workflows/build-quick.yml +++ b/.github/workflows/build-quick.yml @@ -10,27 +10,62 @@ permissions: read-all jobs: build-linux: if: github.repository_owner == 'oneapi-src' - runs-on: [ubuntu-latest] + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + container: + - ubuntu:22.04 + - ubuntu:24.04 + - redhat/ubi9:latest + container: + image: ${{ matrix.container }} steps: + - name: Install dependencies + run: | + if [ -f /etc/redhat-release ]; then + # RHEL/UBI-based system + yum install -y gcc gcc-c++ cmake make git + else + # Ubuntu-based system + apt-get update + apt-get install -y build-essential cmake git + fi - uses: actions/checkout@v3 - - uses: hendrikmuhs/ccache-action@v1 - - name: Build Loader on Latest Ubuntu + - name: Build Loader on ${{ matrix.container }} run: | mkdir build cd build cmake \ - -D CMAKE_C_COMPILER_LAUNCHER=ccache \ - -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ -D CMAKE_BUILD_TYPE=Release \ -D BUILD_L0_LOADER_TESTS=1 \ + -D INSTALL_NULL_DRIVER=1 \ .. make -j$(nproc) - env: ZEL_LIBRARY_PATH: '${{ github.workspace }}/build/lib' working-directory: build run: ctest -V - - working-directory: build - run: sudo make install + - name: Install loader and NULL driver + working-directory: build + run: make install + - name: Update library cache + run: ldconfig + - name: Test installed loader with zello_world and NULL driver + working-directory: build + run: | + + # Set up environment for NULL driver + export ZE_ENABLE_NULL_DRIVER=1 + export ZE_ENABLE_LOADER_DEBUG_TRACE=1 + + # Run zello_world with NULL driver + ./bin/zello_world + + echo "✓ zello_world ran successfully with installed loader and NULL driver" + - name: Uninstall loader + working-directory: build + run: make uninstall || xargs rm -v < install_manifest.txt build-windows: if: github.repository_owner == 'oneapi-src' diff --git a/CHANGELOG.md b/CHANGELOG.md index d5c1813f..1ab1f8bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # Level zero loader changelog +## v1.26.2 +* fix: fix Driver Search Paths for all Linux Distros ## v1.26.1 * fix: Init DDI Tables during constructor ## v1.26.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index a2140816..a0a9138d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ if(MSVC AND (MSVC_VERSION LESS 1900)) endif() # This project follows semantic versioning (https://semver.org/) -project(level-zero VERSION 1.26.1) +project(level-zero VERSION 1.26.2) include(GNUInstallDirs) find_package(Git) diff --git a/PRODUCT_GUID.txt b/PRODUCT_GUID.txt index aea332dc..846068bc 100644 --- a/PRODUCT_GUID.txt +++ b/PRODUCT_GUID.txt @@ -1,2 +1,2 @@ -1.26.1 -600ff616-cc9c-4f9e-b5f8-1dc04132c971 \ No newline at end of file +1.26.2 +cf85b8de-e9c1-4d88-9f18-7164098e1c1e \ No newline at end of file diff --git a/source/loader/linux/driver_discovery_lin.cpp b/source/loader/linux/driver_discovery_lin.cpp index 70053b55..260aac06 100644 --- a/source/loader/linux/driver_discovery_lin.cpp +++ b/source/loader/linux/driver_discovery_lin.cpp @@ -46,10 +46,29 @@ static std::vector getLibrarySearchPaths() { auto split = splitPaths(ldLibPath); paths.insert(paths.end(), split.begin(), split.end()); } - // Standard locations + // Standard locations - Common across all Linux distributions paths.push_back("/lib"); paths.push_back("/usr/lib"); paths.push_back("/usr/local/lib"); + + // Multi-arch paths for Ubuntu/Debian + paths.push_back("/lib/x86_64-linux-gnu"); + paths.push_back("/usr/lib/x86_64-linux-gnu"); + paths.push_back("/lib/i386-linux-gnu"); + paths.push_back("/usr/lib/i386-linux-gnu"); + paths.push_back("/lib/aarch64-linux-gnu"); + paths.push_back("/usr/lib/aarch64-linux-gnu"); + + // 64-bit library paths for RHEL/CentOS/Fedora + paths.push_back("/lib64"); + paths.push_back("/usr/lib64"); + paths.push_back("/usr/local/lib64"); + + // Flatpak/Snap paths for containerized applications + paths.push_back("/var/lib/flatpak/runtime"); + paths.push_back("/snap/core/current/lib"); + paths.push_back("/snap/core/current/usr/lib"); + // /etc/ld.so.conf and included files std::ifstream ldSoConf("/etc/ld.so.conf"); if (ldSoConf) {