Skip to content

Commit 4b89db2

Browse files
authored
Merge pull request #3052 from easybuilders/4.0.x
release EasyBuild v4.0.1
2 parents 9c40a6f + f965f79 commit 4b89db2

32 files changed

+1290
-113
lines changed

.github/workflows/unit_tests.yml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
2+
name: EasyBuild framework unit tests
3+
on: [push, pull_request]
4+
jobs:
5+
build:
6+
runs-on: ubuntu-18.04
7+
strategy:
8+
matrix:
9+
python: [2.7, 3.5, 3.6, 3.7]
10+
modules_tool: [Lmod-6.6.3, Lmod-7.8.22, Lmod-8.1.14, modules-tcl-1.147, modules-3.2.10, modules-4.1.4]
11+
module_syntax: [Lua, Tcl]
12+
# exclude some configuration for non-Lmod modules tool:
13+
# - don't test with Lua module syntax (only supported in Lmod)
14+
# - don't test with Python 3.5 and 3.7 (only with 2.7 and 3.6), to limit test configurations
15+
exclude:
16+
- modules_tool: modules-tcl-1.147
17+
module_syntax: Lua
18+
- modules_tool: modules-3.2.10
19+
module_syntax: Lua
20+
- modules_tool: modules-4.1.4
21+
module_syntax: Lua
22+
- modules_tool: modules-tcl-1.147
23+
python: 3.5
24+
- modules_tool: modules-tcl-1.147
25+
python: 3.7
26+
- modules_tool: modules-3.2.10
27+
python: 3.5
28+
- modules_tool: modules-3.2.10
29+
python: 3.7
30+
- modules_tool: modules-4.1.4
31+
python: 3.5
32+
- modules_tool: modules-4.1.4
33+
python: 3.7
34+
fail-fast: false
35+
steps:
36+
- uses: actions/checkout@v1
37+
38+
- name: set up Python
39+
uses: actions/setup-python@v1
40+
with:
41+
python-version: ${{matrix.python}}
42+
architecture: x64
43+
44+
- name: install OS & Python packages
45+
run: |
46+
# for modules tool
47+
sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev
48+
# fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
49+
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
50+
# for GitPython, python-hglib
51+
sudo apt-get install git mercurial
52+
# dep for GC3Pie
53+
sudo apt-get install time
54+
# Python packages
55+
pip --version
56+
pip install --upgrade pip
57+
pip --version
58+
pip install -r requirements.txt
59+
# git config is required to make actual git commits (cfr. tests for GitRepository)
60+
git config --global user.name "Travis CI"
61+
git config --global user.email "[email protected]"
62+
git config --get-regexp 'user.*'
63+
64+
- name: install GitHub token (if available)
65+
env:
66+
# see https://github.com/<username>/easybuild-framework/settings/secrets
67+
GITHUB_TOKEN: ${{secrets.TEST_GITHUB_TOKEN}}
68+
run: |
69+
if [ ! -z $GITHUB_TOKEN ]; then
70+
if [ "x${{matrix.python}}" == 'x2.6' ];
71+
then SET_KEYRING="keyring.set_keyring(keyring.backends.file.PlaintextKeyring())";
72+
else SET_KEYRING="import keyrings; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
73+
fi;
74+
python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";
75+
fi
76+
77+
- name: install modules tool
78+
run: |
79+
# avoid downloading modules tool sources into easybuild-framework dir
80+
cd $HOME
81+
export INSTALL_DEP=$GITHUB_WORKSPACE/easybuild/scripts/install_eb_dep.sh
82+
# install Lmod
83+
source $INSTALL_DEP ${{matrix.modules_tool}} $HOME
84+
# changes in environment are not passed to other steps, so need to create files...
85+
echo $MOD_INIT > mod_init
86+
echo $PATH > path
87+
if [ ! -z $MODULESHOME ]; then echo $MODULESHOME > moduleshome; fi
88+
89+
- name: check sources
90+
run: |
91+
# make sure there are no (top-level) "import setuptools" or "import pkg_resources" statements,
92+
# since EasyBuild should not have a runtime requirement on setuptools
93+
SETUPTOOLS_IMPORTS=$(egrep -RI '^(from|import)[ ]*pkg_resources|^(from|import)[ ]*setuptools' * || true)
94+
test "x$SETUPTOOLS_IMPORTS" = "x" || (echo "Found setuptools and/or pkg_resources imports in easybuild/:\n${SETUPTOOLS_IMPORTS}" && exit 1)
95+
96+
- name: install sources
97+
run: |
98+
# install from source distribution tarball, to test release as published on PyPI
99+
python setup.py sdist
100+
ls dist
101+
export PREFIX=/tmp/$USER/$GITHUB_SHA
102+
pip install --prefix $PREFIX dist/easybuild-framework*tar.gz
103+
104+
- name: run test suite & test bootstrap script
105+
env:
106+
EB_VERBOSE: 1
107+
EASYBUILD_MODULE_SYNTAX: ${{matrix.module_syntax}}
108+
TEST_EASYBUILD_MODULE_SYNTAX: ${{matrix.module_syntax}}
109+
run: |
110+
# initialize environment for modules tool
111+
if [ -f $HOME/moduleshome ]; then export MODULESHOME=$(cat $HOME/moduleshome); fi
112+
source $(cat $HOME/mod_init); type module
113+
# make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that);
114+
# also pick up changes to $PATH set by sourcing $MOD_INIT
115+
export PREFIX=/tmp/$USER/$GITHUB_SHA
116+
export PATH=$PREFIX/bin:$(cat $HOME/path)
117+
export PYTHONPATH=$PREFIX/lib/python${{matrix.python}}/site-packages:$PYTHONPATH
118+
eb --version
119+
# tell EasyBuild which modules tool is available
120+
if [[ ${{matrix.modules_tool}} =~ ^modules-tcl- ]]; then
121+
export EASYBUILD_MODULES_TOOL=EnvironmentModulesTcl
122+
elif [[ ${{matrix.modules_tool}} =~ ^modules-3 ]]; then
123+
export EASYBUILD_MODULES_TOOL=EnvironmentModulesC
124+
elif [[ ${{matrix.modules_tool}} =~ ^modules-4 ]]; then
125+
export EASYBUILD_MODULES_TOOL=EnvironmentModules
126+
else
127+
export EASYBUILD_MODULES_TOOL=Lmod
128+
fi
129+
export TEST_EASYBUILD_MODULES_TOOL=$EASYBUILD_MODULES_TOOL
130+
eb --show-config
131+
# gather some useful info on test system
132+
eb --show-system-info
133+
# check GitHub configuration
134+
eb --check-github --github-user=easybuild_test
135+
# run test suite
136+
python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log
137+
# try and make sure output of running tests is clean (no printed messages/warnings)
138+
IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|requires Lmod as modules tool|stty: 'standard input': Inappropriate ioctl for device"
139+
# '|| true' is needed to avoid that Travis stops the job on non-zero exit of grep (i.e. when there are no matches)
140+
PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
141+
test "x$PRINTED_MSG" = "x" || (echo "ERROR: Found printed messages in output of test suite\n${PRINTED_MSG}" && exit 1)
142+
143+
# version and SHA256 checksum are hardcoded below to avoid forgetting to update the version in the script along with contents
144+
EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g')
145+
EB_BOOTSTRAP_SHA256SUM=$(sha256sum easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ')
146+
EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM"
147+
EB_BOOTSTRAP_EXPECTED="20190922.01 778762479d77df641c247aba33c13203c8c5b8275e47f59464bab93917aaaf22"
148+
test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1)
149+
150+
# test bootstrap script (only compatible with Python 2 for now)
151+
if [[ ${{matrix.python}} =~ '2.' ]]; then
152+
export PREFIX=/tmp/$USER/$GITHUB_SHA/eb_bootstrap
153+
python easybuild/scripts/bootstrap_eb.py $PREFIX
154+
# unset $PYTHONPATH to avoid mixing two EasyBuild 'installations' when testing bootstrapped EasyBuild module
155+
unset PYTHONPATH
156+
# simple sanity check on bootstrapped EasyBuild module (skip when testing with Python 3, for now)
157+
module use $PREFIX/modules/all
158+
module load EasyBuild
159+
eb --version
160+
else
161+
echo "Testing of bootstrap script skipped when testing with Python ${{matrix.python}}"
162+
fi

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ script:
122122
# run test suite
123123
- python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log
124124
# try and make sure output of running tests is clean (no printed messages/warnings)
125-
- IGNORE_PATTERNS="vsc\.install\.shared_setup|no GitHub token available|skipping SvnRepository test|lib/python2.6/site-packages|required Lmod as modules tool|GC3Pie not available, skipping test"
125+
- IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|lib/python2.6/site-packages|requires Lmod as modules tool"
126126
# '|| true' is needed to avoid that Travis stops the job on non-zero exit of grep (i.e. when there are no matches)
127127
- PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
128128
- test "x$PRINTED_MSG" = "x" || (echo "Found printed messages in output of test suite\n${PRINTED_MSG}" && exit 1)
@@ -131,7 +131,7 @@ script:
131131
- EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' $TRAVIS_BUILD_DIR/easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g')
132132
- EB_BOOTSTRAP_SHA256SUM=$(sha256sum $TRAVIS_BUILD_DIR/easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ')
133133
- EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM"
134-
- EB_BOOTSTRAP_EXPECTED="20190523.01 f419ce397246b722d8fa4862d56275badfc9062e965a6e45be9c1282c552352d"
134+
- EB_BOOTSTRAP_EXPECTED="20190922.01 778762479d77df641c247aba33c13203c8c5b8275e47f59464bab93917aaaf22"
135135
- test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1)
136136
# test bootstrap script (skip when testing with Python 3 for now, since latest EasyBuild release is not compatible with Python 3 yet)
137137
- if [ ! "x$TRAVIS_PYTHON_VERSION" =~ x3.[0-9] ]; then python $TRAVIS_BUILD_DIR/easybuild/scripts/bootstrap_eb.py /tmp/$TRAVIS_JOB_ID/eb_bootstrap; fi

