From 1b30da66e7f7c9fe7b66905c9d6a9fb1e82fe574 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 29 May 2020 15:38:43 -0700 Subject: [PATCH] C++20 Compatibility: GCC 10.1 (#949) --- .../workflows/dependencies/dependencies.sh | 8 ++------ .../dependencies/dependencies_gcc10.sh | 17 ++++++++++++++++ .../dependencies/dependencies_mac.sh | 8 ++------ .github/workflows/linux.yml | 20 +++++++++++++++++++ 4 files changed, 41 insertions(+), 12 deletions(-) create mode 100755 .github/workflows/dependencies/dependencies_gcc10.sh diff --git a/.github/workflows/dependencies/dependencies.sh b/.github/workflows/dependencies/dependencies.sh index 8c5312d5eb2..d0e86e99c0a 100755 --- a/.github/workflows/dependencies/dependencies.sh +++ b/.github/workflows/dependencies/dependencies.sh @@ -1,13 +1,9 @@ #!/usr/bin/env bash # -# Copyright 2020 Axel Huebl +# Copyright 2020 The AMReX Community # # License: BSD-3-Clause-LBNL - -# search recursive inside a folder if a file contains tabs -# -# @result 0 if no files are found, else 1 -# +# Authors: Axel Huebl set -eu -o pipefail diff --git a/.github/workflows/dependencies/dependencies_gcc10.sh b/.github/workflows/dependencies/dependencies_gcc10.sh new file mode 100755 index 00000000000..583c50182a9 --- /dev/null +++ b/.github/workflows/dependencies/dependencies_gcc10.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Copyright 2020 The AMReX Community +# +# License: BSD-3-Clause-LBNL +# Authors: Axel Huebl + +set -eu -o pipefail + +sudo add-apt-repository ppa:ubuntu-toolchain-r/test +sudo apt-get update + +sudo apt-get install -y --no-install-recommends \ + build-essential \ + g++-10 gfortran-10 \ + libopenmpi-dev \ + openmpi-bin diff --git a/.github/workflows/dependencies/dependencies_mac.sh b/.github/workflows/dependencies/dependencies_mac.sh index 245194504ce..7fa6878dbb9 100755 --- a/.github/workflows/dependencies/dependencies_mac.sh +++ b/.github/workflows/dependencies/dependencies_mac.sh @@ -1,13 +1,9 @@ #!/usr/bin/env bash # -# Copyright 2020 Axel Huebl +# Copyright 2020 The AMReX Community # # License: BSD-3-Clause-LBNL - -# search recursive inside a folder if a file contains tabs -# -# @result 0 if no files are found, else 1 -# +# Authors: Axel Huebl set -eu -o pipefail diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cf33b1071d5..26ca812a498 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -36,6 +36,26 @@ jobs: cmake .. -DENABLE_TUTORIALS=ON make -j 2 tutorials + # Build libamrex and all tutorials + tutorials_cxx20: + name: GNU@10.1 C++20 [tutorials] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dependencies + run: .github/workflows/dependencies/dependencies_gcc10.sh + - name: Build & Install + run: | + mkdir build + cd build + cmake .. \ + -DENABLE_TUTORIALS=ON \ + -DCMAKE_CXX_STANDARD=20 \ + -DCMAKE_C_COMPILER=$(which gcc-10) \ + -DCMAKE_CXX_COMPILER=$(which g++-10) \ + -DCMAKE_Fortran_COMPILER=$(which gfortran-10) + make -j 2 tutorials + # Build libamrex and all tutorials w/o MPI tutorials-nonmpi: name: GNU@7.5 C++14 non-MPI [tutorials]