Skip to content

Commit 7723dc1

Browse files
cdeckerclaude
andcommitted
fix: Use full paths for LLVM 18 tools in workflow steps
The llvm-18-tools package installs tools in /usr/lib/llvm-18/bin/, not /usr/bin/. Environment variables and symlinks don't reliably carry over between GitHub Actions job steps. Solution: Use absolute paths (/usr/lib/llvm-18/bin/llvm-profdata, etc.) directly in all workflow steps where LLVM tools are called. Still create symlinks in /usr/bin for scripts that expect the tools to be in PATH. This ensures LLVM tools are found regardless of how the shell is invoked or what environment variables are set in different job steps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
1 parent e0a281f commit 7723dc1

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/coverage-nightly.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
echo "Recording LLVM version used for compilation..."
4545
clang-18 --version > LLVM_VERSION.txt
4646
echo "" >> LLVM_VERSION.txt
47-
llvm-profdata-18 --version >> LLVM_VERSION.txt
47+
/usr/lib/llvm-18/bin/llvm-profdata --version >> LLVM_VERSION.txt
4848
cat LLVM_VERSION.txt
4949
tar -rf testpack.tar.bz2 LLVM_VERSION.txt
5050
@@ -148,7 +148,7 @@ jobs:
148148
echo ""
149149
echo "Current system LLVM version:"
150150
clang-18 --version
151-
llvm-profdata-18 --version
151+
/usr/lib/llvm-18/bin/llvm-profdata --version
152152
else
153153
echo "⚠ WARNING: LLVM_VERSION.txt not found in build artifact"
154154
fi
@@ -190,10 +190,9 @@ jobs:
190190
if: always()
191191
run: |
192192
echo "Verifying LLVM 18 tools are available..."
193-
which llvm-profdata-18
194-
llvm-profdata-18 --version
193+
/usr/lib/llvm-18/bin/llvm-profdata --version
195194
# Create symlinks for scripts that expect llvm-profdata without version suffix
196-
sudo ln -sf /usr/bin/llvm-profdata-18 /usr/bin/llvm-profdata || true
195+
sudo ln -sf /usr/lib/llvm-18/bin/llvm-profdata /usr/bin/llvm-profdata || true
197196
198197
- name: Merge coverage data locally
199198
if: always()
@@ -234,13 +233,11 @@ jobs:
234233
- name: Verify LLVM tools are available
235234
run: |
236235
echo "Verifying LLVM 18 tools are available..."
237-
which llvm-profdata-18
238-
which llvm-cov-18
239-
llvm-profdata-18 --version
240-
llvm-cov-18 --version
236+
/usr/lib/llvm-18/bin/llvm-profdata --version
237+
/usr/lib/llvm-18/bin/llvm-cov --version
241238
# Create symlinks for scripts that expect tools without version suffix
242-
sudo ln -sf /usr/bin/llvm-profdata-18 /usr/bin/llvm-profdata || true
243-
sudo ln -sf /usr/bin/llvm-cov-18 /usr/bin/llvm-cov || true
239+
sudo ln -sf /usr/lib/llvm-18/bin/llvm-profdata /usr/bin/llvm-profdata || true
240+
sudo ln -sf /usr/lib/llvm-18/bin/llvm-cov /usr/bin/llvm-cov || true
244241
245242
- name: Download build artifact
246243
uses: actions/download-artifact@v4
@@ -258,7 +255,7 @@ jobs:
258255
cat LLVM_VERSION.txt
259256
echo ""
260257
echo "Current system LLVM version:"
261-
llvm-profdata-18 --version
258+
/usr/lib/llvm-18/bin/llvm-profdata --version
262259
echo ""
263260
echo "✓ LLVM version verification complete"
264261
else

0 commit comments

Comments
 (0)