Skip to content

Commit

Permalink
Merge pull request #3 from radusuciu/main
Browse files Browse the repository at this point in the history
Add support for singularity v4
  • Loading branch information
vsoch authored Jan 17, 2024
2 parents 43acd36 + dcaa2cc commit 30473ce
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 25 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/test-actions.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
name: Test Actions
on:
workflow_dispatch:
pull_request: []

jobs:
install-singuarity:
install-singularity:
name: Install with defaults
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Singularity install defaults
uses: actions/checkout@v4
- name: Singularity install with defaults
uses: ./

install-singuarity-custom:
name: Install with custom
install-singularity-v3-custom:
name: Install with custom v3
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Singularity v3 custom install
uses: ./
with:
singularity-version: '3.11.0'
go-version: '1.18.0'
install-singularity-v4-custom:
name: Install with custom v4
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Singularity install custom
uses: actions/checkout@v4
- name: Singularity v4 custom install
uses: ./
with:
singularity-version: 3.8.4
go-version: 1.18.0
singularity-version: '4.0.1'
go-version: '1.20.0'
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
pull_request: []

jobs:
install-singuarity:
install-singularity:
name: Install Singularity
runs-on: ubuntu-latest
steps:
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Singularity install with defaults
uses: singularityhub/install-singularity@main

install-singuarity-custom:
install-singularity-custom:
name: Install Singularity Custom
runs-on: ubuntu-latest
steps:
Expand All @@ -39,8 +39,8 @@ jobs:
- name: Singularity install with defaults
uses: singularityhub/install-singularity@main
with:
singularity-version: 3.10.1
go-version: 1.18.0
singularity-version: '3.10.1'
go-version: '1.18.0'
```
See the [action.yaml](action.yaml) for details.
46 changes: 35 additions & 11 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ inputs:
singularity-version:
description: version of singularity to install
required: true
default: 3.10.4
default: 4.0.0
go-version:
description: version (or expression, e.g., >=1.17.0) of Go to install
default: '>=1.17.0'
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
Expand All @@ -17,22 +17,46 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- run: go version
shell: bash

- name: Install Dependencies
- 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 \
libseccomp-dev \
pkg-config \
squashfs-tools \
cryptsetup
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
Expand Down

0 comments on commit 30473ce

Please sign in to comment.