Last active
August 29, 2015 13:56
-
-
Save friedmud/9199350 to your computer and use it in GitHub Desktop.
moose_test recipe
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
# Go to where the MOOSE repo was cloned | |
cd $REPO_DIR | |
git reset HEAD --hard | |
# Check out the devel branch (note, we might already be there, that's ok) | |
git co devel | |
# clean it | |
git clean -xfd | |
# Update the devel branch | |
git pull --rebase origin devel | |
# Create a branch to work with (we'll delete this later) | |
# We're replacing the '/'es in the repo name with dashes | |
# to create the branch name | |
branch_name=${repo//\//-} | |
git co -b $branch_name | |
# Merge the branch in the pull request into this one: | |
git pull $ssh_url $ref | |
# Now build and test | |
cd $REPO_DIR/test | |
make -j16 | |
./run_tests -c -j16 | |
# Save off the return code from ./run_tests | |
return_code=$? | |
# Clean up in the case of bad merge | |
git reset HEAD --hard | |
# Go back to the devel branch then delete this one | |
git co devel | |
git branch -D $branch_name | |
# Return the return code | |
exit $return_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment