-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: install clang dependencies directly from LLVM #5575
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,50 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright 2024 The WarpX Community | ||
# Copyright 2025 The WarpX Community | ||
# | ||
# License: BSD-3-Clause-LBNL | ||
# Authors: Luca Fedeli | ||
|
||
set -eu -o pipefail | ||
|
||
# `man apt.conf`: | ||
# Number of retries to perform. If this is non-zero APT will retry | ||
# failed files the given number of times. | ||
# `man apt.conf`: number of retries to perform (if non-zero, | ||
# APT will retry failed files the given number of times). | ||
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries | ||
|
||
# This dependency file is currently used within a docker container, | ||
# which does not come (among others) with wget, xz-utils, curl, git, | ||
# ccache, and pkg-config pre-installed. | ||
sudo apt-get -qqq update | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
cmake \ | ||
clang-17 \ | ||
clang-tidy-17 \ | ||
libblas-dev \ | ||
libc++-17-dev \ | ||
libboost-math-dev \ | ||
libfftw3-dev \ | ||
libfftw3-mpi-dev \ | ||
libhdf5-openmpi-dev \ | ||
liblapack-dev \ | ||
libopenmpi-dev \ | ||
libomp-17-dev \ | ||
ninja-build \ | ||
wget \ | ||
xz-utils \ | ||
curl \ | ||
git \ | ||
ccache \ | ||
pkg-config | ||
ninja-build | ||
|
||
# Use clang 17 | ||
export CXX=$(which clang++-17) | ||
export CC=$(which clang-17) | ||
# parse clang version number from command line | ||
version_number=${1} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Saw too late. You could make the script more robust by checking that the number of arguments are exactly one (or two?) (0 is the program/script name, 1 the first argument) and otherwise throw a helpful error message. In bash, the number of args is |
||
|
||
# add LLVM repository and install clang tools | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod +x llvm.sh | ||
sudo ./llvm.sh ${version_number} | ||
|
||
# install clang, clang-tidy, and | ||
# LLVM implementations of C++ standard library and OpenMP | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
clang-${version_number} \ | ||
clang-tidy-${version_number} \ | ||
libc++-${version_number}-dev \ | ||
libomp-${version_number}-dev | ||
|
||
# export compiler flags | ||
export CXX=$(which clang++-${version_number}) | ||
export CC=$(which clang-${version_number}) | ||
|
||
# ccache | ||
$(dirname "$0")/ccache.sh | ||
|
||
# cmake-easyinstall | ||
# | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what was stated in this comment is not valid since we removed the Ubuntu 23.10 container in #5474.