Skip to content

Commit 5b51aee

Browse files
committed
ci: provision the Linux build's LLVM/Clang via conda-forge
The distribution LLVM packages ship a Clang cmake config that references static component libraries they do not install, so the runtime's find_package(Clang) (enabled by RUNTIME_JIT) fails when Ignis configures. Provision a complete LLVM + Clang toolchain via micromamba (conda-forge llvmdev/clangdev/lld) and point LLVM.SYSTEM_DIR at the conda prefix.
1 parent bdb48fa commit 5b51aee

1 file changed

Lines changed: 28 additions & 17 deletions

File tree

.github/workflows/build-linux.yml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,19 @@ jobs:
2525
sudo apt-get update
2626
sudo apt-get install -y --no-install-recommends \
2727
ninja-build libtbb-dev zlib1g-dev libsdl2-dev libpython3-dev
28-
# Use the runner's system LLVM if present, otherwise install it.
29-
# The version must match LLVM.SYSTEM_DIR in scripts/setup/config.json.
30-
if [ ! -d /usr/lib/llvm-20/lib/cmake/llvm ]; then
31-
wget -qO llvm.sh https://apt.llvm.org/llvm.sh
32-
sudo bash llvm.sh 20
33-
sudo apt-get install -y --no-install-recommends llvm-20-dev clang-20 lld-20
34-
fi
28+
29+
# A complete, self-consistent LLVM + Clang dev toolchain (static libs and
30+
# cmake config), which the distribution packages do not provide.
31+
- name: Setup LLVM/Clang toolchain
32+
uses: mamba-org/setup-micromamba@v2
33+
with:
34+
environment-name: llvm
35+
create-args: >-
36+
llvmdev=20.1
37+
clangdev=20.1
38+
lld=20.1
39+
init-shell: bash
40+
cache-environment: true
3541

3642
- name: Cache AnyDSL toolchain (thorin/artic/runtime)
3743
uses: actions/cache@v4
@@ -42,18 +48,23 @@ jobs:
4248
anydsl-deps-${{ runner.os }}-
4349
4450
- name: Generate CI setup config
45-
shell: pwsh
51+
shell: bash -el {0}
4652
run: |
47-
$cfg = Get-Content scripts/setup/config.json -Raw | ConvertFrom-Json
48-
# Keep the dependency tree inside the workspace so it can be cached.
49-
# The cuda/amd_hsa runtime devices skip themselves on a GPU-less runner
50-
# (see scripts/setup/setup_runtime.ps1).
51-
$cfg.LOCATION = "$env:GITHUB_WORKSPACE/deps"
52-
$cfg | ConvertTo-Json -Depth 16 | Set-Content scripts/setup/config.ci.json
53+
pwsh -NoProfile -Command '
54+
$cfg = Get-Content scripts/setup/config.json -Raw | ConvertFrom-Json
55+
$cfg.LOCATION = "$env:GITHUB_WORKSPACE/deps"
56+
$cfg.LLVM.SYSTEM_DIR = "$env:CONDA_PREFIX"
57+
$cfg | ConvertTo-Json -Depth 16 | Set-Content scripts/setup/config.ci.json
58+
'
5359
5460
- name: Setup dependencies and build Ignis
55-
shell: pwsh
56-
run: ./scripts/setup/setup.ps1 -config_file scripts/setup/config.ci.json
61+
shell: bash -el {0}
62+
run: |
63+
export CMAKE_PREFIX_PATH="$CONDA_PREFIX:$CMAKE_PREFIX_PATH"
64+
pwsh ./scripts/setup/setup.ps1 -config_file scripts/setup/config.ci.json
5765
5866
- name: Run tests
59-
run: ctest --test-dir build/Release --output-on-failure -E "(ignis_test_integrator)|(ignis_test_multiple_runtimes)"
67+
shell: bash -el {0}
68+
run: |
69+
export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
70+
ctest --test-dir build/Release --output-on-failure -E "(ignis_test_integrator)|(ignis_test_multiple_runtimes)"

0 commit comments

Comments
 (0)