Skip to content

Commit

Permalink
CI: Clang 6->7 Ubuntu 18->20
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Oct 17, 2022
1 parent 2189325 commit d6cfb9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
# Build and install libamrex as AMReX CMake project
# Note: this is an intentional "minimal" build that does not enable (many) options
library_clang:
name: Clang@6.0 C++14 SP NOMPI Debug [lib]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wno-c++17-extensions -Wnon-virtual-dtor"}
name: Clang@7.0 C++17 SP NOMPI Debug [lib]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
run: .github/workflows/dependencies/dependencies_clang7.sh
- name: Build & Install
run: |
mkdir build
Expand All @@ -34,7 +34,6 @@ jobs:
-DAMReX_PLOTFILE_TOOLS=ON \
-DAMReX_PRECISION=SINGLE \
-DAMReX_PARTICLES_PRECISION=SINGLE \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran)
Expand All @@ -48,14 +47,14 @@ jobs:
ctest --output-on-failure
tests_clang:
name: Clang@6.0 C++14 SP Particles DP Mesh Debug [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wno-c++17-extensions -O1 -Wnon-virtual-dtor"}
name: Clang@7.0 C++17 SP Particles DP Mesh Debug [tests]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -O1 -Wnon-virtual-dtor"}
# It's too slow with -O0
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
run: .github/workflows/dependencies/dependencies_clang7.sh
- name: Build & Install
run: |
mkdir build
Expand All @@ -70,7 +69,6 @@ jobs:
-DAMReX_PARTICLES=ON \
-DAMReX_PRECISION=DOUBLE \
-DAMReX_PARTICLES_PRECISION=SINGLE \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran)
Expand All @@ -80,14 +78,14 @@ jobs:
# Build 2D libamrex with configure
configure-2d:
name: Clang@6.0 NOMPI Release [configure 2D]
runs-on: ubuntu-18.04
name: Clang@7.0 NOMPI Release [configure 2D]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
run: .github/workflows/dependencies/dependencies_clang7.sh
- name: Build & Install
run: |
./configure --dim 2 --with-fortran no --comp llvm --with-mpi no
make -j2 WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS="-fno-operator-names -Wno-c++17-extensions"
make -j2 WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS="-fno-operator-names"
make install
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright 2020 The AMReX Community
# Copyright 2020-2022 The AMReX Community
#
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl
Expand All @@ -11,4 +11,4 @@ sudo apt-get update

sudo apt-get install -y \
build-essential \
clang gfortran
clang-7 gfortran

0 comments on commit d6cfb9f

Please sign in to comment.