Skip to content

Commit

Permalink
Merge pull request #4265 from easybuilders/4.7.x
Browse files Browse the repository at this point in the history
release EasyBuild v4.7.2
  • Loading branch information
boegel committed May 27, 2023
2 parents 8430804 + bad9a0e commit 21d8ebc
Show file tree
Hide file tree
Showing 25 changed files with 380 additions and 268 deletions.
137 changes: 0 additions & 137 deletions .github/workflows/bootstrap_script.yml

This file was deleted.

17 changes: 5 additions & 12 deletions .github/workflows/container_tests.yml
@@ -1,5 +1,5 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for container support
name: Tests for Singularity container support
on: [push, pull_request]

permissions:
Expand All @@ -11,11 +11,10 @@ concurrency:

jobs:
build:
# stick to Ubuntu 18.04, where we can still easily install yum via 'apt install'
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
python: [2.7, 3.6]
python: [2.7, 3.7]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand All @@ -31,7 +30,7 @@ jobs:
# for modules tool
APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev"
# for building Singularity images
APT_PKGS+=" rpm yum"
APT_PKGS+=" rpm dnf"
# Avoid apt-get update, as we don't really need it,
# and it does more harm than good (it's fairly expensive, and it results in flaky test runs)
Expand All @@ -41,12 +40,6 @@ jobs:
sudo apt-get install $APT_PKGS
fi
# fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
# needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then
sudo ln -s /usr/lib/x86_64-linux-gnu/lua/5.2/posix_c.so /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so
fi
- name: install Lmod
run: |
# avoid downloading modules tool sources into easybuild-framework dir
Expand Down Expand Up @@ -104,7 +97,7 @@ jobs:
# see https://docs.easybuild.io/en/latest/Containers.html
curl -OL https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/develop/easybuild/easyconfigs/b/bzip2/bzip2-1.0.8.eb
export EASYBUILD_CONTAINERPATH=$PWD
export EASYBUILD_CONTAINER_CONFIG='bootstrap=yum,osversion=7'
export EASYBUILD_CONTAINER_CONFIG='bootstrap=docker,from=ghcr.io/easybuilders/centos-7.9-python3-amd64'
eb bzip2-1.0.8.eb --containerize --experimental --container-build-image
singularity exec bzip2-1.0.8.sif command -v bzip2 | grep '/app/software/bzip2/1.0.8/bin/bzip2' || (echo "Path to bzip2 '$which_bzip2' is not correct" && exit 1)
singularity exec bzip2-1.0.8.sif bzip2 --help
96 changes: 96 additions & 0 deletions .github/workflows/container_tests_apptainer.yml
@@ -0,0 +1,96 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for Apptainer container support
on: [push, pull_request]

permissions:
contents: read # to fetch code (actions/checkout)

concurrency:
group: ${{format('{0}:{1}:{2}', github.repository, github.ref, github.workflow)}}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
python: [2.7, 3.7]
apptainer: [1.0.0, 1.1.7]
fail-fast: false
steps:
- uses: actions/checkout@v2

- name: set up Python
uses: actions/setup-python@v2
with:
python-version: ${{matrix.python}}
architecture: x64

