tbl2asn #3532
Workflow file for this run
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
name: easyconfigs unit tests | |
on: [pull_request] | |
jobs: | |
test-suite: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python: [3.6] | |
modules_tool: [Lmod-7.8.22] | |
module_syntax: [Tcl] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up Python | |
uses: actions/setup-python@v4 | |
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 | |
# for testing OpenMPI-system*eb we need to have Open MPI installed | |
sudo apt-get install libopenmpi-dev openmpi-bin | |
# required for test_dep_graph | |
pip install pep8 python-graph-core python-graph-dot | |
- name: install EasyBuild framework | |
run: | | |
cd $HOME | |
# first determine which branch of easybuild-framework repo to install | |
# use our '2019b' branch of framework/easyblocks, except when testing 'master' or '4.x' branches | |
BRANCH=2019b | |
if [ "x$GITHUB_BASE_REF" = 'xmaster' ]; then BRANCH=master; fi | |
if [ "x$GITHUB_BASE_REF" = 'x4.x' ]; then BRANCH=4.x; fi | |
echo "Using easybuild-framework branch $BRANCH (\$GITHUB_BASE_REF $GITHUB_BASE_REF)" | |
git clone -b $BRANCH --depth 10 --single-branch https://github.com/bear-rsg/easybuild-framework.git | |
cd easybuild-framework; git log -n 1; cd - | |
pip install $PWD/easybuild-framework | |
git clone -b $BRANCH --depth 10 --single-branch https://github.com/bear-rsg/easybuild-easyblocks.git | |
cd easybuild-easyblocks; git log -n 1; cd - | |
pip install $PWD/easybuild-easyblocks | |
- name: install modules tool | |
run: | | |
cd $HOME | |
# use install_eb_dep.sh script provided with easybuild-framework | |
export INSTALL_DEP=$(which install_eb_dep.sh) | |
echo "Found install_eb_dep.sh script: $INSTALL_DEP" | |
# install modules tool | |
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: run test suite | |
env: | |
EB_VERBOSE: 1 | |
EASYBUILD_MODULE_SYNTAX: ${{matrix.module_syntax}} | |
run: | | |
# pull in target so we can diff against it to obtain list of touched files | |
if [ "x$GITHUB_BASE_REF" != 'xmaster' ]; then git fetch -v origin ${GITHUB_BASE_REF}:${GITHUB_BASE_REF}; fi | |
# 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 | |
WORKDIR=$GITHUB_WORKSPACE/easybuild-easyconfigs | |
export PATH=$WORKDIR/test/bin:$(cat $HOME/path) | |
export PYTHONPATH=$WORKDIR | |
# tell EasyBuild which modules tool is available | |
if [[ ${{matrix.modules_tool}} =~ ^modules-tcl- ]]; then | |
export EASYBUILD_MODULES_TOOL=EnvironmentModulesTcl | |
elif [[ ${{matrix.modules_tool}} =~ ^modules-3 ]]; then | |
export EASYBUILD_MODULES_TOOL=EnvironmentModulesC | |
elif [[ ${{matrix.modules_tool}} =~ ^modules-4 ]]; then | |
export EASYBUILD_MODULES_TOOL=EnvironmentModules | |
else | |
export EASYBUILD_MODULES_TOOL=Lmod | |
fi | |
eb --version | |
eb --show-config | |
# gather some useful info on test system | |
eb --show-system-info | |
# run test suite | |
python -O -m test.easyconfigs.suite | |
unset PYTHONPATH |