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

Build CI test #1

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup MPI
run: sudo apt-get install mpich libmpich-dev
- name: Configure
run: cat /proc/cpuinfo; cd src/; ./configure
- name: Make
run: cd src/; make -j
- name: Drivers
run: cd src/test/; make all
- name: Tests
run: cd src/test/; bash ./runtest.sh TEST_ij/versioncheck.sh; bash ./checktest.sh TEST_ij/
2 changes: 1 addition & 1 deletion src/test/TEST_ij/versioncheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ -d ../../../.git ]; then
DEVBRANCH=`git rev-parse --abbrev-ref HEAD`
if [ -n "$DEVSTRING" ]; then
if [ "$DEVBRANCH" != "master" ]; then
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \
echo "Using HYPRE_DEVELOP_STRING: (not main development branch)" \
> ${TNAME}.testdatacheck
else
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \
Expand Down
6 changes: 5 additions & 1 deletion src/test/checktest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ EOF
esac

RESET=`shopt -p nullglob` # Save current nullglob setting
shopt -s nullglob # Return an empty string for failed wildcard matches
shopt -s nullglob # Return an empty string for failed wildcard matches
if [ "x$1" = "x" ]
then
testdirs=`echo TEST*` # All TEST directories
else
testdirs=`echo $*` # Only the specified test directories
fi
$RESET # Restore nullglob setting
STATUS=0

echo ""
for testdir in $testdirs
Expand All @@ -48,10 +49,13 @@ do
if [ $SZ != 0 ]
then
echo "FAILED : $file ($SZ)"
STATUS=1
else
echo " OK : $file"
fi
done
echo ""
fi
done

exit $STATUS