Skip to content

Commit

Permalink
typo and some quieter executions
Browse files Browse the repository at this point in the history
  • Loading branch information
Iximiel committed Aug 30, 2024
1 parent f732431 commit 2dec0e8
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 20 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@
name: Test

on: [push, pull_request]
on: [push]

jobs:

test:
test_main:
# strategy:
# matrix:
runs-on: ubuntu-latest

steps:
- name: calculate cache key for the compilation
id: get-key
run: |
git clone --bare https://github.com/plumed/plumed2.git
stable=$(cd plumed2.git ; git branch --list 'v2.*' --sort='version:refname'| sed "s/^ *//" | grep '^v2\.[0-9]*$' | tail -n 1)
echo "key=$(cd plumed2.git ; git rev-parse "$stable")" >> $GITHUB_OUTPUT
- uses: actions/cache@v2
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-stable-${{ steps.get-key.outputs.key }}
restore-keys: ccache-${{ runner.os }}-stable
- name: Install dependencies
run: |
sudo apt update
sudo apt install mpi-default-bin mpi-default-dev
sudo apt install libfftw3-dev gsl-bin libgsl0-dev libboost-serialization-dev
sudo apt install ccache
- name : install plumed
uses: Iximiel/install-plumed@main
with:
modules: 'reset'
dependency_path: '$GITHUB_WORKSPACE/_data/'
CC: 'ccache mpicc'
CXX: 'ccache mpic++'
id: plumed
- name: run plumed
run: |
echo ${{ steps.plumed.outputs.path }}
head ${{ steps.plumed.outputs.dependency_path }}
echo "plumed path:${{ steps.plumed.outputs.path }}"
head ${{ steps.plumed.outputs.dependency_file }}
plumed --version
test_Stable:
test_stable:
# strategy:
# matrix:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ outputs:
plumed_prefx:
description: "Plumed executable path"
value: ${{ steps.installation.outputs.plumed_path }}
depencies:
dependency_file:
description: "Plumed dependency json file"
value: ${{ steps.installation.outputs.depencies }}
value: ${{ steps.installation.outputs.dependencies }}
runs:
using: "composite"
steps:
Expand Down
29 changes: 16 additions & 13 deletions install-plumed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ cd "$(mktemp -dt plumed.XXXXXX)" || {
exit 1
}

git clone "$REPO" >>/dev/null
cd plumed2 || {
echo "Failed to cd into plumed2"
if git clone --quiet "$REPO"; then
cd plumed2 || {
echo "Failed to cd into plumed2"
echo "Is the repository \"${REPO}\" a plumed repository?"
exit 1
}
else
echo "Failed to clone plumed2"
exit 1
}
fi

version=$VERSION

Expand Down Expand Up @@ -46,10 +51,12 @@ if [[ -n "$MODULES" ]]; then
fi

#cheking out to $version before compiling the dependency json for this $version
git checkout $version
git checkout --quiet $version

if [[ -n $DEPPATH ]]; then
depencies_file="${DEPPATH}/_data/extradeps$version.json"
mkdir -pv "$DEPPATH"
dependencies_file="${DEPPATH}/_data/extradeps${version}.json"
echo "Creating a dependencies file at $dependencies_file"
# This gets all the dependency information in plumed
{
firstline=""
Expand Down Expand Up @@ -80,8 +87,8 @@ if [[ -n $DEPPATH ]]; then
firstline=",\n"
done
echo -e '\n}'
} >"$depencies_file"
echo "depencies=$depencies_file" >>$GITHUB_OUTPUT
} >"$dependencies_file"
echo "dependencies=$dependencies_file" >>$GITHUB_OUTPUT
fi
hash=$(git rev-parse HEAD)

Expand All @@ -95,11 +102,7 @@ else
rm -fr "$PREFIX"/lib/lib$program_name.so*

cat <<EOF
./configure --prefix="$HOME/opt" \
--enable-modules=all \
--enable-boost_serialization \
--enable-fftw --program-suffix=$SUFFIX \
--enable-libtorch LDFLAGS=-Wl,-rpath,$LD_LIBRARY_PATH
./configure --prefix="$HOME/opt" --enable-modules=all --enable-boost_serialization --enable-fftw --program-suffix=$SUFFIX --enable-libtorch LDFLAGS=-Wl,-rpath,$LD_LIBRARY_PATH
./configure $plumed_options LDFLAGS=-Wl,-rpath,$LD_LIBRARY_PATH
make -j 5
Expand Down

0 comments on commit 2dec0e8

Please sign in to comment.