Skip to content

Commit

Permalink
merged with master
Browse files Browse the repository at this point in the history
  • Loading branch information
zwpku committed Aug 26, 2023
2 parents 2230af1 + 110b08f commit bbe0360
Show file tree
Hide file tree
Showing 13 changed files with 276 additions and 92 deletions.
25 changes: 15 additions & 10 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 @@ -71,7 +75,7 @@ jobs:
with:
path: |
~/.ccache
~/ccache_CentOS7-devel
~/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 +86,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-07-20

- name: Checkout OpenMM (for Lepton library)
uses: actions/checkout@v3
Expand Down Expand Up @@ -122,29 +126,30 @@ jobs:
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
- 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
apptainer pull CentOS9-devel.sif library://giacomofiorin/default/colvars_development:centos9
- name : Get spiff
shell: bash
working-directory: devel-tools
run: sudo cp -f $(apptainer exec CentOS7-devel.sif ./get_spiff) /usr/local/bin
run: sudo cp -f $(apptainer exec ${{ inputs.container_name }}.sif ./get_spiff) /usr/local/bin

- name: Update and build ${{ inputs.backend_name }}
shell: bash
env:
OPENMM_SOURCE: ${{ github.workspace }}/openmm-source
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
CCACHE_DIR=~/ccache_${{ inputs.container_name }} \
apptainer exec devel-tools/${{ inputs.container_name }}.sif \
bash ${{ inputs.path_compile_script }} ${{ inputs.backend_name }}-source
Expand All @@ -157,13 +162,13 @@ 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: 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 }}
7 changes: 7 additions & 0 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 @@ -103,6 +107,7 @@ jobs:
backend_name: GROMACS-2020
backend_repo: gromacs/gromacs
backend_repo_ref: release-2020
container_name: CentOS7-devel
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
Expand All @@ -116,6 +121,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 +134,7 @@ 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
Loading

0 comments on commit bbe0360

Please sign in to comment.