[llvm] [workflows] Fix libclc CI tests (PR #80942)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 22:23:03 PST 2024


https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/80942

This was broken by 1a6426067fb33a8a789978f6e229108787a041be.

>From afac4b29209c4e4bb39402faf608df0773b4734f Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Tue, 6 Feb 2024 19:05:44 +0000
Subject: [PATCH] [workflows] Fix libclc CI tests

This was broken by 1a6426067fb33a8a789978f6e229108787a041be.
---
 .github/workflows/llvm-project-tests.yml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index 3bc7bd4957fa6..68b4a68d1af98 100644
--- a/.github/workflows/llvm-project-tests.yml
+++ b/.github/workflows/llvm-project-tests.yml
@@ -104,14 +104,16 @@ jobs:
           # This should be a no-op for non-mac OSes
           PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12
         shell: bash
+        id: build-llvm
         run: |
           if [ "${{ runner.os }}" == "Linux" ]; then
             builddir="/mnt/build/"
             sudo mkdir -p $builddir
             sudo chown `whoami`:`whoami` $builddir
           else
-            builddir=build
+            builddir="$(pwd)"/build
           fi
+          echo "llvm-builddir=$builddir" >> "$GITHUB_OUTPUT"
           cmake -G Ninja \
                 -B "$builddir" \
                 -S llvm \
@@ -126,9 +128,11 @@ jobs:
 
       - name: Build and Test libclc
         if: "!startsWith(matrix.os, 'windows') && contains(inputs.projects, 'libclc')"
+        env:
+          LLVM_BUILDDIR: ${{ steps.build-llvm.outputs.llvm-builddir }}
         run: |
           # Make sure all of LLVM libraries that llvm-config needs are built.
-          ninja -C build
-          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"
+          ninja -C "$LLVM_BUILDDIR"
+          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"
           ninja -C libclc-build
           ninja -C libclc-build test



More information about the llvm-commits mailing list