Skip to content

Commit 838c1b6

Browse files
committed
Update CI and docs to use versioned LLVM path (llvm-14)
1 parent 0727d34 commit 838c1b6

6 files changed

Lines changed: 30 additions & 33 deletions

File tree

.github/workflows/python-release.yml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ jobs:
187187
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28"
188188
# Linux configuration - GCC Toolset and CUDA paths are conditional via matrix variables
189189
CIBW_ENVIRONMENT_LINUX: >
190-
PATH=${{ matrix.gcc_path_prefix }}$HOME/.cargo/bin:$HOME/.pecos/deps/llvm/bin:/usr/local/cuda-12.6/bin:$PATH
190+
PATH=${{ matrix.gcc_path_prefix }}$HOME/.cargo/bin:$HOME/.pecos/deps/llvm-14/bin:/usr/local/cuda-12.6/bin:$PATH
191191
LD_LIBRARY_PATH=${{ matrix.gcc_ld_path }}$LD_LIBRARY_PATH
192-
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm
192+
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm-14
193193
CUDA_PATH=/usr/local/cuda-12.6
194194
CIBW_BEFORE_ALL_LINUX: |
195195
curl -sSf https://sh.rustup.rs | sh -s -- -y
@@ -217,8 +217,8 @@ jobs:
217217
pipx run abi3audit --strict --report {wheel}
218218
# macOS configuration
219219
CIBW_ENVIRONMENT_MACOS: >
220-
PATH=$HOME/.cargo/bin:$HOME/.pecos/deps/llvm/bin:$PATH
221-
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm
220+
PATH=$HOME/.cargo/bin:$HOME/.pecos/deps/llvm-14/bin:$PATH
221+
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm-14
222222
MACOSX_DEPLOYMENT_TARGET=13.2
223223
CIBW_BEFORE_ALL_MACOS: |
224224
curl -sSf https://sh.rustup.rs | sh -s -- -y
@@ -231,21 +231,18 @@ jobs:
231231
printf '#!/bin/bash\nunset DYLD_LIBRARY_PATH\nexec /usr/bin/codesign "$@"\n' > $HOME/.pecos/bin/codesign
232232
chmod +x $HOME/.pecos/bin/codesign
233233
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
234-
PATH=$HOME/.pecos/bin:$PATH DYLD_LIBRARY_PATH=$HOME/.pecos/deps/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} &&
234+
PATH=$HOME/.pecos/bin:$PATH DYLD_LIBRARY_PATH=$HOME/.pecos/deps/llvm-14/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} &&
235235
pipx run abi3audit --strict --report {wheel}
236236
# Windows configuration - CUDA via Jimver/cuda-toolkit (installed before cibuildwheel)
237237
CIBW_ENVIRONMENT_WINDOWS: >
238-
PATH="C:\\Users\\runneradmin\\.pecos\\deps\\llvm\\bin;$PATH"
239-
LLVM_SYS_140_PREFIX="C:\\Users\\runneradmin\\.pecos\\deps\\llvm"
238+
PATH="C:\\Users\\runneradmin\\.pecos\\deps\\llvm-14\\bin;$PATH"
239+
LLVM_SYS_140_PREFIX="C:\\Users\\runneradmin\\.pecos\\deps\\llvm-14"
240240
CIBW_BEFORE_ALL_WINDOWS: >
241241
echo "=== Installing LLVM using pecos ===" &&
242242
rustup update &&
243-
echo "=== Running pecos install llvm ===" &&
244243
cargo run --release -p pecos-cli -- install llvm --force &&
245244
echo "=== Checking LLVM installation ===" &&
246-
(test -d "C:\\Users\\runneradmin\\.pecos\\deps\\llvm" && echo "LLVM directory exists" && ls -la "C:\\Users\\runneradmin\\.pecos\\deps\\llvm" && (ls -la "C:\\Users\\runneradmin\\.pecos\\deps\\llvm\\bin" || echo "bin directory not found")) || (echo "ERROR: LLVM directory not found!" && exit 1) &&
247-
echo "=== Verifying LLVM_SYS_140_PREFIX ===" &&
248-
echo "LLVM_SYS_140_PREFIX will be set to: C:\\Users\\runneradmin\\.pecos\\deps\\llvm"
245+
(test -d "C:\\Users\\runneradmin\\.pecos\\deps\\llvm-14" && echo "LLVM directory exists") || (echo "ERROR: LLVM directory not found!" && exit 1)
249246
# Install delvewheel and patch it to ignore ext-ms-win-* API sets
250247
# (delvewheel ignores api-ms-win-* but not ext-ms-win-* which are also Windows API sets)
251248
CIBW_BEFORE_BUILD_WINDOWS: >
@@ -276,8 +273,8 @@ jobs:
276273
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
277274
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28"
278275
CIBW_ENVIRONMENT_LINUX: >
279-
PATH=$HOME/.cargo/bin:$HOME/.pecos/deps/llvm/bin:$PATH
280-
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm
276+
PATH=$HOME/.cargo/bin:$HOME/.pecos/deps/llvm-14/bin:$PATH
277+
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm-14
281278
CIBW_BEFORE_ALL_LINUX: |
282279
curl -sSf https://sh.rustup.rs | sh -s -- -y
283280
source $HOME/.cargo/env
@@ -287,12 +284,12 @@ jobs:
287284
auditwheel repair -w {dest_dir} {wheel} &&
288285
pipx run abi3audit --strict --report {wheel}
289286
CIBW_ENVIRONMENT_MACOS: >
290-
PATH=$HOME/.cargo/bin:$HOME/.pecos/deps/llvm/bin:$PATH
291-
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm
287+
PATH=$HOME/.cargo/bin:$HOME/.pecos/deps/llvm-14/bin:$PATH
288+
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm-14
292289
MACOSX_DEPLOYMENT_TARGET=13.2
293290
CIBW_BEFORE_ALL_MACOS: |
294291
source $HOME/.cargo/env 2>/dev/null || { curl -sSf https://sh.rustup.rs | sh -s -- -y && source $HOME/.cargo/env; }
295-
if [ ! -d "$HOME/.pecos/deps/llvm/bin" ]; then
292+
if [ ! -d "$HOME/.pecos/deps/llvm-14/bin" ]; then
296293
rustup update
297294
cargo run --release -p pecos-cli -- install llvm --force
298295
else
@@ -302,19 +299,19 @@ jobs:
302299
printf '#!/bin/bash\nunset DYLD_LIBRARY_PATH\nexec /usr/bin/codesign "$@"\n' > $HOME/.pecos/bin/codesign
303300
chmod +x $HOME/.pecos/bin/codesign
304301
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
305-
PATH=$HOME/.pecos/bin:$PATH DYLD_LIBRARY_PATH=$HOME/.pecos/deps/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} &&
302+
PATH=$HOME/.pecos/bin:$PATH DYLD_LIBRARY_PATH=$HOME/.pecos/deps/llvm-14/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} &&
306303
pipx run abi3audit --strict --report {wheel}
307304
CIBW_ENVIRONMENT_WINDOWS: >
308-
PATH="C:\\Users\\runneradmin\\.pecos\\deps\\llvm\\bin;$PATH"
309-
LLVM_SYS_140_PREFIX="C:\\Users\\runneradmin\\.pecos\\deps\\llvm"
305+
PATH="C:\\Users\\runneradmin\\.pecos\\deps\\llvm-14\\bin;$PATH"
306+
LLVM_SYS_140_PREFIX="C:\\Users\\runneradmin\\.pecos\\deps\\llvm-14"
310307
CIBW_BEFORE_ALL_WINDOWS: >
311308
rustup update &&
312-
if not exist "C:\Users\runneradmin\.pecos\deps\llvm\bin" (cargo run --release -p pecos-cli -- install llvm --force) else (echo LLVM already installed from pecos-rslib build)
309+
if not exist "C:\Users\runneradmin\.pecos\deps\llvm-14\bin" (cargo run --release -p pecos-cli -- install llvm --force) else (echo LLVM already installed from pecos-rslib build)
313310
CIBW_BEFORE_BUILD_WINDOWS: >
314311
pip install delvewheel &&
315312
python -c "import delvewheel._dll_list as d,inspect,re as r;p=inspect.getfile(d);c=open(p).read();n=chr(10);open(p,'w').write(c.replace(r\"re.compile('api-.*'),\",r\"re.compile('api-.*'),\"+n+r\" re.compile('ext-.*'),\")) if 'ext-.*' not in c else None"
316313
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
317-
delvewheel repair -v --add-path "C:\\Users\\runneradmin\\.pecos\\deps\\llvm\\bin" --no-dll "combase.dll;rmclient.dll" -w {dest_dir} {wheel} &&
314+
delvewheel repair -v --add-path "C:\\Users\\runneradmin\\.pecos\\deps\\llvm-14\\bin" --no-dll "combase.dll;rmclient.dll" -w {dest_dir} {wheel} &&
318315
pipx run abi3audit --strict --report {wheel}
319316
320317
- name: Upload pecos-rslib-llvm wheels

