Skip to content

Commit

Permalink
Test clang-19
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Dec 6, 2024
1 parent 8604a92 commit 93c6d8e
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/clang17.sh
.github/workflows/dependencies/clang.sh 19
- name: CCache Cache
uses: actions/cache@v4
with:
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/dependencies/clang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env bash
#
# Copyright 2024 The WarpX Community
#
# License: BSD-3-Clause-LBNL

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.
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 -qq update
sudo apt-get install -y \
cmake \
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

# parse clang version from command line
clang_version=${1}
# add LLVM repository and install clang tools
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
sudo apt-get update
sudo apt-get install clang-${clang_version} clang-tidy-${clang_version}
# export compiler flags
export CXX=$(which clang++-${clang_version})
export CC=$(which clang-${clang_version})

# cmake-easyinstall
#
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://raw.githubusercontent.com/ax3l/cmake-easyinstall/main/cmake-easyinstall
sudo chmod a+x /usr/local/bin/cmake-easyinstall
export CEI_SUDO="sudo"
export CEI_TMP="/tmp/cei"

# BLAS++ & LAPACK++
cmake-easyinstall \
--prefix=/usr/local \
git+https://github.com/icl-utk-edu/blaspp.git \
-Duse_openmp=OFF \
-Dbuild_tests=OFF \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_VERBOSE_MAKEFILE=ON

cmake-easyinstall \
--prefix=/usr/local \
git+https://github.com/icl-utk-edu/lapackpp.git \
-Duse_cmake_find_lapack=ON \
-Dbuild_tests=OFF \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_VERBOSE_MAKEFILE=ON
10 changes: 5 additions & 5 deletions .github/workflows/dependencies/clang17.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
sudo apt-get -qqq update
sudo apt-get install -y \
cmake \
clang-18 \
clang-tidy-18 \
clang-17 \
clang-tidy-17 \
libblas-dev \
libc++-17-dev \
libboost-math-dev \
Expand All @@ -37,9 +37,9 @@ sudo apt-get install -y \
ccache \
pkg-config

# Use clang 18
export CXX=$(which clang++-18)
export CC=$(which clang-18)
# Use clang 17
export CXX=$(which clang++-17)
export CC=$(which clang-17)

# cmake-easyinstall
#
Expand Down

0 comments on commit 93c6d8e

Please sign in to comment.