-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (38 loc) · 1.29 KB
/
singularity_image.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
name: Build and Push Singularity Image
on:
push:
branches:
- main
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: X86
defaults:
run:
shell: bash
working-directory: ./singularity
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Build Singularity Image
run: |
sudo singularity build ciroh-ngen-singularity.sif singularity_ngen.def
- name: Test
run: |
rm -rf /home/ubuntu/workspace/AWI_09_004/partitions*.json
rm -rf /home/ubuntu/workspace/AWI_09_004/*.csv
rm -rf /home/ubuntu/workspace/AWI_09_004/*.parquet
rm -rf /home/ubuntu/workspace/AWI_09_004/outputs/*
singularity run --bind /home/ubuntu/workspace/AWI_09_004:/ngen/ngen/data ciroh-ngen-singularity.sif "/ngen/ngen/data auto 2"
output_count=`ls /home/ubuntu/workspace/AWI_09_004/outputs | wc -l`
if [[ "$output_count" < 1 ]]; then
echo "No outputs found"
exit 1
else
echo "Test run successfully"
fi
- name: Push Singularity Image to Library
run: |
singularity push -U ciroh-ngen-singularity.sif library://awiciroh/ngiab/ciroh-ngen-singularity:latest