.github/workflows/python-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
id: cache-llvm
102102
uses: actions/cache@v4
103103
with:
104-
path: ~/.pecos/deps/llvm
104+
path: ~/.pecos/deps/llvm-14
105105
key: llvm-${{ env.LLVM_VERSION }}-${{ runner.os }}-${{ runner.arch }}
106106

107107
# Install LLVM first (needed before CLI install since inkwell requires LLVM_SYS_140_PREFIX)

.github/workflows/rust-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
id: cache-llvm
7575
uses: actions/cache@v4
7676
with:
77-
path: ~/.pecos/deps/llvm
77+
path: ~/.pecos/deps/llvm-14
7878
key: llvm-${{ env.LLVM_VERSION }}-${{ runner.os }}-${{ runner.arch }}
7979

8080
- name: Install LLVM ${{ env.LLVM_VERSION }}
@@ -181,7 +181,7 @@ jobs:
181181
id: cache-llvm
182182
uses: actions/cache@v4
183183
with:
184-
path: ~/.pecos/deps/llvm
184+
path: ~/.pecos/deps/llvm-14
185185
key: llvm-${{ env.LLVM_VERSION }}-${{ runner.os }}-${{ runner.arch }}
186186

187187
- name: Install LLVM ${{ env.LLVM_VERSION }} (Unix)

