From 2445634568737667ed8d88403c6c45e7005fdfe3 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Sun, 28 Mar 2021 18:36:17 +0200 Subject: [PATCH 1/2] Initial debianization Closes #4163 --- debian/changelog | 5 +++++ debian/control | 36 ++++++++++++++++++++++++++++++++++++ debian/copyright | 29 +++++++++++++++++++++++++++++ debian/gbp.conf | 10 ++++++++++ debian/rules | 10 ++++++++++ debian/source/format | 1 + debian/watch | 3 +++ 7 files changed, 94 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000000..1fd4b5da0ce --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +espresso (4.1.5~rc1) unstable; urgency=medium + + * Initial release + + -- Evangelos Ribeiro Tzaras Sun, 28 Mar 2021 17:15:36 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000000..5464afb7c3b --- /dev/null +++ b/debian/control @@ -0,0 +1,36 @@ +Source: espresso +Section: science +Priority: optional +Maintainer: Espresso Maintainers +Build-Depends: + cmake, + cython3, + debhelper-compat (=13), + fftw3-dev, + libboost-all-dev, + libgsl-dev, + libhdf5-dev, + libhdf5-openmpi-dev, + openmpi-common, +Rules-Requires-Root: no +Standards-Version: 4.5.0 +Vcs-Browser: https://github.com/espressomd/espresso +Vcs-Git: https://github.com/espressomd/espresso.git +Homepage: https://espressomd.org + +Package: espresso +Architecture: any +Depends: + python3, + python3-h5py, + python3-numpy, + python3-opengl, + python3-scipy, + python3-vtk7, + ${misc:Depends}, +Description: Molecular dynamics simulation package + ESPResSo is a highly versatile software package for performing + and analyzing scientific Molecular Dynamics many-particle + simulations of coarse-grained atomistic or bead-spring models + as they are used in soft matter research in physics, chemistry + and molecular biology. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000000..18411b274fc --- /dev/null +++ b/debian/copyright @@ -0,0 +1,29 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: espresso +Upstream-Contact: Espresso mailing list +Source: https://github.com/espressomd/espresso.git +License: GPL-3 + +Files: * +Copyright: 2010-2021 The ESPResSo project + 2002-2010 Max-Planck-Institute for Polymer Research, Theory Group +License: GPL-3 + + +License: GPL-3+ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 3 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public License version 3 + can be found in the file `/usr/share/common-licenses/GPL-3'. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 00000000000..494f58dcfaf --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,10 @@ +[DEFAULT] +debian-branch = python +debian-tag = v%(version)s +debian-tag-msg = %(pkg)s v%(version)s + +[tag] +sign-tags = true + +[dch] +multimaint-merge = true diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000000..6678ea8d20e --- /dev/null +++ b/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS= hardening=+all + +%: + dh $@ + + +override_dh_auto_test: + true diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000000..89ae9db8f88 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000000..44e6b965d2a --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/espresso-$1\.tar\.gz/ \ + https://github.com/espressomd/espresso/tags .*/v?(\d\S+)\.tar\.gz From 94abf4f6e63264517a5c0da925ff34a580416f20 Mon Sep 17 00:00:00 2001 From: Rudolf Weeber Date: Tue, 20 Apr 2021 16:17:39 +0200 Subject: [PATCH 2/2] Build and test-install Ubuntu pkg on Github actions --- .../actions/build_ubuntu_package/Dockerfile | 7 +++++ .../actions/build_ubuntu_package/action.yml | 11 ++++++++ .../build_ubuntu_package/entrypoint.sh | 8 ++++++ .../actions/test_ubuntu_package/Dockerfile | 6 ++++ .../actions/test_ubuntu_package/action.yml | 13 +++++++++ .../actions/test_ubuntu_package/entrypoint.sh | 5 ++++ .../workflows/{push_pull.yml => mac_test.yml} | 1 + .github/workflows/packaging.yml | 23 +++++++++++++++ debian/control | 28 +++++++++++++++++-- 9 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 .github/actions/build_ubuntu_package/Dockerfile create mode 100644 .github/actions/build_ubuntu_package/action.yml create mode 100755 .github/actions/build_ubuntu_package/entrypoint.sh create mode 100644 .github/actions/test_ubuntu_package/Dockerfile create mode 100644 .github/actions/test_ubuntu_package/action.yml create mode 100755 .github/actions/test_ubuntu_package/entrypoint.sh rename .github/workflows/{push_pull.yml => mac_test.yml} (99%) create mode 100644 .github/workflows/packaging.yml diff --git a/.github/actions/build_ubuntu_package/Dockerfile b/.github/actions/build_ubuntu_package/Dockerfile new file mode 100644 index 00000000000..f1b1b6e531f --- /dev/null +++ b/.github/actions/build_ubuntu_package/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:focal + +ENV DEBIAN_FRONTEND noninteractive +run apt update +run apt install -y dpkg-dev build-essential + +COPY entrypoint.sh /entrypoint.sh diff --git a/.github/actions/build_ubuntu_package/action.yml b/.github/actions/build_ubuntu_package/action.yml new file mode 100644 index 00000000000..c2370982161 --- /dev/null +++ b/.github/actions/build_ubuntu_package/action.yml @@ -0,0 +1,11 @@ +name: 'Ubuntu Package' +outputs: + package_file: + description: Name of package file generated +description: 'Build Ubuntu package' +runs: + using: "docker" + image: "Dockerfile" + entrypoint: "/entrypoint.sh" + + diff --git a/.github/actions/build_ubuntu_package/entrypoint.sh b/.github/actions/build_ubuntu_package/entrypoint.sh new file mode 100755 index 00000000000..f2ed2d72bdd --- /dev/null +++ b/.github/actions/build_ubuntu_package/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e -x -v +apt build-dep -y . && +dpkg-buildpackage -uc -us && +cp ../*.deb /github/workspace && +package_file=`ls /github/workspace/*.deb` +echo "::set-output name=package_file::${package_file}" + diff --git a/.github/actions/test_ubuntu_package/Dockerfile b/.github/actions/test_ubuntu_package/Dockerfile new file mode 100644 index 00000000000..c61e3bbd39a --- /dev/null +++ b/.github/actions/test_ubuntu_package/Dockerfile @@ -0,0 +1,6 @@ +FROM ubuntu:focal + +ENV DEBIAN_FRONTEND noninteractive +run apt update + +COPY entrypoint.sh /entrypoint.sh diff --git a/.github/actions/test_ubuntu_package/action.yml b/.github/actions/test_ubuntu_package/action.yml new file mode 100644 index 00000000000..537540e81f1 --- /dev/null +++ b/.github/actions/test_ubuntu_package/action.yml @@ -0,0 +1,13 @@ +name: 'Test Ubuntu Package' +description: 'Test Ubuntu package' +inputs: + package_file: + description: Name of package file to install and test + required: true +runs: + using: "docker" + image: "Dockerfile" + entrypoint: "/entrypoint.sh" + args: + - ${{ inputs.package_file }} + diff --git a/.github/actions/test_ubuntu_package/entrypoint.sh b/.github/actions/test_ubuntu_package/entrypoint.sh new file mode 100755 index 00000000000..1bbe0f27aa8 --- /dev/null +++ b/.github/actions/test_ubuntu_package/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +apt install -y $1 +python3 -c 'import espressomd; system=espressomd.System(box_l=[1,1,1])' + diff --git a/.github/workflows/push_pull.yml b/.github/workflows/mac_test.yml similarity index 99% rename from .github/workflows/push_pull.yml rename to .github/workflows/mac_test.yml index b75a93e92d4..9d223843422 100644 --- a/.github/workflows/push_pull.yml +++ b/.github/workflows/mac_test.yml @@ -50,3 +50,4 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} title: Scheduled CI job has failed body: ${{ env.job_link }} + diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml new file mode 100644 index 00000000000..c4e3ebaf5fb --- /dev/null +++ b/.github/workflows/packaging.yml @@ -0,0 +1,23 @@ +name: Build packages + +on: + push: + pull_request: + schedule: + - cron: '0 3 * * *' + +jobs: + ubuntupackage: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@main + - name: Build package + id: build + uses: ./.github/actions/build_ubuntu_package + - name: Test package + uses: ./.github/actions/test_ubuntu_package + with: + package_file: ${{steps.build.outputs.package_file }} + + diff --git a/debian/control b/debian/control index 5464afb7c3b..82f4b08664d 100644 --- a/debian/control +++ b/debian/control @@ -5,13 +5,27 @@ Maintainer: Espresso Maintainers Build-Depends: cmake, cython3, - debhelper-compat (=13), + debhelper-compat (=12), fftw3-dev, - libboost-all-dev, + libblas-dev, + libboost-dev, + libboost-filesystem-dev, + libboost-mpi-dev, + libboost-serialization-dev, + libboost-test-dev, + libfftw3-dev, libgsl-dev, libhdf5-dev, libhdf5-openmpi-dev, + libhdf5-openmpi-dev, + liblapack-dev, + python3-dev, + libpython3-dev, openmpi-common, + python3, + python3-h5py, + python3-numpy, + python3-scipy Rules-Requires-Root: no Standards-Version: 4.5.0 Vcs-Browser: https://github.com/espressomd/espresso @@ -27,6 +41,16 @@ Depends: python3-opengl, python3-scipy, python3-vtk7, + libboost-filesystem1.71.0, + libboost-mpi1.71.0, + libboost-serialization1.71.0, + libfftw3-3, + libgsl23, + libhdf5-openmpi-103, + libopenblas0-pthread, + openmpi-bin, + libopenmpi3, + libstdc++6, ${misc:Depends}, Description: Molecular dynamics simulation package ESPResSo is a highly versatile software package for performing