-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathaction.yml
More file actions
68 lines (66 loc) · 3.11 KB
/
action.yml
File metadata and controls
68 lines (66 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: 'EESSI'
description: 'Install the EESSI software stack.'
branding:
icon: 'server'
color: 'gray-dark'
inputs:
eessi_stack_version:
description: 'Version of the EESSI stack to configure'
required: false
default: '2023.06'
eessi_repositories:
description: 'Comma-separated list of fully qualified repository names that shall be mountable under /cvmfs.'
required: false
default: 'software.eessi.io,dev.eessi.io'
use_eessi_module:
description: 'Use the EESSI module to initialise EESSI (rather than sourcing a bash script), valid values are true or false'
required: false
default: 'false'
init_direnv:
description: 'Enable direnv initialisation for the repository, valid values are true or false'
required: false
default: 'true'
runs:
using: "composite"
steps:
- uses: cvmfs-contrib/github-action-cvmfs@10197e000cc0add8e54ac4fb73d3ed44e2de72b4 # v5.5
with:
# Can't use config package for macOS but our repos are available with the default configuration anyway
# cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
cvmfs_http_proxy: DIRECT
cvmfs_repositories: 'cvmfs-config.cern.ch,${{ inputs.eessi_repositories }}'
- id: install-eessi
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
echo 'unset BASH_ENV' >> $HOME/env_config.export
if [[ "${{ inputs.use_eessi_module }}" == "true" ]]; then
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/lmod/bash" >> $HOME/env_config.export
else
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
fi
# allow oversubscription for OpenMPI
echo "export OMPI_MCA_rmaps_base_oversubscribe=1" >> $HOME/env_config.export
if [[ "${{ inputs.init_direnv }}" == "true" ]]; then
sudo apt install -y direnv
echo 'eval "$(direnv export bash)"' >> $HOME/env_config.export
mkdir -p $HOME/direnv/
echo "[whitelist]" >> $HOME/direnv/direnv.toml
echo "prefix = [ '$GITHUB_WORKSPACE' ]" >> $HOME/direnv/direnv.toml
cp $HOME/direnv/direnv.toml $HOME/direnv/config.toml
echo "DIRENV_CONFIG=$HOME/direnv" >> $GITHUB_ENV
fi
echo "BASH_ENV=$HOME/env_config.export" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "macOS" ]; then
# EESSI on macOS requires lima so we get a Linux VM, see https://gitlab.com/eessi/support/-/issues/70
# (unfortunately this requires nested virtualisation in GitHub Actions which is not available with M1)
brew install lima
# limactl create --vm-type=vz --mount-type=virtiofs --network vzNAT --name eessi ./eessi.yaml
# limactl create --name eessi ./eessi.yaml
# limactl start eessi
## For debugging
# limactl start eessi || true
# cat /Users/runner/.lima/eessi/ha.stderr.log
fi
shell: bash
env:
EESSI_STACK_VERSION: ${{ inputs.eessi_stack_version }}