-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3720 from easybuilders/4.4.x
release EasyBuild v4.4.0
- Loading branch information
Showing
75 changed files
with
3,600 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
name: test EasyBuild bootstrap script | ||
on: [push, pull_request] | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
lmod7: Lmod-7.8.22 | ||
lmod8: Lmod-8.4.27 | ||
modulesTcl: modules-tcl-1.147 | ||
modules3: modules-3.2.10 | ||
modules4: modules-4.1.4 | ||
steps: | ||
- run: "true" | ||
build: | ||
needs: setup | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
# Don't run for Python 3.8, 3.9 , people should just use `pip install easybuild` | ||
python: [2.7, 3.6, 3.7] | ||
modules_tool: | ||
# use variables defined by 'setup' job above, see also | ||
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context | ||
- ${{needs.setup.outputs.lmod7}} | ||
- ${{needs.setup.outputs.lmod8}} | ||
module_syntax: [Lua] | ||
lc_all: [""] | ||
include: | ||
# also test with module tools other than Lmod (only Tcl syntax) | ||
- modules_tool: ${{needs.setup.outputs.modulesTcl}} | ||
module_syntax: Tcl | ||
python: 2.7 | ||
- modules_tool: ${{needs.setup.outputs.modulesTcl}} | ||
module_syntax: Tcl | ||
python: 3.6 | ||
- modules_tool: ${{needs.setup.outputs.modules3}} | ||
module_syntax: Tcl | ||
python: 2.7 | ||
- modules_tool: ${{needs.setup.outputs.modules3}} | ||
module_syntax: Tcl | ||
python: 3.6 | ||
- modules_tool: ${{needs.setup.outputs.modules4}} | ||
module_syntax: Tcl | ||
python: 2.7 | ||
- modules_tool: ${{needs.setup.outputs.modules4}} | ||
module_syntax: Tcl | ||
python: 3.6 | ||
# There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set | ||
# Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7) | ||
- python: 3.6 | ||
modules_tool: ${{needs.setup.outputs.lmod8}} | ||
module_syntax: Lua | ||
lc_all: C | ||
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: | | ||
# disable apt-get update, we don't really need it, | ||
# and it does more harm than good (it's fairly expensive, and it results in flaky test runs) | ||
# sudo apt-get update | ||
# 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 modules tool | ||
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 ${{matrix.modules_tool}} $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: test bootstrap script | ||
run: | | ||
# (re)initialize environment for modules tool | ||
if [ -f $HOME/moduleshome ]; then export MODULESHOME=$(cat $HOME/moduleshome); fi | ||
source $(cat $HOME/mod_init); type module | ||
# also pick up changes to $PATH set by sourcing $HOME/mod_init | ||
export PATH=$(cat $HOME/path) | ||
# define $EASYBUILD_MODULES_TOOL only for oldest module tools | ||
# (for Lmod and EnvironmentModules 4.x the bootstrap script should correctly auto-detect the modules tool) | ||
if [[ ${{matrix.modules_tool}} =~ ^modules-tcl- ]]; then | ||
export EASYBUILD_MODULES_TOOL=EnvironmentModulesTcl | ||
elif [[ ${{matrix.modules_tool}} =~ ^modules-3 ]]; then | ||
export EASYBUILD_MODULES_TOOL=EnvironmentModulesC | ||
fi | ||
# version and SHA256 checksum are hardcoded below to avoid forgetting to update the version in the script along with contents | ||
EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g') | ||
EB_BOOTSTRAP_SHA256SUM=$(sha256sum easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ') | ||
EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM" | ||
EB_BOOTSTRAP_EXPECTED="20210106.01 c2d93de0dd91123eb4f51cfc16d1f5efb80f1d238b3d6cd100994086887a1ae0" | ||
test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1) | ||
# test bootstrap script | ||
export PREFIX=/tmp/$USER/$GITHUB_SHA/eb_bootstrap | ||
python easybuild/scripts/bootstrap_eb.py $PREFIX | ||
# unset $PYTHONPATH to avoid mixing two EasyBuild 'installations' when testing bootstrapped EasyBuild module | ||
unset PYTHONPATH | ||
# simple sanity check on bootstrapped EasyBuild module | ||
module use $PREFIX/modules/all | ||
module load EasyBuild | ||
eb --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.