Fix #3882: Avoid UB in float-to-unsigned constant conversion causing … #3024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2024-2026 Intel Corporation | |
| # SPDX-License-Identifier: BSD-3-Clause | |
| name: RK superbuild | |
| permissions: read-all | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-ispc-ubuntu-2204: | |
| uses: ./.github/workflows/reusable.ispc.build.yml | |
| with: | |
| platform: linux | |
| artifact_name: ispc_linux_package | |
| runner: ubuntu-22.04 | |
| llvm_version: "23.1" | |
| llvm_tar: llvm-23.1.0-ubuntu22.04-Release+Asserts-x86.arm.wasm.tar.xz | |
| build-ispc-aarch64: | |
| uses: ./.github/workflows/reusable.ispc.build.yml | |
| with: | |
| platform: linux | |
| artifact_name: ispc_linux_aarch64_package | |
| runner: ubuntu-22.04-arm | |
| llvm_version: "23.1" | |
| llvm_tar: llvm-23.1.0-ubuntu22.04aarch64-Release+Asserts-x86.arm.wasm.tar.xz | |
| build-ispc-windows: | |
| runs-on: windows-2022 | |
| env: | |
| LLVM_HOME: "C:\\projects\\llvm" | |
| LLVM_VERSION: "23.1" | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| submodules: true | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0 | |
| - name: Install dependencies | |
| run: | | |
| .github/workflows/scripts/install-build-deps.ps1 | |
| - name: Check environment | |
| shell: cmd | |
| run: | | |
| wmic cpu get caption, deviceid, name, numberofcores, maxclockspeed, status | |
| - name: Build package | |
| shell: cmd | |
| run: | | |
| set VSVARS="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
| call %VSVARS% | |
| cmake -B build superbuild --preset os -G "NMake Makefiles" -DXE_DEPS=OFF -DPREBUILT_STAGE2_PATH=%LLVM_HOME%\bin-%LLVM_VERSION% -DEXPLICIT_ENV_PATH=OFF -DGNUWIN32=%CROSS_TOOLS_GNUWIN32% | |
| cmake --build build | |
| - name: Upload package | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: ispc_win_package | |
| path: build/build-ispc-stage2/src/ispc-stage2-build/ispc-*-windows.zip | |
| build-rk-superbuild-ubuntu-2204: | |
| needs: build-ispc-ubuntu-2204 | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ubuntu:22.04 | |
| steps: | |
| - name: Install packages | |
| run: | | |
| echo "Installing build dependencies..." | |
| apt -y update && apt -y install git wget tar build-essential cmake ninja-build libglfw3-dev libgl1-mesa-dev libxinerama-dev libxcursor-dev libxi-dev python3-dev | |
| - name: Clone RK superbuild repo | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| repository: RenderKit/superbuild | |
| - name: Download package | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| with: | |
| name: ispc_linux_package | |
| - name: Run RK superbuild | |
| env: | |
| ISPC_VERSION: 1.30.0dev # the exact version is not important but suffix "dev" is required | |
| run: | | |
| ISPC_PACKAGE=$(ls ${GITHUB_WORKSPACE}/ispc-*-linux.tar.gz) | |
| mkdir build | |
| cd build | |
| cmake -DISPC_URL="${ISPC_PACKAGE}" -DISPC_VERSION=${{ env.ISPC_VERSION }} ../ | |
| cmake --build . | |
| - name: Upload RK install | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: rk_install_linux | |
| path: build/install | |
| test-oidn-ubuntu-2204: | |
| needs: build-rk-superbuild-ubuntu-2204 | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ubuntu:22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test: | |
| - name: oidnTest | |
| cmd: ./bin/oidnTest | |
| - name: oidnBenchmark | |
| cmd: ./bin/oidnBenchmark -v 1 | |
| steps: | |
| - name: Install packages | |
| run: | | |
| apt -y update && apt -y install libtbb-dev libglfw3-dev | |
| - name: Download RK install | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| with: | |
| name: rk_install_linux | |
| - name: Run ${{ matrix.test.name }} | |
| run: | | |
| chmod +x ./bin/* | |
| export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH | |
| ${{ matrix.test.cmd }} | |
| build-ospray-windows: | |
| needs: build-ispc-windows | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Clone RK ospray repo | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| repository: ospray/ospray | |
| - name: Download package | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| with: | |
| name: ispc_win_package | |
| - name: Add ISPC to the PATH | |
| run: | | |
| $zip = Get-ChildItem -Filter "ispc-*-windows.zip" | Select-Object -First 1 | |
| Expand-Archive $zip.FullName -DestinationPath $pwd | |
| $ispcDir = Get-ChildItem -Directory -Filter "ispc-*-windows" | Select-Object -First 1 | |
| echo "$pwd\$($ispcDir.Name)\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Build ospray superbuild | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -G "Visual Studio 17 2022" -A x64 ../scripts/superbuild -DDOWNLOAD_ISPC=OFF -DCMAKE_BUILD_TYPE=Release -DDEPENDENCIES_BUILD_TYPE=Release | |
| cmake --build . --config Release | |
| build-oidn-linux-aarch64: | |
| needs: build-ispc-aarch64 | |
| runs-on: ubuntu-24.04-arm | |
| container: | |
| image: arm64v8/ubuntu:22.04 | |
| steps: | |
| - name: Install packages | |
| run: | | |
| apt -y update && apt -y install build-essential cmake git git-lfs python3 libtbb2-dev | |
| - name: Clone OIDN repo | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| repository: RenderKit/oidn | |
| submodules: true | |
| lfs: true | |
| - name: Download ISPC package | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| with: | |
| name: ispc_linux_aarch64_package | |
| - name: Build OIDN | |
| run: | | |
| tar xf ispc-trunk-linux.tar.gz | |
| export PATH="${GITHUB_WORKSPACE}/ispc-trunk-linux/bin:$PATH" | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install -DOIDN_INSTALL_DEPENDENCIES=ON -DOIDN_ZIP_MODE=ON .. | |
| make -j$(nproc) install | |
| - name: Upload OIDN install | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: oidn_install_linux_aarch64 | |
| path: install | |
| test-oidn-linux-aarch64: | |
| needs: build-oidn-linux-aarch64 | |
| runs-on: ubuntu-24.04-arm | |
| container: | |
| image: arm64v8/ubuntu:22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test: | |
| - name: oidnTest | |
| cmd: ./bin/oidnTest | |
| - name: oidnBenchmark | |
| cmd: ./bin/oidnBenchmark -v 1 | |
| steps: | |
| - name: Install packages | |
| run: | | |
| apt -y update && apt -y install libtbb2-dev | |
| - name: Download OIDN install | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| with: | |
| name: oidn_install_linux_aarch64 | |
| - name: Run ${{ matrix.test.name }} | |
| run: | | |
| chmod +x ./bin/* | |
| export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH | |
| ${{ matrix.test.cmd }} |