Skip to content

Commit

Permalink
Merge branch 'master' into BAOA
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin authored Sep 5, 2023
2 parents 5714c4a + 870718f commit 4862e88
Show file tree
Hide file tree
Showing 29 changed files with 309 additions and 118 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,7 +162,7 @@ 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
Expand All @@ -172,7 +177,7 @@ jobs:
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
Expand Down
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 4862e88

Please sign in to comment.