From 25eed5b99f71bdc61dd5aba60ef40091e2e10502 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 13 Sep 2021 08:45:38 +0200 Subject: [PATCH] New GH action for the CI of BigDFT --- .github/workflows/ci-bigdft.yml | 34 ++++++++++++++++++++++++++++++ tools/jenkins/ci-bigdft.sh | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/workflows/ci-bigdft.yml create mode 100755 tools/jenkins/ci-bigdft.sh diff --git a/.github/workflows/ci-bigdft.yml b/.github/workflows/ci-bigdft.yml new file mode 100644 index 0000000000..76a8bc6292 --- /dev/null +++ b/.github/workflows/ci-bigdft.yml @@ -0,0 +1,34 @@ +name: CI BigDFT + +on: + workflow_dispatch: + schedule: + - cron: '43 18 * * 0' + +jobs: + build: + + runs-on: ubuntu-latest + container: simgrid/unstable + + steps: + - uses: actions/checkout@v2 + - name: Build and test BigDFT + run: | + set -e + ./tools/jenkins/ci-bigdft.sh + + - name: Create the failure Message + if: ${{ failure() }} + run: | + echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"BigDFT failed to build on simgrid/unstable docker image! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + - name: Create the success Message + if: ${{ success() }} + run: | + echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"BigDFT successfully built on simgrid/unstable docker image. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + - uses: mattermost/action-mattermost-notify@master + if: ${{ failure() }} + env: + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} + MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}} + diff --git a/tools/jenkins/ci-bigdft.sh b/tools/jenkins/ci-bigdft.sh new file mode 100755 index 0000000000..090d556cf8 --- /dev/null +++ b/tools/jenkins/ci-bigdft.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env sh +set -ex +export OMP_NUM_THREADS=1 + +SUDO="" # to ease the local testing +$SUDO apt-get -y update +$SUDO apt-get -y install git +$SUDO apt-get -y install build-essential +$SUDO apt-get -y install python-is-python3 +$SUDO apt-get -y install python3-six +$SUDO apt-get -y install jhbuild + +git clone --depth=1 https://gitlab.com/l_sim/bigdft-suite.git +cd bigdft-suite + +WORKSPACE=`pwd` +mkdir build && cd build + +../Installer.py autogen -y + +../Installer.py -f /builds/gfortran-simgrid.rc -y build + +#cubic version +cd ../bigdft/tests/DFT/cubic/C +smpirun -hostfile $WORKSPACE/simgrid-dev/examples/smpi/hostfile -platform $WORKSPACE/simgrid-dev/examples/platforms/small_platform.xml -np 8 $WORKSPACE/build/install/bin/bigdft -l no + +#Psolver checking with smpi_shared_malloc +cd $WORKSPACE/build/psolver/tests +make FC=smpif90 PS_Check +smpirun -hostfile $WORKSPACE/simgrid-dev/examples/smpi/hostfile -platform $WORKSPACE/simgrid-dev/examples/platforms/small_platform.xml -np 4 ./PS_Check -n [57,48,63] -g F + +#linear scaling version (heavy, might swap) +cd $WORKSPACE/bigdft/tests/DFT/linear/surface +smpirun -hostfile $WORKSPACE/simgrid-dev/examples/smpi/hostfile -platform $WORKSPACE/simgrid-dev/examples/platforms/small_platform.xml -np 4 $WORKSPACE/build/install/bin/bigdft -n graphene -l no + +cd $WORKSPACE/build +../Installer.py -f /builds/gfortran-simgrid.rc -y clean -- 2.20.1