generated from ocaisa/github-action-cvmfs
-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
51 lines (50 loc) · 2.35 KB
/
action.yml
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
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'
runs:
using: "composite"
steps:
- uses: cvmfs-contrib/github-action-cvmfs@cec5c94a14714ab02980682fce8ab3de238401f9 # v4.0 + MacOS support
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
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
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 "BASH_ENV=$HOME/env_config.export" >> $GITHUB_ENV
echo "DIRENV_CONFIG=$HOME/direnv" >> $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 }}