From 2dfca6337d9cd82497af482ca79e6f74c95b5c05 Mon Sep 17 00:00:00 2001 From: Radu Suciu Date: Tue, 16 Jan 2024 15:08:07 -0800 Subject: [PATCH 1/7] update for singularity 4.0 --- .github/workflows/test-actions.yaml | 9 ++++---- action.yaml | 34 +++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-actions.yaml b/.github/workflows/test-actions.yaml index 3dcc674..664326a 100644 --- a/.github/workflows/test-actions.yaml +++ b/.github/workflows/test-actions.yaml @@ -1,5 +1,6 @@ name: Test Actions on: + workflow_dispatch: pull_request: [] jobs: @@ -8,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Singularity install defaults uses: ./ @@ -17,9 +18,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Singularity install custom uses: ./ with: - singularity-version: 3.8.4 - go-version: 1.18.0 + singularity-version: 4.0.0 + go-version: 1.21.0 diff --git a/action.yaml b/action.yaml index b205943..4b7de61 100644 --- a/action.yaml +++ b/action.yaml @@ -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 @@ -17,7 +17,7 @@ inputs: runs: using: "composite" steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: ${{ inputs.go-version }} - run: go version @@ -28,11 +28,27 @@ runs: run: | sudo apt-get update sudo apt-get install -y \ - build-essential \ - libseccomp-dev \ - pkg-config \ - squashfs-tools \ - cryptsetup + # dependencies for singularity 3.x + build-essential \ + libssl-dev \ + uuid-dev \ + libgpgme11-dev \ + squashfs-tools \ + libseccomp-dev \ + pkg-config \ + # dependencies for singulairyt 4.x + autoconf \ + automake \ + cryptsetup \ + git \ + libfuse-dev \ + libglib2.0-dev \ + libtool \ + runc \ + squashfs-tools-ng \ + uidmap \ + wget \ + zlib1g-dev - name: Install Singularity shell: bash From ae2066d479f864d09c34a358f145bdda321022c8 Mon Sep 17 00:00:00 2001 From: Radu Suciu Date: Tue, 16 Jan 2024 15:10:33 -0800 Subject: [PATCH 2/7] fix: add missing continuations --- action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index 4b7de61..de2dea3 100644 --- a/action.yaml +++ b/action.yaml @@ -28,7 +28,7 @@ runs: run: | sudo apt-get update sudo apt-get install -y \ - # dependencies for singularity 3.x + # dependencies for singularity 3.x \ build-essential \ libssl-dev \ uuid-dev \ @@ -36,7 +36,7 @@ runs: squashfs-tools \ libseccomp-dev \ pkg-config \ - # dependencies for singulairyt 4.x + # dependencies for singulairyt 4.x \ autoconf \ automake \ cryptsetup \ From 387c190fc4f28c50c09b28f61098ad3920051814 Mon Sep 17 00:00:00 2001 From: Radu Suciu Date: Tue, 16 Jan 2024 15:14:36 -0800 Subject: [PATCH 3/7] test singularity v3 and v4 and fix some typos --- .github/workflows/test-actions.yaml | 20 +++++++++++++++----- README.md | 4 ++-- action.yaml | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-actions.yaml b/.github/workflows/test-actions.yaml index 664326a..459bcd2 100644 --- a/.github/workflows/test-actions.yaml +++ b/.github/workflows/test-actions.yaml @@ -4,7 +4,7 @@ on: pull_request: [] jobs: - install-singuarity: + install-singularity: name: Install with defaults runs-on: ubuntu-latest steps: @@ -12,8 +12,18 @@ jobs: uses: actions/checkout@v4 - name: Singularity install defaults uses: ./ - - install-singuarity-custom: + install-singularity-3-custom: + name: Install with custom + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Singularity install custom + uses: ./ + with: + singularity-version: 3.11.0 + go-version: 1.18.0 + install-singularity-4-custom: name: Install with custom runs-on: ubuntu-latest steps: @@ -22,5 +32,5 @@ jobs: - name: Singularity install custom uses: ./ with: - singularity-version: 4.0.0 - go-version: 1.21.0 + singularity-version: 4.0.1 + go-version: 1.20.0 diff --git a/README.md b/README.md index ed9abfd..d366ebb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ on: pull_request: [] jobs: - install-singuarity: + install-singularity: name: Install Singularity runs-on: ubuntu-latest steps: @@ -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: diff --git a/action.yaml b/action.yaml index de2dea3..ddecea7 100644 --- a/action.yaml +++ b/action.yaml @@ -36,7 +36,7 @@ runs: squashfs-tools \ libseccomp-dev \ pkg-config \ - # dependencies for singulairyt 4.x \ + # dependencies for singularity 4.x \ autoconf \ automake \ cryptsetup \ From a38a9088eed644d6956e9bbc9e34885386bf89bb Mon Sep 17 00:00:00 2001 From: Radu Suciu Date: Tue, 16 Jan 2024 15:18:59 -0800 Subject: [PATCH 4/7] wrap go-version in single quotes suspecting a YAML issue.. --- .github/workflows/test-actions.yaml | 12 ++++++------ README.md | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-actions.yaml b/.github/workflows/test-actions.yaml index 459bcd2..459fc1e 100644 --- a/.github/workflows/test-actions.yaml +++ b/.github/workflows/test-actions.yaml @@ -13,7 +13,7 @@ jobs: - name: Singularity install defaults uses: ./ install-singularity-3-custom: - name: Install with custom + name: Install with custom v3 runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -21,10 +21,10 @@ jobs: - name: Singularity install custom uses: ./ with: - singularity-version: 3.11.0 - go-version: 1.18.0 + singularity-version: '3.11.0' + go-version: '1.18.0' install-singularity-4-custom: - name: Install with custom + name: Install with custom v4 runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -32,5 +32,5 @@ jobs: - name: Singularity install custom uses: ./ with: - singularity-version: 4.0.1 - go-version: 1.20.0 + singularity-version: '4.0.1' + go-version: '1.20.0' diff --git a/README.md b/README.md index d366ebb..803f2b4 100644 --- a/README.md +++ b/README.md @@ -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. From 3ed786c79cc18cf7f2c8ebf75968f491a3d6f621 Mon Sep 17 00:00:00 2001 From: Radu Suciu Date: Tue, 16 Jan 2024 15:20:38 -0800 Subject: [PATCH 5/7] remove comments in system dependency list --- action.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/action.yaml b/action.yaml index ddecea7..6941dbd 100644 --- a/action.yaml +++ b/action.yaml @@ -28,7 +28,6 @@ runs: run: | sudo apt-get update sudo apt-get install -y \ - # dependencies for singularity 3.x \ build-essential \ libssl-dev \ uuid-dev \ @@ -36,7 +35,6 @@ runs: squashfs-tools \ libseccomp-dev \ pkg-config \ - # dependencies for singularity 4.x \ autoconf \ automake \ cryptsetup \ From 0f16f477f099de2c1faba9696952795a07709195 Mon Sep 17 00:00:00 2001 From: Radu Suciu Date: Tue, 16 Jan 2024 15:25:58 -0800 Subject: [PATCH 6/7] install separate dependencies based on singularity version --- action.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/action.yaml b/action.yaml index 6941dbd..5c7d17a 100644 --- a/action.yaml +++ b/action.yaml @@ -22,8 +22,8 @@ runs: 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 @@ -34,15 +34,25 @@ runs: libgpgme11-dev \ squashfs-tools \ libseccomp-dev \ - pkg-config \ + 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 \ From dcaa2cc3f6e9f66b173dcb90af576cee7f1d9c96 Mon Sep 17 00:00:00 2001 From: Radu Suciu Date: Tue, 16 Jan 2024 15:28:45 -0800 Subject: [PATCH 7/7] workflow edits for clarity --- .github/workflows/test-actions.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-actions.yaml b/.github/workflows/test-actions.yaml index 459fc1e..3e4d38e 100644 --- a/.github/workflows/test-actions.yaml +++ b/.github/workflows/test-actions.yaml @@ -10,26 +10,26 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Singularity install defaults + - name: Singularity install with defaults uses: ./ - install-singularity-3-custom: + install-singularity-v3-custom: name: Install with custom v3 runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Singularity install custom + - name: Singularity v3 custom install uses: ./ with: singularity-version: '3.11.0' go-version: '1.18.0' - install-singularity-4-custom: + install-singularity-v4-custom: name: Install with custom v4 runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Singularity install custom + - name: Singularity v4 custom install uses: ./ with: singularity-version: '4.0.1'