Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for Singularity Image #13

Merged
merged 14 commits into from
Apr 6, 2024
24 changes: 21 additions & 3 deletions .github/workflows/singularity_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,33 @@ on:
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: |
singularity build ciroh-ngen-singularity.sif singularity/singularity_ngen.def
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
singularity push -U ciroh-ngen-singularity.sif library://awiciroh/ngiab/ciroh-ngen-singularity:latest
1 change: 1 addition & 0 deletions singularity/templates/ngen/install_ngen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ then
fi
git clone https://github.com/NOAA-OWP/ngen.git
cd ngen
git checkout f91e2ea
echo "==========================================================="
echo "==========================================================="

Expand Down
Loading