-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ivan Cao-Berg
committed
Apr 18, 2024
1 parent
f7da13c
commit ec5886e
Showing
2 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Container build | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
singularity_version: | ||
- '3.7.3' | ||
container: | ||
image: quay.io/singularity/singularity:v${{ matrix.singularity_version }} | ||
options: --privileged | ||
steps: | ||
- name: Check out code for the container build | ||
uses: actions/checkout@v1 | ||
|
||
- name: Build and test container | ||
run: | | ||
for DIRECTORY in * | ||
do | ||
if [ -d $DIRECTORY ]; then | ||
if [ $DIRECTORY != 'images' ]; then | ||
cd $DIRECTORY | ||
echo "Building container" | ||
bash ./build.sh | ||
if [ -f ./test.sh ]; then | ||
echo "Running tests" | ||
bash ./test.sh | ||
else | ||
echo "Test file not found. Skipping tests." | ||
fi | ||
cd .. | ||
fi | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Publishing ready | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install useful utilities | ||
run: sudo apt-get install -y tree | ||
|
||
- name: Checking if LICENSE exists | ||
run: | | ||
FILE=LICENSE | ||
if [ -f "$FILE" ]; then | ||
echo "File "$FILE" exists." | ||
exit 0 | ||
else | ||
echo "File $FILE does not exist." | ||
exit 1 | ||
fi | ||
- name: Checking if Apache License Version 2.0, January 2004 is being used | ||
run: | | ||
if grep --quiet "Apache License" LICENSE && grep --quiet "Version 2.0, January 2004" LICENSE; then | ||
echo "Using Apache License Version 2.0, January 2004" | ||
exit 0 | ||
else | ||
echo "Not using Apache License Version 2.0, January 2004" | ||
exit 1 | ||
fi | ||
- name: Checking if CONTRIBUTING guide exists | ||
run: | | ||
FILE=CONTRIBUTING.md | ||
if [ -f "$FILE" ]; then | ||
echo "File "$FILE" exists." | ||
exit 0 | ||
else | ||
echo "File $FILE does not exist." | ||
exit 1 | ||
fi | ||
- name: Checking if README file exists | ||
run: | | ||
FILE=README.md | ||
if [ -f "$FILE" ]; then | ||
echo "File "$FILE" exists." | ||
exit 0 | ||
else | ||
echo "File $FILE does not exist." | ||
exit 1 | ||
fi | ||
- name: Checking if copyrighted to Pittsburgh Supercomputing Center | ||
run: | | ||
if grep --quiet "Pittsburgh Supercomputing Center. All Rights Reserved." README.md; then | ||
echo "Copyright (c) Pittsburgh Supercomputing Center" | ||
exit 0 | ||
else | ||
echo "No reference to Pittsburgh Supercomputing Center" | ||
exit 1 | ||
fi | ||
- name: Checking if there exists at least one Singularity definition file | ||
run: | | ||
FILE=Singularity | ||
if [ $(find . -name "$FILE" -mmin -5 | wc -l) -gt 0 ]; then | ||
echo "File "$FILE" was found."; | ||
exit 0 | ||
else | ||
echo "File "$FILE" was not found."; | ||
exit 1 | ||
fi | ||
- name: Checking if there exists at least one build script | ||
run: | | ||
FILE=build.sh | ||
if [ $(find . -name "$FILE" -mmin -5 | wc -l) -gt 0 ]; then | ||
echo "File "$FILE" was found."; | ||
exit 0 | ||
else | ||
echo "File "$FILE" was not found."; | ||
exit 1 | ||
fi | ||
- name: Checking if there exists at least one remote build script | ||
run: | | ||
FILE=rbuild.sh | ||
if [ $(find . -name "$FILE" -mmin -5 | wc -l) -gt 0 ]; then | ||
echo "File "$FILE" was found."; | ||
exit 0 | ||
else | ||
echo "File "$FILE" was not found."; | ||
exit 1 | ||
fi | ||
- name: Checking if there exists at least one test script | ||
run: | | ||
FILE=test.sh | ||
if [ $(find . -name "$FILE" -mmin -5 | wc -l) -gt 0 ]; then | ||
echo "File "$FILE" was found."; | ||
exit 0 | ||
else | ||
echo "File "$FILE" was not found."; | ||
exit 1 | ||
fi |