Unpin range-v3 in conda recipes #145
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_call: | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| DEBIAN_FRONTEND: noninteractive | |
| CACHE_VERSION: "v2" | |
| CMAKE_C_COMPILER_LAUNCHER: ccache | |
| CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_BASEDIR: ${{ github.workspace }} | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_MAXSIZE: 500M | |
| CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime | |
| CCACHE_COMPRESS: "1" | |
| CCACHE_COMPRESSLEVEL: "1" | |
| NRGLJUBLJANA_CTEST_TIMEOUT_SECONDS: "3600" | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {os: ubuntu-22.04, cc: gcc-12, cxx: g++-12, blas: openBLAS, cmake_flags: "-DBLA_VENDOR=OpenBLAS", openblas_threads: "1", mkl_threads: "1", omp_threads: ""} | |
| - {os: ubuntu-22.04, cc: clang-15, cxx: clang++-15, blas: openBLAS, cmake_flags: "-DBLA_VENDOR=OpenBLAS", openblas_threads: "1", mkl_threads: "1", omp_threads: ""} | |
| - {os: ubuntu-22.04, cc: gcc-12, cxx: g++-12, blas: imkl, cmake_flags: "-DBLA_VENDOR=Intel10_64_dyn -DNRGLJUBLJANA_MKL_THREADING_LAYER=GNU", openblas_threads: "1", mkl_threads: "2", mkl_threading_layer: GNU, omp_threads: "2"} | |
| - {os: ubuntu-22.04-arm, cc: clang-15, cxx: clang++-15, blas: openBLAS, cmake_flags: "-DBLA_VENDOR=OpenBLAS", openblas_threads: "1", mkl_threads: "1", omp_threads: "", openblas_coretype: ARMV8} | |
| - {os: ubuntu-24.04, cc: gcc-14, cxx: g++-14, blas: openBLAS, cmake_flags: "-DBLA_VENDOR=OpenBLAS", openblas_threads: "2", mkl_threads: "1", omp_threads: ""} | |
| - {os: ubuntu-24.04, cc: clang-18, cxx: clang++-18, blas: openBLAS, cmake_flags: "-DBLA_VENDOR=OpenBLAS", openblas_threads: "1", mkl_threads: "1", omp_threads: ""} | |
| - {os: ubuntu-24.04-arm, cc: clang-18, cxx: clang++-18, blas: openBLAS, cmake_flags: "-DBLA_VENDOR=OpenBLAS", openblas_threads: "1", mkl_threads: "1", omp_threads: "", openblas_coretype: ARMV8} | |
| - {os: macos-14, cc: clang, cxx: clang++, blas: accelerate, cmake_flags: "", omp_threads: ""} | |
| - {os: macos-15, cc: clang, cxx: clang++, blas: accelerate, cmake_flags: "", omp_threads: ""} | |
| - {os: macos-26, cc: clang, cxx: clang++, blas: accelerate, require_arm64: true, cmake_flags: "", omp_threads: ""} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ccache-${{ env.CACHE_VERSION }}-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.blas }}-${{ github.run_id }} | |
| restore-keys: | |
| ccache-${{ env.CACHE_VERSION }}-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.blas }}- | |
| - name: Install ubuntu dependencies (openBLAS) | |
| if: ${{ startsWith(matrix.os, 'ubuntu-22.04') && contains(matrix.blas, 'openBLAS') }} | |
| run: > | |
| sudo apt-get update && | |
| sudo apt-get install -y --no-install-recommends lsb-release wget software-properties-common && | |
| wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 15 && | |
| sudo apt-get install -y --no-install-recommends | |
| ccache | |
| clang-15 | |
| g++-12 | |
| hdf5-tools | |
| libboost-dev | |
| libboost-mpi-dev | |
| libboost-serialization-dev | |
| libclang-15-dev | |
| libc++-15-dev | |
| libc++abi-15-dev | |
| libomp-15-dev | |
| libgmp-dev | |
| libgsl-dev | |
| libhdf5-dev | |
| libopenblas-dev | |
| libopenmpi-dev | |
| openmpi-bin | |
| openmpi-common | |
| openmpi-doc | |
| - name: Install ubuntu dependencies (Intel MKL) | |
| if: ${{ (matrix.os == 'ubuntu-22.04') && contains(matrix.blas, 'imkl') }} | |
| run: > | |
| sudo apt-get update && | |
| sudo apt-get install -y --no-install-recommends lsb-release wget software-properties-common && | |
| wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 15 && | |
| sudo apt-get install -y --no-install-recommends | |
| ccache | |
| clang-15 | |
| g++-12 | |
| hdf5-tools | |
| libmkl-dev | |
| libboost-dev | |
| libboost-mpi-dev | |
| libboost-serialization-dev | |
| libclang-15-dev | |
| libc++-15-dev | |
| libc++abi-15-dev | |
| libgmp-dev | |
| libgsl-dev | |
| libhdf5-dev | |
| libopenmpi-dev | |
| openmpi-bin | |
| openmpi-common | |
| openmpi-doc | |
| - name: Install ubuntu 24.04 dependencies (openBLAS, GCC 14) | |
| if: ${{ startsWith(matrix.os, 'ubuntu-24.04') && (matrix.cc == 'gcc-14') && contains(matrix.blas, 'openBLAS') }} | |
| run: > | |
| sudo apt-get update && | |
| sudo apt-get install -y --no-install-recommends | |
| ccache | |
| gcc-14 | |
| g++-14 | |
| hdf5-tools | |
| libboost-dev | |
| libboost-mpi-dev | |
| libboost-serialization-dev | |
| libgmp-dev | |
| libgsl-dev | |
| libhdf5-dev | |
| libopenblas-dev | |
| libopenmpi-dev | |
| openmpi-bin | |
| - name: Install ubuntu 24.04 dependencies (openBLAS, Clang 18) | |
| if: ${{ startsWith(matrix.os, 'ubuntu-24.04') && (matrix.cc == 'clang-18') && contains(matrix.blas, 'openBLAS') }} | |
| run: > | |
| sudo apt-get update && | |
| sudo apt-get install -y --no-install-recommends | |
| ccache | |
| clang-18 | |
| hdf5-tools | |
| libboost-dev | |
| libboost-mpi-dev | |
| libboost-serialization-dev | |
| libclang-18-dev | |
| libc++-18-dev | |
| libc++abi-18-dev | |
| libgmp-dev | |
| libgsl-dev | |
| libhdf5-dev | |
| libopenblas-dev | |
| libomp-18-dev | |
| libopenmpi-dev | |
| openmpi-bin | |
| - name: Install homebrew dependencies (clang) | |
| if: ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'clang') }} | |
| run: | | |
| brew install ccache llvm gcc boost boost-mpi hdf5 libomp open-mpi openblas gsl gmp | |
| - name: Assert Apple Silicon runner | |
| if: ${{ matrix.require_arm64 == true }} | |
| run: | | |
| test "$(uname -m)" = "arm64" | |
| - name: Add clang library path for ubuntu | |
| if: ${{ startsWith(matrix.os, 'ubuntu-22.04') && contains(matrix.cxx, 'clang') }} | |
| run: | | |
| echo "LIBRARY_PATH=/usr/lib/llvm-15/lib" >> $GITHUB_ENV | |
| - name: Add clang library path for ubuntu 24.04 | |
| if: ${{ startsWith(matrix.os, 'ubuntu-24.04') && contains(matrix.cxx, 'clang') }} | |
| run: | | |
| echo "LIBRARY_PATH=/usr/lib/llvm-18/lib" >> $GITHUB_ENV | |
| - name: Add clang environment for macos | |
| if: ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'clang') }} | |
| run: | | |
| LLVM_PREFIX="$(brew --prefix llvm)" | |
| GCC_PREFIX="$(brew --prefix gcc)" | |
| echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV | |
| echo "PATH=$LLVM_PREFIX/bin:$GCC_PREFIX/bin:$PATH" >> $GITHUB_ENV | |
| - name: Build NRG Ljubljana | |
| env: | |
| CC: ${{ matrix.cc }} | |
| CXX: ${{ matrix.cxx }} | |
| run: | | |
| mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/install ${{ matrix.cmake_flags }} | |
| cmake --build . --parallel 2 | |
| - name: Configure test runtime environment | |
| run: | | |
| echo "OPENBLAS_NUM_THREADS=${{ matrix.openblas_threads || '1' }}" >> "$GITHUB_ENV" | |
| echo "MKL_NUM_THREADS=${{ matrix.mkl_threads || '1' }}" >> "$GITHUB_ENV" | |
| echo "OMP_NUM_THREADS=${{ matrix.omp_threads || '1' }}" >> "$GITHUB_ENV" | |
| echo "OMP_DYNAMIC=FALSE" >> "$GITHUB_ENV" | |
| echo "MKL_DYNAMIC=FALSE" >> "$GITHUB_ENV" | |
| if [ -n "${{ matrix.mkl_threading_layer }}" ]; then | |
| echo "MKL_THREADING_LAYER=${{ matrix.mkl_threading_layer }}" >> "$GITHUB_ENV" | |
| fi | |
| if [ -n "${{ matrix.openblas_coretype }}" ]; then | |
| echo "OPENBLAS_CORETYPE=${{ matrix.openblas_coretype }}" >> "$GITHUB_ENV" | |
| fi | |
| - name: Test NRG Ljubljana | |
| run: | | |
| ctest_args=() | |
| if [ -n "${{ matrix.ctest_regex }}" ]; then | |
| ctest_args=(-R "${{ matrix.ctest_regex }}") | |
| fi | |
| cd build | |
| ctest -j2 "${ctest_args[@]}" --output-on-failure --timeout "${NRGLJUBLJANA_CTEST_TIMEOUT_SECONDS}" --no-tests=error | |
| - name: Upload test logs | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: test-logs-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.blas }} | |
| path: | | |
| build/Testing/Temporary/LastTest.log | |
| build/Testing/Temporary/LastTestsFailed.log | |
| build/test/**/log | |
| if-no-files-found: ignore | |
| - name: ccache statistics | |
| if: always() | |
| run: | | |
| if command -v ccache >/dev/null 2>&1; then | |
| ccache -sv | |
| else | |
| echo "ccache not found; skipping statistics" | |
| fi | |
| - uses: actions/cache/save@v5 | |
| if: always() | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ccache-${{ env.CACHE_VERSION }}-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.blas }}-${{ github.run_id }} | |
| sanitizers: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install sanitizer dependencies | |
| run: > | |
| sudo apt-get update && | |
| sudo apt-get install -y --no-install-recommends lsb-release wget software-properties-common && | |
| wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 15 && | |
| sudo apt-get install -y --no-install-recommends | |
| ccache | |
| clang-15 | |
| g++-12 | |
| hdf5-tools | |
| libblas-dev | |
| libboost-dev | |
| libboost-mpi-dev | |
| libboost-serialization-dev | |
| libclang-15-dev | |
| libc++-15-dev | |
| libc++abi-15-dev | |
| libomp-15-dev | |
| libgmp-dev | |
| libgsl-dev | |
| libhdf5-dev | |
| liblapack-dev | |
| libopenmpi-dev | |
| openmpi-bin | |
| openmpi-common | |
| openmpi-doc | |
| - name: Add clang library path for ubuntu | |
| run: | | |
| echo "LIBRARY_PATH=/usr/lib/llvm-15/lib" >> $GITHUB_ENV | |
| - name: Build with sanitizers | |
| env: | |
| CC: clang-15 | |
| CXX: clang++-15 | |
| run: | | |
| cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$HOME/install -DASAN=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug | |
| cmake --build build --parallel 2 | |
| - name: Test with sanitizers | |
| env: | |
| OPENBLAS_NUM_THREADS: "1" | |
| # Small memory leaks expected from third-party dependencies | |
| ASAN_OPTIONS: "detect_leaks=0" | |
| run: | | |
| ctest --test-dir build -j2 --output-on-failure --timeout "${NRGLJUBLJANA_CTEST_TIMEOUT_SECONDS}" --no-tests=error | |
| analysis: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install analysis dependencies | |
| run: > | |
| sudo apt-get update && | |
| sudo apt-get install -y --no-install-recommends lsb-release wget software-properties-common && | |
| wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 15 && | |
| sudo apt-get install -y --no-install-recommends | |
| ccache | |
| clang-15 | |
| clang-tidy-15 | |
| cppcheck | |
| g++-12 | |
| hdf5-tools | |
| libblas-dev | |
| libboost-dev | |
| libboost-mpi-dev | |
| libboost-serialization-dev | |
| libclang-15-dev | |
| libc++-15-dev | |
| libc++abi-15-dev | |
| libomp-15-dev | |
| libgmp-dev | |
| libgsl-dev | |
| libhdf5-dev | |
| liblapack-dev | |
| libopenmpi-dev | |
| openmpi-bin | |
| openmpi-common | |
| openmpi-doc | |
| - name: Add LLVM tools to environment | |
| run: | | |
| echo "/usr/lib/llvm-15/bin" >> $GITHUB_PATH | |
| echo "LIBRARY_PATH=/usr/lib/llvm-15/lib" >> $GITHUB_ENV | |
| - name: Run static analysis build | |
| env: | |
| CC: clang-15 | |
| CXX: clang++-15 | |
| run: | | |
| cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$HOME/install -DANALYZE_SOURCES=ON | |
| cmake --build build --target nrgljubljana_c --parallel 2 | |
| docs: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install documentation dependencies | |
| run: > | |
| sudo apt-get update && | |
| sudo apt-get install -y --no-install-recommends | |
| ccache | |
| g++-12 | |
| hdf5-tools | |
| libblas-dev | |
| libboost-dev | |
| libboost-mpi-dev | |
| libboost-serialization-dev | |
| libgmp-dev | |
| libgsl-dev | |
| libhdf5-dev | |
| liblapack-dev | |
| libopenmpi-dev | |
| openmpi-bin | |
| openmpi-common | |
| openmpi-doc | |
| python3-sphinx | |
| - name: Build documentation | |
| env: | |
| CC: gcc-12 | |
| CXX: g++-12 | |
| run: | | |
| cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=ON -DSphinx_Only=ON | |
| cmake --build build --target docs_sphinx --parallel 2 |