diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 528bc50..399bc6f 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -7,10 +7,10 @@ jobs: CI: - continue-on-error: ${{ matrix.distro == 'ubuntu_devel' || matrix.distro == 'fedora_rawhide' || matrix.continue-on-error == true }} + continue-on-error: ${{ matrix.distro == 'ubuntu:devel' || matrix.distro == 'opensuse:latest' || matrix.distro == 'fedora:rawhide' || matrix.continue-on-error == true }} strategy: matrix: - distro: [latest, fedora_rawhide, opensuse, ubuntu, ubuntu_devel, ubuntu_rolling, ubuntu_18.04, intel] + distro: ['fedora:latest', 'fedora:rawhide', 'opensuse:latest', 'ubuntu:latest', 'ubuntu:devel', 'ubuntu:rolling', 'ubuntu:18.04', 'fedora:intel'] toolchain: [gnu, clang] cmake_build_type: [Release, Debug] minimal: [false] @@ -19,13 +19,13 @@ coverage: [false] no_regression_testing: [true] include: - - distro: latest + - distro: 'fedora:latest' toolchain: gnu cmake_build_type: Release module_build: true no_regression_testing: true runs-on: ubuntu-latest - container: votca/buildenv:${{ matrix.distro }} + container: ghcr.io/votca/buildenv/${{ matrix.distro }} steps: - uses: actions/checkout@v2.2.0 with: diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 7767b1a..6b2e3bb 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -7,7 +7,7 @@ name: clang-format if: ${{ github.event.comment.body == '@votca-bot format' }} runs-on: ubuntu-latest - container: votca/buildenv:format + container: ghcr.io/votca/buildenv/format:latest steps: - name: Check if message comes from PR uses: octokit/request-action@v2.x @@ -35,7 +35,9 @@ token: ${{ secrets.VOTCA_BOT_TOKEN }} - name: Run clang-format if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} - run: find . -type f -regex ".*\.\(c\|h\|cc\|cpp\|hpp\)" -print0 | xargs -0 clang-format -i -style=file + run: | + curl -OL https://github.com/votca/votca/raw/master/.clang-format + find . -type f -regex ".*\.\(c\|h\|cc\|cpp\|hpp\)" -print0 | xargs -0 clang-format -i -style=file - name: Commit and push if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} run: | diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index ae2f582..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,66 +0,0 @@ -stages: - - build - -.build_script: - retry: - max: 2 - variables: - CCACHE_DIR: "${CI_PROJECT_DIR}/ccache" - stage: build - artifacts: - paths: - - ${CI_PROJECT_DIR}/votca - when: always - dependencies: [] - cache: - paths: - - ccache/ - script: - - ccache -z - - j="$(grep -c processor /proc/cpuinfo 2>/dev/null)" || j=0; ((j++)) - - git branch commit_of_build_${CI_BUILD_ID} ${CI_COMMIT_SHA} - - git clone https://github.com/votca/votca - - pushd votca - - if [[ ${CI_COMMIT_TAG} = v[12].[0-9]* ]]; then - git checkout -b ${CI_COMMIT_TAG} ${CI_COMMIT_TAG}; - elif [[ ( ${CI_COMMIT_REF_NAME} =~ ^for/([^/]*)/.* || ${CI_COMMIT_REF_NAME} =~ ^(stable)$ ) && ${BASH_REMATCH[1]} != master ]]; then - git checkout -b ${BASH_REMATCH[1]} origin/${BASH_REMATCH[1]}; - fi - - git submodule update --recursive --init - - git -C ${CI_PROJECT_NAME} fetch ${CI_PROJECT_DIR} commit_of_build_${CI_BUILD_ID} - - git -C ${CI_PROJECT_DIR} branch -d commit_of_build_${CI_BUILD_ID} - - git -C ${CI_PROJECT_NAME} checkout -f ${CI_COMMIT_SHA} - - mkdir -p build - - pushd build - - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=ON -DBUILD_XTP=ON -DENABLE_WERROR=ON - -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - ${CMAKE_GENERATOR:+-G${CMAKE_GENERATOR}} - -DMODULE_BUILD=${MODULE_BUILD} ${MODULE_BUILD:+-DCMAKE_INSTALL_PREFIX=/home/votca/votca.install} - -DCMAKE_DISABLE_FIND_PACKAGE_MKL=${DISABLE_MKL} - -DUSE_CUDA=${USE_CUDA} - - cmake --build . --parallel 2 - - ctest --output-on-failure - - test -z "${MODULE_BUILD}" && DESTDIR=${PWD}/install cmake --install . && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install - - sudo cmake --install . - - if [[ ${CLANG_FORMAT} ]]; then cmake --build . --target format && git -C ${CI_PROJECT_DIR}/votca/${CI_PROJECT_NAME} diff --exit-code; fi - - ccache -s - -.build: - variables: - DISTRO: "latest" - image: votca/buildenv:${DISTRO} - extends: .build_script - -Debug GPU Ubuntu: - variables: - CC: "gcc" - CXX: "g++" - CMAKE_BUILD_TYPE: "Debug" - USE_CUDA: "yes" - DISABLE_MKL: "yes" - before_script: - - source /opt/gromacs-2019/bin/GMXRC.bash - extends: .build_script - allow_failure: true - tags: - - gpu diff --git a/CHANGELOG.md b/CHANGELOG.md index dd03936..3621fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,14 @@ For more detailed information about the changes see the history of the [repository](https://github.com/votca/xtp/commits/master). -## Version 1.6.2 (released 22.08.20) +## Version 1.6.3 (released 09.12.20) +* switch to ghcr.io for CI (#555) +* fixing Gaussian guess read keyword (#562, #563) +* improved kmc output (#575) +* use master .clang-format in format action (#582, #584) +* strip windows line endings in readers (#596) + +## Version 1.6.2 _SuperGitta_ (released 22.08.20) * move CI to GitHub Actions (#512, #514, #516, #519) * add more checks to the dft_parse_part (#521) * make unit tests work in parallel (#530) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d139ac..02109e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ project(votca-xtp) -set(PROJECT_VERSION "1.6.2") +set(PROJECT_VERSION "1.6.3") set(PROJECT_CONTACT "bugs@votca.org") string(REGEX REPLACE "^[1-9]+\\.([1-9]+).*$" "\\1" SOVERSION "${PROJECT_VERSION}") if (NOT ${SOVERSION} MATCHES "[1-9]+") diff --git a/src/libxtp/calculators/kmclifetime.cc b/src/libxtp/calculators/kmclifetime.cc index 39b9e36..e108431 100644 --- a/src/libxtp/calculators/kmclifetime.cc +++ b/src/libxtp/calculators/kmclifetime.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org) + * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -379,9 +379,10 @@ time_t now = time(nullptr); tm* localtm = localtime(&now); + XTP_LOG(Log::error, _log) << " KMCLIFETIME finished at:" << asctime(localtm) << std::flush; - + std::cout << _log << std::flush; return true; } diff --git a/src/libxtp/calculators/kmcmultiple.cc b/src/libxtp/calculators/kmcmultiple.cc index 344c61f..23144f3 100644 --- a/src/libxtp/calculators/kmcmultiple.cc +++ b/src/libxtp/calculators/kmcmultiple.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org) + * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -458,7 +458,7 @@ LoadGraph(top); RunVSSM(); - + std::cout << _log << std::flush; return true; } diff --git a/src/libxtp/calculators/vaverage.cc b/src/libxtp/calculators/vaverage.cc index d18bd51..8beb932 100644 --- a/src/libxtp/calculators/vaverage.cc +++ b/src/libxtp/calculators/vaverage.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team + * Copyright 2009-2020 The VOTCA Development Team * (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License") @@ -16,6 +16,8 @@ * limitations under the License. * */ + +#include #include "vaverage.h" #include "votca/xtp/topology.h" @@ -44,7 +46,7 @@ Index id = 0; while (intt.good()) { - std::getline(intt, line); + tools::getline(intt, line); std::vector split; tools::Tokenizer toker(line, " \t"); toker.ToVector(split); @@ -77,7 +79,7 @@ std::string line; while (intt.good()) { - std::getline(intt, line); + tools::getline(intt, line); std::vector split; tools::Tokenizer toker(line, " \t"); toker.ToVector(split); diff --git a/src/libxtp/classicalsegment.cc b/src/libxtp/classicalsegment.cc index 93da71b..fd52b83 100644 --- a/src/libxtp/classicalsegment.cc +++ b/src/libxtp/classicalsegment.cc @@ -1,5 +1,5 @@ /* - * Copyright 2016 The VOTCA Development Team + * Copyright 2016-2020 The VOTCA Development Team * (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License") @@ -21,6 +21,7 @@ #include "votca/xtp/atomcontainer.h" #include #include +#include #include namespace votca { @@ -47,7 +48,7 @@ } while (intt.good()) { - std::getline(intt, line); + tools::getline(intt, line); tools::Tokenizer toker(line, " \t"); std::vector split = toker.ToVector(); diff --git a/src/libxtp/qmpackage.cc b/src/libxtp/qmpackage.cc index 7c12ca1..a86b459 100644 --- a/src/libxtp/qmpackage.cc +++ b/src/libxtp/qmpackage.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team + * Copyright 2009-2020 The VOTCA Development Team * (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License") @@ -19,6 +19,7 @@ #include "votca/xtp/qmpackage.h" #include +#include #include #include @@ -145,7 +146,7 @@ std::vector QMPackage::GetLineAndSplit( std::ifstream& input_file, const std::string separators) const { std::string line; - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); tools::Tokenizer tok(line, separators); return tok.ToVector(); diff --git a/src/libxtp/qmpackages/gaussian.cc b/src/libxtp/qmpackages/gaussian.cc index d4b7cf0..9b2ba78 100644 --- a/src/libxtp/qmpackages/gaussian.cc +++ b/src/libxtp/qmpackages/gaussian.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team + * Copyright 2009-2020 The VOTCA Development Team * (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License") @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -63,9 +64,9 @@ std::string::size_type iop_pos; // check if the guess keyword is present, if yes, append the guess later if (_write_guess) { - iop_pos = _options.find("cards"); - if (iop_pos != std::string::npos) { - _options = _options + " cards "; + iop_pos = _options.find("guess=cards"); + if (iop_pos == std::string::npos) { + _options = _options + " guess=cards "; } } @@ -539,13 +540,13 @@ } // number of coefficients per line is in the first line of the file (5D15.8) - getline(input_file, line); + tools::getline(input_file, line); std::vector strs; boost::algorithm::split(strs, line, boost::is_any_of("(D)")); while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); // if a line has an equality sign, must be energy std::string::size_type energy_pos = line.find("="); @@ -645,7 +646,7 @@ } while (ch != '\n' && (Index)input_file.tellg() != -1); std::string line; - getline(input_file, line); + tools::getline(input_file, line); input_file.close(); std::string::size_type success = line.find("Normal termination of Gaussian"); @@ -678,7 +679,7 @@ std::vector archive; while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); GetArchive(archive, line, input_file); @@ -686,8 +687,8 @@ if (charge_pos != std::string::npos) { has_charges = true; XTP_LOG(Log::info, *_pLog) << "Getting charges" << flush; - getline(input_file, line); - getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); std::vector row = GetLineAndSplit(input_file, "\t "); Index nfields = Index(row.size()); @@ -732,20 +733,20 @@ Eigen::Matrix3d pol = Eigen::Matrix3d::Zero(); while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); std::string::size_type pol_pos = line.find("Dipole polarizability, Alpha (input orientation)"); if (pol_pos != std::string::npos) { XTP_LOG(Log::error, *_pLog) << "Getting polarizability" << flush; - getline(input_file, line); - getline(input_file, line); - getline(input_file, line); - getline(input_file, line); - getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); for (Index i = 0; i < 6; i++) { - getline(input_file, line); + tools::getline(input_file, line); tools::Tokenizer tok2(line, " "); std::vector values = tok2.ToVector(); if (values.size() != 4) { @@ -776,7 +777,7 @@ boost::trim(line); std::string sum = line; while (line.size() != 0) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); sum += line; } @@ -876,7 +877,7 @@ while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); /* Check for ScaHFX = factor of HF exchange included in functional */ @@ -943,7 +944,7 @@ occupied_levels += Index(energies.size()); energies.clear(); } - getline(input_file, line); + tools::getline(input_file, line); eigenvalues_pos = line.find("Alpha"); boost::trim(line); diff --git a/src/libxtp/qmpackages/nwchem.cc b/src/libxtp/qmpackages/nwchem.cc index 3c7854b..3a32ec5 100644 --- a/src/libxtp/qmpackages/nwchem.cc +++ b/src/libxtp/qmpackages/nwchem.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team + * Copyright 2009-2020 The VOTCA Development Team * (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License") @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -418,7 +419,7 @@ // the first 12 lines are garbage info for (Index i = 0; i < 12; i++) { - getline(input_file, line); + tools::getline(input_file, line); } // next line has basis set size input_file >> basis_size; @@ -526,7 +527,7 @@ ifstream input_file((_run_dir + "/" + _log_file_name)); bool has_charges = false; while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); std::string::size_type charge_pos = line.find("ESP"); @@ -534,8 +535,8 @@ XTP_LOG(Log::error, *_pLog) << "Getting charges" << flush; has_charges = true; // two empty lines - getline(input_file, line); - getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); // now starts the data in format // _id type x y z q @@ -576,14 +577,14 @@ Eigen::Matrix3d pol = Eigen::Matrix3d::Zero(); while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); std::string::size_type pol_pos = line.find("DFT Linear Response polarizability / au"); if (pol_pos != std::string::npos) { XTP_LOG(Log::error, *_pLog) << "Getting polarizability" << flush; - getline(input_file, line); + tools::getline(input_file, line); tools::Tokenizer tok(line, " "); std::vector line_split = tok.ToVector(); double frequency = std::stod(line_split[2]); @@ -592,11 +593,11 @@ << "Warning: Polarizability was calculated for frequency " << frequency << " normally f=0 for static polarizability" << flush; } - getline(input_file, line); - getline(input_file, line); - getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); for (Index i = 0; i < 3; i++) { - getline(input_file, line); + tools::getline(input_file, line); tools::Tokenizer tok2(line, " "); std::vector values = tok2.ToVector(); if (values.size() != 4) { @@ -655,7 +656,7 @@ } while (ch != '\n' || (Index)input_file.tellg() == -1); std::string line; - getline(input_file, line); // Read the current line + tools::getline(input_file, line); // Read the current line total_energy_pos = line.find("Total DFT energy"); diis_pos = line.find("diis"); // whatever is found first, determines the completeness of the file @@ -705,7 +706,7 @@ // Start parsing the file line by line ifstream input_file(log_file_name_full); while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); /* * basis set size (is only required for overlap matrix reading, rest is @@ -743,9 +744,9 @@ //_has_coordinates = true; bool has_QMAtoms = orbitals.hasQMAtoms(); // three garbage lines - getline(input_file, line); - getline(input_file, line); - getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); // now starts the data in format // _id type Qnuc x y z std::vector row = GetLineAndSplit(input_file, "\t "); diff --git a/src/libxtp/qmpackages/orca.cc b/src/libxtp/qmpackages/orca.cc index 5fba8dd..456c0e5 100644 --- a/src/libxtp/qmpackages/orca.cc +++ b/src/libxtp/qmpackages/orca.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team + * Copyright 2009-2020 The VOTCA Development Team * (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License") @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -402,7 +403,7 @@ std::ifstream input_file(log_file_name_full); while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); GetCoordinates(result, line, input_file); @@ -410,7 +411,7 @@ if (charge_pos != std::string::npos) { XTP_LOG(Log::error, *_pLog) << "Getting charges" << flush; - getline(input_file, line); + tools::getline(input_file, line); std::vector row = GetLineAndSplit(input_file, "\t "); Index nfields = Index(row.size()); bool hasAtoms = result.size() > 0; @@ -447,15 +448,15 @@ Eigen::Matrix3d pol = Eigen::Matrix3d::Zero(); while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); std::string::size_type pol_pos = line.find("THE POLARIZABILITY TENSOR"); if (pol_pos != std::string::npos) { XTP_LOG(Log::error, *_pLog) << "Getting polarizability" << flush; - getline(input_file, line); - getline(input_file, line); - getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); if (line.find("The raw cartesian tensor (atomic units)") == std::string::npos) { @@ -464,7 +465,7 @@ } for (Index i = 0; i < 3; i++) { - getline(input_file, line); + tools::getline(input_file, line); tools::Tokenizer tok2(line, " "); std::vector values = tok2.ToVector(); if (values.size() != 3) { @@ -523,7 +524,7 @@ QMMolecule& mol = orbitals.QMAtoms(); while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); GetCoordinates(mol, line, input_file); @@ -568,9 +569,9 @@ if (OE_pos != std::string::npos) { number_of_electrons = 0; - getline(input_file, line); - getline(input_file, line); - getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); + tools::getline(input_file, line); if (line.find("E(Eh)") == std::string::npos) { XTP_LOG(Log::error, *_pLog) << "Warning: Orbital Energies not found in log file" << flush; @@ -658,7 +659,7 @@ XTP_LOG(Log::error, *_pLog) << "Getting the coordinates" << flush; bool has_QMAtoms = mol.size() > 0; // three garbage lines - getline(input_file, line); + tools::getline(input_file, line); // now starts the data in format // _id type Qnuc x y z vector row = GetLineAndSplit(input_file, "\t "); @@ -695,7 +696,7 @@ std::string line; while (input_file) { - getline(input_file, line); + tools::getline(input_file, line); boost::trim(line); std::string::size_type error = line.find("FATAL ERROR ENCOUNTERED"); if (error != std::string::npos) { diff --git a/src/libxtp/tools/gencube.cc b/src/libxtp/tools/gencube.cc index f928491..4133c06 100644 --- a/src/libxtp/tools/gencube.cc +++ b/src/libxtp/tools/gencube.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team + * Copyright 2009-2020 The VOTCA Development Team * (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License") @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -92,12 +93,12 @@ std::ofstream out(_output_file); // first two lines of header are garbage - getline(in1, s); + tools::getline(in1, s); out << s << "\n"; - getline(in1, s); + tools::getline(in1, s); out << s << " substraction\n"; - getline(in2, s); - getline(in2, s); + tools::getline(in2, s); + tools::getline(in2, s); // read rest from header Index natoms; diff --git a/src/tests/test_cubefile_writer.cc b/src/tests/test_cubefile_writer.cc index 7bdb98a..ad5173f 100644 --- a/src/tests/test_cubefile_writer.cc +++ b/src/tests/test_cubefile_writer.cc @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org) + * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ #define BOOST_TEST_MODULE cubefilewriter_test #include +#include #include #include @@ -31,16 +32,16 @@ std::string result = ""; std::string s; - getline(in1, s); - getline(in1, s); - getline(in1, s); + votca::tools::getline(in1, s); + votca::tools::getline(in1, s); + votca::tools::getline(in1, s); std::vector cube_values; do { votca::tools::Tokenizer tok(s, " "); std::vector values; tok.ConvertToVector(values); cube_values.insert(cube_values.end(), values.begin(), values.end()); - } while (getline(in1, s)); + } while (votca::tools::getline(in1, s)); return Eigen::Map(cube_values.data(), cube_values.size()); } diff --git a/tutorials/.github/workflows/continuous-integration-workflow.yml b/tutorials/.github/workflows/continuous-integration-workflow.yml index 7bf526d..c6af201 100644 --- a/tutorials/.github/workflows/continuous-integration-workflow.yml +++ b/tutorials/.github/workflows/continuous-integration-workflow.yml @@ -7,10 +7,10 @@ jobs: CI: - continue-on-error: ${{ matrix.distro == 'ubuntu_devel' || matrix.distro == 'fedora_rawhide' || matrix.continue-on-error == true }} + continue-on-error: ${{ matrix.distro == 'ubuntu:devel' || matrix.distro == 'fedora:rawhide' || matrix.distro == 'opensuse:latest' || matrix.continue-on-error == true }} strategy: matrix: - distro: [latest, fedora_rawhide, opensuse, ubuntu, ubuntu_devel, ubuntu_rolling, ubuntu_18.04] + distro: ['fedora:latest', 'fedora:rawhide', 'opensuse:latest', 'ubuntu:latest', 'ubuntu:devel', 'ubuntu:rolling', 'ubuntu:18.04'] toolchain: [gnu] cmake_build_type: [Release] minimal: [false] @@ -19,13 +19,13 @@ coverage: [false] no_regression_testing: [true] include: - - distro: latest + - distro: 'fedora:latest' toolchain: gnu cmake_build_type: Release module_build: true no_regression_testing: true runs-on: ubuntu-latest - container: votca/buildenv:${{ matrix.distro }} + container: ghcr.io/votca/buildenv/${{ matrix.distro }} steps: - uses: actions/checkout@v2.2.0 with: diff --git a/tutorials/.gitlab-ci.yml b/tutorials/.gitlab-ci.yml deleted file mode 100644 index ae2f582..0000000 --- a/tutorials/.gitlab-ci.yml +++ /dev/null @@ -1,66 +0,0 @@ -stages: - - build - -.build_script: - retry: - max: 2 - variables: - CCACHE_DIR: "${CI_PROJECT_DIR}/ccache" - stage: build - artifacts: - paths: - - ${CI_PROJECT_DIR}/votca - when: always - dependencies: [] - cache: - paths: - - ccache/ - script: - - ccache -z - - j="$(grep -c processor /proc/cpuinfo 2>/dev/null)" || j=0; ((j++)) - - git branch commit_of_build_${CI_BUILD_ID} ${CI_COMMIT_SHA} - - git clone https://github.com/votca/votca - - pushd votca - - if [[ ${CI_COMMIT_TAG} = v[12].[0-9]* ]]; then - git checkout -b ${CI_COMMIT_TAG} ${CI_COMMIT_TAG}; - elif [[ ( ${CI_COMMIT_REF_NAME} =~ ^for/([^/]*)/.* || ${CI_COMMIT_REF_NAME} =~ ^(stable)$ ) && ${BASH_REMATCH[1]} != master ]]; then - git checkout -b ${BASH_REMATCH[1]} origin/${BASH_REMATCH[1]}; - fi - - git submodule update --recursive --init - - git -C ${CI_PROJECT_NAME} fetch ${CI_PROJECT_DIR} commit_of_build_${CI_BUILD_ID} - - git -C ${CI_PROJECT_DIR} branch -d commit_of_build_${CI_BUILD_ID} - - git -C ${CI_PROJECT_NAME} checkout -f ${CI_COMMIT_SHA} - - mkdir -p build - - pushd build - - cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=ON -DBUILD_XTP=ON -DENABLE_WERROR=ON - -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - ${CMAKE_GENERATOR:+-G${CMAKE_GENERATOR}} - -DMODULE_BUILD=${MODULE_BUILD} ${MODULE_BUILD:+-DCMAKE_INSTALL_PREFIX=/home/votca/votca.install} - -DCMAKE_DISABLE_FIND_PACKAGE_MKL=${DISABLE_MKL} - -DUSE_CUDA=${USE_CUDA} - - cmake --build . --parallel 2 - - ctest --output-on-failure - - test -z "${MODULE_BUILD}" && DESTDIR=${PWD}/install cmake --install . && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install - - sudo cmake --install . - - if [[ ${CLANG_FORMAT} ]]; then cmake --build . --target format && git -C ${CI_PROJECT_DIR}/votca/${CI_PROJECT_NAME} diff --exit-code; fi - - ccache -s - -.build: - variables: - DISTRO: "latest" - image: votca/buildenv:${DISTRO} - extends: .build_script - -Debug GPU Ubuntu: - variables: - CC: "gcc" - CXX: "g++" - CMAKE_BUILD_TYPE: "Debug" - USE_CUDA: "yes" - DISABLE_MKL: "yes" - before_script: - - source /opt/gromacs-2019/bin/GMXRC.bash - extends: .build_script - allow_failure: true - tags: - - gpu diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt index b0631b6..b81966d 100644 --- a/tutorials/CMakeLists.txt +++ b/tutorials/CMakeLists.txt @@ -2,7 +2,7 @@ project(xtp-tutorials) -set(PROJECT_VERSION "1.6.2") +set(PROJECT_VERSION "1.6.3") set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules) include(GNUInstallDirs)