diff --git a/.github/workflows/bootstrap_script.yml b/.github/workflows/bootstrap_script.yml deleted file mode 100644 index d8e4f52f95..0000000000 --- a/.github/workflows/bootstrap_script.yml +++ /dev/null @@ -1,137 +0,0 @@ -# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions -name: test EasyBuild bootstrap script -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: - setup: - runs-on: ubuntu-20.04 - outputs: - lmod7: Lmod-7.8.22 - lmod8: Lmod-8.7.6 - modulesTcl: modules-tcl-1.147 - modules3: modules-3.2.10 - modules4: modules-4.1.4 - steps: - - run: "true" - build: - needs: setup - runs-on: ubuntu-20.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@v3 - - - name: set up Python - uses: actions/setup-python@v3 - with: - python-version: ${{matrix.python}} - architecture: x64 - - - name: install OS & Python packages - run: | - # for modules tool - APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" - - # 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) - if ! sudo apt-get install $APT_PKGS; then - # Try to update cache, then try again to resolve 404s of old packages - sudo apt-get update -yqq || true - 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 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="20210715.01 935979de3a4c30b24c3617ff7cd7c40cbd4d815cee5be0c99810cc21f21182f1" - 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 - export EASYBUILD_BOOTSTRAP_DEPRECATED=1 - python easybuild/scripts/bootstrap_eb.py $PREFIX - unset EASYBUILD_BOOTSTRAP_DEPRECATED - # 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