- name: install OS & Python packages
run: |
# for building CentOS 7 container images
sudo apt-get install rpm
sudo apt-get install dnf
# for modules tool
sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev
# fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
# needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then
sudo ln -s /usr/lib/x86_64-linux-gnu/lua/5.2/posix_c.so /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so
fi
- name: install Lmod
run: |
# avoid downloading modules tool sources into easybuild-framework dir
cd $HOME
export INSTALL_DEP=$GITHUB_WORKSPACE/easybuild/scripts/install_eb_dep.sh
# install Lmod
source $INSTALL_DEP Lmod-8.4.27 $HOME
# changes in environment are not passed to other steps, so need to create files...
echo $MOD_INIT > mod_init
echo $PATH > path
if [ ! -z $MODULESHOME ]; then echo $MODULESHOME > moduleshome; fi
- name: install Apptainer
run: |
curl -OL https://github.com/apptainer/apptainer/releases/download/v${{matrix.apptainer}}/apptainer_${{matrix.apptainer}}_amd64.deb
sudo apt install ./apptainer*.deb
# Apptainer provides both apptainer and singularity commands
apptainer --version
singularity --version
- name: install sources
run: |
# install from source distribution tarball, to test release as published on PyPI
python setup.py sdist
ls dist
export PREFIX=/tmp/$USER/$GITHUB_SHA
pip install --prefix $PREFIX dist/easybuild-framework*tar.gz
pip install --prefix $PREFIX https://github.com/easybuilders/easybuild-easyblocks/archive/develop.tar.gz
- name: run test
run: |
# run tests *outside* of checked out easybuild-framework directory,
# to ensure we're testing installed version (see previous step)
cd $HOME
# initialize environment for modules tool
if [ -f $HOME/moduleshome ]; then export MODULESHOME=$(cat $HOME/moduleshome); fi
source $(cat $HOME/mod_init); type module
# make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that);
# also pick up changes to $PATH set by sourcing $MOD_INIT
export PREFIX=/tmp/$USER/$GITHUB_SHA
export PATH=$PREFIX/bin:$(cat $HOME/path)
export PYTHONPATH=$PREFIX/lib/python${{matrix.python}}/site-packages:$PYTHONPATH
eb --version
# create $HOME/.rpmmacros, see also https://github.com/apptainer/singularity/issues/241
echo '%_var /var' > $HOME/.rpmmacros
echo '%_dbpath %{_var}/lib/rpm' >> $HOME/.rpmmacros
# build CentOS 7 container image for bzip2 1.0.8 using EasyBuild;
# see https://docs.easybuild.io/en/latest/Containers.html
curl -OL https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/develop/easybuild/easyconfigs/b/bzip2/bzip2-1.0.8.eb
export EASYBUILD_CONTAINERPATH=$PWD
export EASYBUILD_CONTAINER_CONFIG='bootstrap=docker,from=ghcr.io/easybuilders/centos-7.9-python3-amd64'
export EASYBUILD_CONTAINER_TYPE='apptainer'
eb bzip2-1.0.8.eb --containerize --experimental --container-build-image
apptainer exec bzip2-1.0.8.sif command -v bzip2 | grep '/app/software/bzip2/1.0.8/bin/bzip2' || (echo "Path to bzip2 '$which_bzip2' is not correct" && exit 1)
apptainer exec bzip2-1.0.8.sif bzip2 --help
8 changes: 5 additions & 3 deletions .github/workflows/unit_tests.yml
Expand Up @@ -120,14 +120,16 @@ jobs:
- name: install GitHub token (if available)
env:
# see https://github.com/<username>/easybuild-framework/settings/secrets
GITHUB_TOKEN: ${{secrets.TEST_GITHUB_TOKEN}}
# token (owned by @boegelbot) with gist permissions (required for some of the tests for GitHub integration);
# this token is not available in pull requests, so tests that require it are skipped in PRs,
# and are only run after the PR gets merged
GITHUB_TOKEN: ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}}
run: |
# don't install GitHub token when testing with Lmod 7.x or non-Lmod module tools,
# and only when testing with Lua as module syntax,
# to avoid hitting GitHub rate limit;
# tests that require a GitHub token are skipped automatically when no GitHub token is available
if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]] && [[ "${{matrix.modules_syntax}}" == 'Lua' ]]; then
if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]] && [[ "${{matrix.module_syntax}}" == 'Lua' ]]; then
if [ ! -z $GITHUB_TOKEN ]; then
if [ "x${{matrix.python}}" == 'x2.6' ];
then SET_KEYRING="keyring.set_keyring(keyring.backends.file.PlaintextKeyring())";
Expand Down
21 changes: 21 additions & 0 deletions RELEASE_NOTES
Expand Up @@ -4,6 +4,27 @@ For more detailed information, please see the git log.
These release notes can also be consulted at https://easybuild.readthedocs.io/en/latest/Release_notes.html.


v4.7.2 (27 May 2023)
--------------------

update/bugfix release

- various enhancements, including:
- extend (experimental) support for generating container images with Apptainer (#3975)
- add default download timeout (#4226)
- make the RPATH section check with `readelf -d` in sanity check optional (#4249)
- various bug fixes, including:
- add `make_extension_string` and `_make_extension_list` methods to `EasyBlock` class, so easyblocks can customize them (#3697)
- fix typo in condition guarding installation of GitHub token in CI workflow to run unit tests + fix broken tests related to GitHub integration features (#4216)
- fix --check-github as gist url now includes username (#4231)
- switch to Ubuntu 22.04 in GitHub Actions workflow to run container tests (#4238)
- use "/usr/bin/env python" in test_run_cmd_script (#4241)
- other changes:
- print potential errors after running a command only once (#4065)
- change github_* template descriptions to be somewhat clearer (#4251)
- remove workflow to test bootstrap script (#4255)


v4.7.1 (March 20th 2023)
------------------------

Expand Down

0 comments on commit 21d8ebc

Please sign in to comment.