RELEASE_NOTES

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@ For more detailed information, please see the git log.
33

44
These release notes can also be consulted at https://easybuild.readthedocs.io/en/latest/Release_notes.html.
55

6+
v4.0.1 (October 15th 2019)
7+
--------------------------
8+
9+
update/bugfix release
10+
11+
- various enhancements, including:
12+
- add 'parallel' to list of config templates (#3036)
13+
- add GitHub Actions workflow to run easybuild-framework test suite (#3039)
14+
- add 'retest' as a reason to --close-pr, to close/re-open PRs to trigger re-test in Travis (#3040)
15+
- define $EB_SCRIPT_PATH in 'eb' wrapper script, and consider it before location of 'eb' determined via $PATH in get_paths_for function (#3046)
16+
- add support for --remove-ghost-install-dirs configuration option, and warn about (potential) ghost install dirs by default when --force/--rebuild is used (#3050)
17+
- various bug fixes, including:
18+
- update bootstrap script to support installing EasyBuild v4.0 (#3017)
19+
- fix broken test_download_repo due to archiving of easyconfigs (#3019, #3023)
20+
- avoid that --inject-checksums introduces list of patches for extensions as a single long line (#3025, #3034)
21+
- enhance regex in fix_shebang method to fix more Python/Perl shebangs + avoid patching binary files (#3029)
22+
- delete test gist that is created by --check-github (#3031)
23+
- disable templates when defining easyconfig parameters in EasyConfig.set_keys() (#3037)
24+
- avoid setting GC3Pie's max_in_flight to None if --job-max-jobs is not specified (#3038)
25+
- fix use of obtain_file method for extensions (#3042)
26+
- error out if some GC3Pie job failed (#3044)
27+
28+
629
v4.0.0 (September 20th 2019)
730
----------------------------
831

0 commit comments

Comments
 (0)