Skip to content

Commit

Permalink
Fixed location of finding error file to be more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeByDrescher committed Dec 13, 2024
1 parent 1317b53 commit 9165ea1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/NightlyBMDB_CLI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,20 @@ jobs:
for file in $SOURCE_DIR/*; do
# Is the file of the correct form?
base_name=$(basename $file)
if ! [[ $base_name =~ ^BIOMD[0-9]+\.omex$ ]]; then
echo "Input is invalid. Expecting `BIOMD##########.omex` format, got `${base_name}`."
file_name=$(basename $file)
if ! [[ $file_name =~ ^BIOMD[0-9]+\.omex$ ]]; then
echo "Input is invalid. Expecting `BIOMD##########.omex` format, got `${file_name}`."
continue
fi
# ...is it the infamous BioModel 1008?
if [[ $base_name == *1008* ]]; then
if [[ $file_name == *1008* ]]; then
echo -n 'skipping '
echo $base_name
echo $file_name
continue
fi
number=$(echo "$base_name" | sed -n 's/^BIOMD\([0-9]\+\)\.omex$/\1/p' | sed 's/^0*//')
number=$(echo "$file_name" | sed -n 's/^BIOMD\([0-9]\+\)\.omex$/\1/p' | sed 's/^0*//')
if [ $((number % ${{ strategy.job-total }})) -eq $((MOD_VALUE + 0)) ]; then
echo "Accepting ${base_name}"
echo "Accepting ${file_name}"
cp ${file} $TARGET_DIR/
fi
done
Expand All @@ -281,11 +281,11 @@ jobs:
docker run -v $GITHUB_WORKSPACE/set_${{ matrix.sets }}:/root $(docker image ls | grep "<none>" | awk '{print $3;}') execute -d -i $sim_input -o $sim_output --writeLogFiles --guaranteeGoodReturnCode
echo -e "\n\n\n\n\n" # give ourselves some line separation
# Check for individual Success
if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }} -name errorLog.txt | wc -l) -ne 0 ]
if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_name}_output -name errorLog.txt | wc -l) -ne 0 ]
then
# Copy error log to github workspace
touch ${{ github.workspace }}/errors.report
cat $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }} -name errorLog.txt) >> ${{ github.workspace }}/errors.report
cat $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_name}_output -name errorLog.txt) >> ${{ github.workspace }}/errors.report
fi
fi
done
Expand Down

0 comments on commit 9165ea1

Please sign in to comment.