.github/workflows/test-docs-examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
id: cache-llvm
5252
uses: actions/cache@v4
5353
with:
54-
path: ~/.pecos/deps/llvm
54+
path: ~/.pecos/deps/llvm-14
5555
key: llvm-${{ env.LLVM_VERSION }}-${{ runner.os }}-${{ runner.arch }}
5656

5757
- name: Install LLVM ${{ env.LLVM_VERSION }}

docs/development/dev-tools.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pecos rust test # Run cargo test (CUDA-aware)
2020
pecos python build # Build pecos-rslib with maturin
2121

2222
# Dependency installation
23-
pecos install llvm # Install LLVM 14 to ~/.pecos/deps/llvm/
23+
pecos install llvm # Install LLVM 14 to ~/.pecos/deps/llvm-14/
2424
pecos install cuda # Install CUDA Toolkit to ~/.pecos/deps/cuda/
2525
pecos install cuquantum # Install cuQuantum SDK to ~/.pecos/deps/cuquantum/
2626
pecos install --all # Install all optional dependencies
@@ -102,7 +102,7 @@ pecos install llvm --force
102102
pecos install llvm --no-configure
103103
```
104104

105-
This downloads and installs LLVM 14 to `~/.pecos/deps/llvm/`.
105+
This downloads and installs LLVM 14 to `~/.pecos/deps/llvm-14/`.
106106

107107
### Check LLVM Status
108108

docs/user-guide/llvm-setup.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If you don't need QIS LLVM IR/QIR execution features, you can skip LLVM installa
2626
Use the `pecos-llvm` CLI tool to automatically download and install LLVM 14.0.6:
2727

2828
```bash
29-
# Install LLVM 14.0.6 to ~/.pecos/deps/llvm/ (~400MB, ~5 minutes)
29+
# Install LLVM 14.0.6 to ~/.pecos/deps/llvm-14/ (~400MB, ~5 minutes)
3030
cargo run -p pecos-cli -- install llvm
3131

3232
# Build PECOS with LLVM support
@@ -36,7 +36,7 @@ cargo build --features llvm
3636
The `install` command automatically:
3737

3838
- Downloads the correct LLVM binary for your platform
39-
- Extracts it to `~/.pecos/deps/llvm/`
39+
- Extracts it to `~/.pecos/deps/llvm-14/`
4040
- Configures PECOS by updating `.cargo/config.toml`
4141

4242
This is the **recommended approach** for all platforms, especially Windows where system package managers may not provide LLVM 14 development files.
@@ -116,7 +116,7 @@ The `pecos llvm` CLI tool provides several useful commands:
116116

117117
### `install`
118118

119-
Download and install LLVM 14.0.6 to `~/.pecos/deps/llvm/`:
119+
Download and install LLVM 14.0.6 to `~/.pecos/deps/llvm-14/`:
120120

121121
```bash
122122
cargo run -p pecos-cli -- install llvm
@@ -217,8 +217,8 @@ LLVM_SYS_140_PREFIX = { value = "/path/to/llvm", force = true }
217217
The `pecos-llvm` tool searches for LLVM 14 in this order:
218218

219219
1. **Home directory:**
220-
- Windows: `~/.pecos/deps/llvm`
221-
- Unix: `~/.pecos/deps/llvm`
220+
- Windows: `~/.pecos/deps/llvm-14`
221+
- Unix: `~/.pecos/deps/llvm-14`
222222

223223
2. **Project-local:** `<repo-root>/llvm/`
224224

@@ -298,7 +298,7 @@ LLVM_SYS_140_PREFIX = { value = "/path/to/llvm", force = true }
298298

299299
## PECOS Home Directory
300300

301-
LLVM is installed to `~/.pecos/deps/llvm/`, which is part of the PECOS home directory structure:
301+
LLVM is installed to `~/.pecos/deps/llvm-14/`, which is part of the PECOS home directory structure:
302302

303303
```
304304
~/.pecos/

0 commit comments

Comments
 (0)