Skip to content

Commit

Permalink
Merge branch 'Colvars:master' into improve_rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
HanatoK authored Sep 16, 2023
2 parents 5ad3f58 + 51bebbf commit a334219
Show file tree
Hide file tree
Showing 288 changed files with 379,393 additions and 5,519 deletions.
51 changes: 34 additions & 17 deletions .github/workflows/backend-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
description: "Name of the branch of the backend repository"
required: true
type: string
container_name:
description: "Name of the container used to build on"
required: true
type: string
vmd_plugins_repo:
description: "Name of the VMD plugins repository"
required: false
Expand Down Expand Up @@ -58,6 +62,8 @@ on:
jobs:
test_backends:
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/ccache_${{ inputs.container_name }}

steps:
- name: Checkout Colvars
Expand All @@ -70,8 +76,7 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.ccache
~/ccache_CentOS7-devel
${{ github.workspace }}/ccache_${{ inputs.container_name }}
key: ${{ runner.os }}-build-${{ inputs.backend_name }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-${{ inputs.backend_name }}-
Expand All @@ -82,7 +87,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.apptainer
key: Linux-x86_64-containers-build-2022-10-11
key: Linux-x86_64-containers-build-2023-09-05

- name: Checkout OpenMM (for Lepton library)
uses: actions/checkout@v3
Expand Down Expand Up @@ -119,32 +124,29 @@ jobs:
- name: Install Apptainer
shell: bash
run: |
wget https://github.com/apptainer/apptainer/releases/download/v1.0.3/apptainer_1.0.3_amd64.deb
sudo apt-get -y install ./apptainer_1.0.3_amd64.deb
sudo add-apt-repository -y ppa:apptainer/ppa
sudo apt update
sudo apt install -y apptainer-suid
- name: Get container image of backends' dependencies
- name: Get container images for build dependencies
shell: bash
working-directory: devel-tools
run: |
# Pull CentOS 7 container used to build backends
# Pull all containers used to build backends
# (contains build tools, OpenMPI, FFTW, Tcl/Tk and Charm++)
apptainer remote status SylabsCloud || apptainer remote add --no-login SylabsCloud cloud.sylabs.io
apptainer remote use SylabsCloud
apptainer pull CentOS7-devel.sif library://giacomofiorin/default/colvars_development:centos7
- name : Get spiff
shell: bash
working-directory: devel-tools
run: sudo cp -f $(apptainer exec CentOS7-devel.sif ./get_spiff) /usr/local/bin
apptainer pull CentOS9-devel.sif library://giacomofiorin/default/colvars_development:centos9
- name: Update and build ${{ inputs.backend_name }}
shell: bash
env:
OPENMM_SOURCE: ${{ github.workspace }}/openmm-source
CMAKE_GENERATOR: Ninja
run: |
apptainer exec devel-tools/CentOS7-devel.sif ./update-colvars-code.sh -f ${{ inputs.backend_name }}-source
CCACHE_DIR=~/ccache_CentOS7-devel \
apptainer exec devel-tools/CentOS7-devel.sif \
apptainer exec devel-tools/${{ inputs.container_name }}.sif ./update-colvars-code.sh -f ${{ inputs.backend_name }}-source
apptainer exec devel-tools/${{ inputs.container_name }}.sif \
bash ${{ inputs.path_compile_script }} ${{ inputs.backend_name }}-source
Expand All @@ -157,13 +159,28 @@ jobs:
shell: bash
working-directory: ${{ inputs.test_lib_directory }}
run: |
apptainer exec ${{github.workspace}}/devel-tools/CentOS7-devel.sif \
apptainer exec ${{github.workspace}}/devel-tools/${{ inputs.container_name }}.sif \
./run_tests.sh ${{github.workspace}}/${{ inputs.backend_name }}-source/${{ inputs.rpath_exe }} 0??_*
- name: Save failed library test artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failed-library-test-diffs-${{ inputs.backend_name }}
path: ${{ inputs.test_lib_directory }}/*/*.diff

- name: Run regression tests for ${{ inputs.backend_name }} interface code
if: ${{ inputs.test_interface_directory }}
shell: bash
working-directory: ${{ inputs.test_interface_directory }}
run: |
apptainer exec ${{github.workspace}}/devel-tools/CentOS7-devel.sif \
apptainer exec ${{github.workspace}}/devel-tools/${{ inputs.container_name }}.sif \
./run_tests.sh ${{github.workspace}}/${{ inputs.backend_name }}-source/${{ inputs.rpath_exe }}
- name: Save failed interface test artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failed-interface-test-diffs-${{ inputs.backend_name }}
path: ${{ inputs.test_interface_directory }}/*/*.diff

32 changes: 19 additions & 13 deletions .github/workflows/test-backends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
backend_name: LAMMPS
backend_repo: lammps/lammps
backend_repo_ref: develop
container_name: CentOS7-devel
path_compile_script: devel-tools/compile-lammps.sh
test_lib_directory: lammps/tests/library
test_interface_directory: lammps/tests/interface
Expand All @@ -43,6 +44,7 @@ jobs:
backend_name: NAMD
backend_repo: Colvars/namd
backend_repo_ref: master
container_name: CentOS7-devel
path_compile_script: devel-tools/compile-namd.sh
test_lib_directory: namd/tests/library
test_interface_directory: namd/tests/interface
Expand All @@ -68,6 +70,7 @@ jobs:
# Interface tests disabled until map variables are merged into NAMD3
# test_interface_directory: namd/tests/interface
rpath_exe: Linux-x86_64-g++.multicore/namd3
container_name: CentOS7-devel
secrets:
# Choice of license by UIUC prevents sharing the code, hence the secret
private_key: ${{ secrets.PULL_NAMD_KEY }}
Expand All @@ -84,6 +87,7 @@ jobs:
backend_name: VMD
backend_repo: Colvars/vmd
backend_repo_ref: master
container_name: CentOS7-devel
# Special variable for VMD test case since it's the only one
# which needs to checkout 2 repos
vmd_plugins_repo: Colvars/vmd-plugins
Expand All @@ -95,19 +99,6 @@ jobs:
private_key: ${{ secrets.PULL_VMD_KEY }}
private_key_vmd_plugins: ${{ secrets.PULL_VMD_PLUGINS_KEY }}

gromacs-2020:
name: GROMACS 2020
if: github.event_name == 'pull_request' || contains(github.event.head_commit.message, 'test-gromacs-2020')
uses: ./.github/workflows/backend-template.yml
with:
backend_name: GROMACS-2020
backend_repo: gromacs/gromacs
backend_repo_ref: release-2020
path_compile_script: devel-tools/compile-gromacs.sh
test_lib_directory: gromacs/tests/library
# Gromacs need to be compiled in double precision to pass the tests
rpath_exe: install/bin/gmx_d

gromacs-2021:
name: GROMACS 2021
if: github.event_name == 'pull_request' || contains(github.event.head_commit.message, 'test-gromacs-2021')
Expand All @@ -116,6 +107,7 @@ jobs:
backend_name: GROMACS-2021
backend_repo: gromacs/gromacs
backend_repo_ref: release-2021
container_name: CentOS9-devel
path_compile_script: devel-tools/compile-gromacs.sh
test_lib_directory: gromacs/tests/library
rpath_exe: install/bin/gmx_d
Expand All @@ -128,6 +120,20 @@ jobs:
backend_name: GROMACS-2022
backend_repo: gromacs/gromacs
backend_repo_ref: release-2022
container_name: CentOS9-devel
path_compile_script: devel-tools/compile-gromacs.sh
test_lib_directory: gromacs/tests/library
rpath_exe: install/bin/gmx_d

gromacs-2023:
name: GROMACS 2023
if: github.event_name == 'pull_request' || contains(github.event.head_commit.message, 'test-gromacs-2023')
uses: ./.github/workflows/backend-template.yml
with:
backend_name: GROMACS-2023
backend_repo: gromacs/gromacs
backend_repo_ref: release-2023
container_name: CentOS9-devel
path_compile_script: devel-tools/compile-gromacs.sh
test_lib_directory: gromacs/tests/library
rpath_exe: install/bin/gmx_d
Loading

0 comments on commit a334219

Please sign in to comment.