Skip to content

Commit

Permalink
Use GitHub-hosted container images for CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Oct 13, 2023
1 parent 46f1d6d commit ed44f84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 38 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/backend-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ jobs:
restore-keys: |
${{ runner.os }}-build-${{ inputs.backend_name }}-
# Using an exact key to forgo saving it in case of a match (tarring up
# is expensive); also including a date to allow a force-update.
- name: Load containers cache
uses: actions/cache@v3
with:
path: ~/.apptainer
key: Linux-x86_64-containers-build-code

- name: Checkout OpenMM (for Lepton library)
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -132,12 +124,8 @@ jobs:
shell: bash
working-directory: devel-tools
run: |
# 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
apptainer pull CentOS7-devel.sif oras://ghcr.io/Colvars/devel-containers:CentOS7-devel
apptainer pull CentOS9-devel.sif oras://ghcr.io/Colvars/devel-containers:CentOS9-devel
- name: Update and build ${{ inputs.backend_name }}
shell: bash
Expand Down
29 changes: 5 additions & 24 deletions .github/workflows/test-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,6 @@ jobs:
key: ${{ runner.os }}-build-multiple-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-multiple-

# Using an exact key to forgo saving it in case of a match (tarring up
# is expensive); also including a date to allow a force-update.
- name: Load containers cache
uses: actions/cache@v3
with:
path: ~/.apptainer
key: Linux-x86_64-containers-build-code

- name: Get small downloadable packages
uses: actions/checkout@v3
with:
Expand All @@ -250,14 +242,12 @@ jobs:
sudo apt update
sudo apt install -y apptainer-suid
- name: Get container image
- name: Get container images for build dependencies
shell: bash
working-directory: devel-tools
run: |
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
apptainer pull CentOS7-devel.sif oras://ghcr.io/Colvars/devel-containers:CentOS7-devel
apptainer pull CentOS9-devel.sif oras://ghcr.io/Colvars/devel-containers:CentOS9-devel
- name: GCC 4.8, C++11 (CentOS 7)
env:
Expand Down Expand Up @@ -384,12 +374,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Load containers cache
uses: actions/cache@v3
with:
path: ~/.apptainer
key: Linux-x86_64-containers-build-code

- name: Checkout Sun compiler (Oracle Developer Studio)
uses: actions/checkout@v3
with:
Expand All @@ -412,14 +396,11 @@ jobs:
sudo apt update
sudo apt install -y apptainer-suid
- name: Get container image
- name: Get container images for build dependencies
shell: bash
working-directory: devel-tools
run: |
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
apptainer pull CentOS7-devel.sif oras://ghcr.io/Colvars/devel-containers:CentOS7-devel
- name: Build library with Sun compiler (Oracle Developer Studio)
shell: bash
Expand Down

0 comments on commit ed44f84

Please sign in to comment.