From 7ab1743d0d1675e8e02c1bbff5c040ac0cc601bb Mon Sep 17 00:00:00 2001 From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:37:13 +0100 Subject: [PATCH 1/5] testing the CI --- .github/workflows/linuxWF.yml | 86 +++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/.github/workflows/linuxWF.yml b/.github/workflows/linuxWF.yml index 0811812765..c3ab78ca08 100644 --- a/.github/workflows/linuxWF.yml +++ b/.github/workflows/linuxWF.yml @@ -38,6 +38,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.9 + cache: pip #this will save some time in getting the requirements - name: Set paths run: | echo "$HOME/opt/bin" >> $GITHUB_PATH @@ -181,3 +182,88 @@ jobs: GIT_TOKEN: ${{ secrets.GIT_TOKEN_PLUMEDBOT }} run: | .ci/push doc + - name: Saving "$HOME/opt" + if: matrix.variant == '-mpi-' + uses: actions/cache/save@v3 + with: + path: $HOME/opt + key: ccache-plumedInstall-linux${{ matrix.variant }}hash-${{ github.sha }} + + + linux-pycv: + needs: linux + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + variant: + - -mpi- +# temporarily commented out +# see https://github.com/plumed/plumed2/issues/976 +# - -intel- + steps: + - uses: actions/checkout@v3 + - name: Restoring "$HOME/opt" + if: matrix.variant == '-mpi-' + uses: actions/cache/restore@v3 + with: + path: $HOME/opt + key: ccache-plumedInstall-linux${{ matrix.variant }}hash-${{ github.sha }} + - uses: actions/cache@v3 + with: + path: ~/.ccache + key: ccache-reset1-linux${{ matrix.variant }}hash-${{ github.sha }} + restore-keys: ccache-reset1-linux${{ matrix.variant }}hash- + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + cache: pip #this will save some time in getting the requirements + - name: Set paths + run: | + echo "$HOME/opt/bin" >> $GITHUB_PATH + # path required for pytest: + echo "$HOME/.local/bin" >> $GITHUB_PATH + echo "CPATH=$HOME/opt/include:$CPATH" >> $GITHUB_ENV + echo "INCLUDE=$HOME/opt/include:$INCLUDE" >> $GITHUB_ENV + echo "LIBRARY_PATH=$HOME/opt/lib:$LIBRARY_PATH" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=$HOME/opt/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "PYTHONPATH=$HOME/opt/lib/plumed/python:$PYTHONPATH" >> $GITHUB_ENV + - name: Install generic packages + run: | + sudo apt-get update -qq + sudo apt-get install -y libatlas-base-dev + sudo apt-get install -y libfftw3-dev + sudo apt-get install -y gsl-bin + sudo apt-get install -y libgsl0-dev + sudo apt-get install -y ccache + sudo apt-get install -y libboost-serialization-dev + sudo apt-get install -y libopenmpi-dev openmpi-bin + echo "CC=mpicc" >> $GITHUB_ENV + echo "CXX=mpic++" >> $GITHUB_ENV + echo "OMPI_MCA_btl_base_warn_component_unused=0" >> $GITHUB_ENV + echo "OMPI_MCA_btl_base_verbose=0" >> $GITHUB_ENV + echo "OMPI_MCA_plm=isolated" >> $GITHUB_ENV + echo "OMPI_MCA_btl_vader_single_copy_mechanism=none" >> $GITHUB_ENV + echo "OMPI_MCA_rmaps_base_oversubscribe=yes" >> $GITHUB_ENV + - name: Install python packages + run: | + python -m pip install --upgrade pip + pip install --user Cython + pip install --user numpy + pip install --user pytest + pip install --user pybind11 + pip install --user six ; + pip install --user pandas ; + pip install --user mdtraj ; + pip install --user MDAnalysis ; + python -c "import MDAnalysis" ; + python -c "import mdtraj" ; + pip install --user mpi4py + python -c "import mpi4py" + - name: compile and test pycv + working-directory: ./plugins/pycv/ + run: | + ./prepareMakeForDevelop.sh + make check + \ No newline at end of file From 000f00c7908eb50c48d6299099eee8c488b8f009 Mon Sep 17 00:00:00 2001 From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> Date: Thu, 30 Nov 2023 15:23:01 +0100 Subject: [PATCH 2/5] test II on the workflow --- .github/workflows/ci.yml | 24 ++++++++++++------------ .github/workflows/linuxWF.yml | 31 ++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fcdd99f45..b9a307f53f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,18 +19,18 @@ jobs: uses: ./.github/workflows/linuxWF.yml secrets: inherit - codecheck: - uses: ./.github/workflows/codecheckWF.yml - secrets: inherit + # codecheck: + # uses: ./.github/workflows/codecheckWF.yml + # secrets: inherit - mac: - uses: ./.github/workflows/macWF.yml - secrets: inherit + # mac: + # uses: ./.github/workflows/macWF.yml + # secrets: inherit - docker: - uses: ./.github/workflows/dockerWF.yml - secrets: inherit + # docker: + # uses: ./.github/workflows/dockerWF.yml + # secrets: inherit - conda: - uses: ./.github/workflows/condaWF.yml - secrets: inherit + # conda: + # uses: ./.github/workflows/condaWF.yml + # secrets: inherit diff --git a/.github/workflows/linuxWF.yml b/.github/workflows/linuxWF.yml index c3ab78ca08..add56768d0 100644 --- a/.github/workflows/linuxWF.yml +++ b/.github/workflows/linuxWF.yml @@ -13,17 +13,38 @@ env: CXX: g++ jobs: + linuxCachingPip: + runs-on: ubuntu-22.04 + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + cache: pip #this will save some time in getting the requirements + - name: Install python packages needed for tests + run: | + python -m pip install --upgrade pip + pip install --user Cython + pip install --user numpy + pip install --user pytest + pip install --user six ; + pip install --user pandas ; + pip install --user mdtraj ; + pip install --user MDAnalysis ; + linux: + needs: linuxCachingPip runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: variant: - - -doc-mpi- + #commenting the ci for testing + #- -doc-mpi- - -mpi- - - -coverage-mpi- - - -debug- - - -debug-mpi- + #- -coverage-mpi- + #- -debug- + #- -debug-mpi- # temporarily commented out # see https://github.com/plumed/plumed2/issues/976 # - -intel- @@ -186,7 +207,7 @@ jobs: if: matrix.variant == '-mpi-' uses: actions/cache/save@v3 with: - path: $HOME/opt + path: ~/opt key: ccache-plumedInstall-linux${{ matrix.variant }}hash-${{ github.sha }} From 6991d565562120bd027ebdfdd93c85c148522174 Mon Sep 17 00:00:00 2001 From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> Date: Thu, 30 Nov 2023 15:30:13 +0100 Subject: [PATCH 3/5] test III on the workflow --- .github/workflows/linuxWF.yml | 2 ++ python/requirements.txt | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 python/requirements.txt diff --git a/.github/workflows/linuxWF.yml b/.github/workflows/linuxWF.yml index add56768d0..12309918bd 100644 --- a/.github/workflows/linuxWF.yml +++ b/.github/workflows/linuxWF.yml @@ -16,11 +16,13 @@ jobs: linuxCachingPip: runs-on: ubuntu-22.04 steps: + - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.9 cache: pip #this will save some time in getting the requirements + cache-dependency-path: ./python/requirements - name: Install python packages needed for tests run: | python -m pip install --upgrade pip diff --git a/python/requirements.txt b/python/requirements.txt new file mode 100644 index 0000000000..e9366fdbac --- /dev/null +++ b/python/requirements.txt @@ -0,0 +1,8 @@ +#requirements for the tests in the CI +Cython +numpy +pytest +six +pandas +mdtraj +MDAnalysis From 5e3e8a69c670311a260506aa126818ffe9bf1c75 Mon Sep 17 00:00:00 2001 From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> Date: Thu, 30 Nov 2023 15:32:56 +0100 Subject: [PATCH 4/5] test III(2) on the workflow --- .github/workflows/linuxWF.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linuxWF.yml b/.github/workflows/linuxWF.yml index 12309918bd..45d4854b49 100644 --- a/.github/workflows/linuxWF.yml +++ b/.github/workflows/linuxWF.yml @@ -22,7 +22,7 @@ jobs: with: python-version: 3.9 cache: pip #this will save some time in getting the requirements - cache-dependency-path: ./python/requirements + cache-dependency-path: ./python/requirements.txt - name: Install python packages needed for tests run: | python -m pip install --upgrade pip @@ -62,6 +62,7 @@ jobs: with: python-version: 3.9 cache: pip #this will save some time in getting the requirements + cache-dependency-path: ./python/requirements.txt - name: Set paths run: | echo "$HOME/opt/bin" >> $GITHUB_PATH @@ -242,6 +243,7 @@ jobs: with: python-version: 3.9 cache: pip #this will save some time in getting the requirements + cache-dependency-path: ./python/requirements.txt - name: Set paths run: | echo "$HOME/opt/bin" >> $GITHUB_PATH From 38451318cc55cab4204c2baf2cb8fad7e91fc3be Mon Sep 17 00:00:00 2001 From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:30:07 +0100 Subject: [PATCH 5/5] test III(3) on the workflow --- .github/workflows/ci.yml | 2 +- .github/workflows/linuxWF.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9a307f53f..637a4f131a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: CI on: - push: + #push: pull_request: env: diff --git a/.github/workflows/linuxWF.yml b/.github/workflows/linuxWF.yml index 45d4854b49..cb77d48731 100644 --- a/.github/workflows/linuxWF.yml +++ b/.github/workflows/linuxWF.yml @@ -228,10 +228,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Restoring "$HOME/opt" - if: matrix.variant == '-mpi-' uses: actions/cache/restore@v3 with: - path: $HOME/opt + path: ~/opt key: ccache-plumedInstall-linux${{ matrix.variant }}hash-${{ github.sha }} - uses: actions/cache@v3 with: