-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yaml
88 lines (83 loc) · 2.45 KB
/
action.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: "install Singularity action"
description: "Install a release version of Singularity, natively without npm"
inputs:
singularity-version:
description: version of singularity to install
required: true
default: 4.0.0
go-version:
description: version (or expression, e.g., >=1.21.0) of Go to install
default: '>=1.21.0'
required: true
cleanup:
description: cleanup singularity directory in /tmp
default: true
required: true
runs:
using: "composite"
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
cache: false
- run: go version
shell: bash
- name: Install Dependencies for v3
if: startsWith(inputs.singularity-version, '3')
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
libssl-dev \
uuid-dev \
libgpgme11-dev \
squashfs-tools \
libseccomp-dev \
pkg-config
- name: Install Dependencies for v4
if: startsWith(inputs.singularity-version, '4')
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
cryptsetup \
git \
libfuse-dev \
libglib2.0-dev \
libseccomp-dev \
libtool \
pkg-config \
runc \
squashfs-tools \
squashfs-tools-ng \
uidmap \
wget \
zlib1g-dev
- name: Install Singularity
shell: bash
env:
VERSION: ${{ inputs.singularity-version }}
run: |
# Build under isolated repository so we dont grab git version
cd /tmp
wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-ce-${VERSION}.tar.gz && \
tar -xzf singularity-ce-${VERSION}.tar.gz && \
rm singularity-ce-${VERSION}.tar.gz && \
cd singularity-ce-${VERSION} && \
./mconfig && \
make -C builddir && \
sudo make -C builddir install
- name: Cleanup
if: (inputs.cleanup == true || inputs.cleanup == 'true')
shell: bash
env:
VERSION: ${{ inputs.singularity-version }}
run: rm -rf /tmp/singularity-ce-${VERSION}
- name: Show version
shell: bash
run: |
which singularity
singularity version