Skip to content

Commit 8880143

Browse files
committed
[workflows] Fix libclc CI tests (llvm#80942)
This was broken by 1a64260. (cherry picked from commit ab92f62)
1 parent 5fe751d commit 8880143

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/llvm-project-tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,16 @@ jobs:
105105
# This should be a no-op for non-mac OSes
106106
PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12
107107
shell: bash
108+
id: build-llvm
108109
run: |
109110
if [ "${{ runner.os }}" == "Linux" ]; then
110111
builddir="/mnt/build/"
111112
sudo mkdir -p $builddir
112113
sudo chown `whoami`:`whoami` $builddir
113114
else
114-
builddir=build
115+
builddir="$(pwd)"/build
115116
fi
117+
echo "llvm-builddir=$builddir" >> "$GITHUB_OUTPUT"
116118
cmake -G Ninja \
117119
-B "$builddir" \
118120
-S llvm \
@@ -127,9 +129,11 @@ jobs:
127129
128130
- name: Build and Test libclc
129131
if: "!startsWith(matrix.os, 'windows') && contains(inputs.projects, 'libclc')"
132+
env:
133+
LLVM_BUILDDIR: ${{ steps.build-llvm.outputs.llvm-builddir }}
130134
run: |
131135
# Make sure all of LLVM libraries that llvm-config needs are built.
132-
ninja -C build
133-
cmake -G Ninja -S libclc -B libclc-build -DLLVM_DIR="$(pwd)"/build/lib/cmake/llvm -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
136+
ninja -C "$LLVM_BUILDDIR"
137+
cmake -G Ninja -S libclc -B libclc-build -DLLVM_DIR="$LLVM_BUILDDIR"/lib/cmake/llvm -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
134138
ninja -C libclc-build
135139
ninja -C libclc-build test

0 commit comments

Comments
 (0)