diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index bc865258c..941c8bdad 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -35,9 +35,15 @@ jobs: module use /space/pvelesko/modulefiles module load oneapi/2025.0.4 llvm/22.0-native HIP/chipStar/main level-zero/dgpu module list + # This install names a deleted CI staging dir; use copies of its config that name the install. + stale=$(sed -n 's/^HIP_PATH=//p' "$HIP_PATH/share/.hipInfo") + hip="$RUNNER_TEMP/chipstar-main" + rm -rf "$hip" && mkdir -p "$hip/bin" "$hip/share" "$hip/lib/cmake" + cp "$HIP_PATH/bin/hipcc" "$hip/bin/" && cp "$HIP_PATH/share/.hipInfo" "$hip/share/" && cp -r "$HIP_PATH/lib/cmake/hip" "$hip/lib/cmake/" + sed -i "s|$stale|$HIP_PATH|g" "$hip/share/.hipInfo" "$hip"/lib/cmake/hip/*.cmake rm -rf ~/.cache/chipStar build cmake -S . -B build \ - -DCMAKE_CXX_COMPILER="$(which hipcc)" \ + -DCMAKE_CXX_COMPILER="$hip/bin/hipcc" -Dhip_DIR="$hip/lib/cmake/hip" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TEST=ON -DBUILD_BENCHMARK=OFF \ -DAMDGPU_TEST_TARGETS="" \ @@ -106,9 +112,14 @@ jobs: shell: bash run: | set -e + export PATH="/opt/homebrew/bin:$PATH" + # Without an explicit deployment target, clang's HIP driver asserts in Darwin::AddDeploymentTarget. + export MACOSX_DEPLOYMENT_TARGET=15.0 source /opt/homebrew/Cellar/modules/5.6.0/init/bash module use ~/modulefiles module load llvm/22.0-native pocl HIP/chipStar/main + # The install's .hipInfo points this override at a deleted source tree. + export HIPCC_COMPILE_FLAGS_APPEND="-Xarch_device -I$(dirname "$(dirname "$(which hipcc)")")/include/hip/devicelib/macOS" module list rm -rf ~/.cache/chipStar build cmake -S . -B build \