@@ -246,20 +246,20 @@ jobs:
246
246
247
247
for file in $SOURCE_DIR/*; do
248
248
# Is the file of the correct form?
249
- base_name =$(basename $file)
250
- if ! [[ $base_name =~ ^BIOMD[0-9]+\.omex$ ]]; then
251
- echo "Input is invalid. Expecting ` BIOMD##########.omex` format, got `${base_name}` ."
249
+ file_name =$(basename $file)
250
+ if ! [[ $file_name =~ ^BIOMD[0-9]+\.omex$ ]]; then
251
+ echo "Input is invalid. Expecting ' BIOMD##########.omex format, got '${file_name}' ."
252
252
continue
253
253
fi
254
254
# ...is it the infamous BioModel 1008?
255
- if [[ $base_name == *1008* ]]; then
255
+ if [[ $file_name == *1008* ]]; then
256
256
echo -n 'skipping '
257
- echo $base_name
257
+ echo $file_name
258
258
continue
259
259
fi
260
- number=$(echo "$base_name " | sed -n 's/^BIOMD\([0-9]\+\)\.omex$/\1/p' | sed 's/^0*//')
260
+ number=$(echo "$file_name " | sed -n 's/^BIOMD\([0-9]\+\)\.omex$/\1/p' | sed 's/^0*//')
261
261
if [ $((number % ${{ strategy.job-total }})) -eq $((MOD_VALUE + 0)) ]; then
262
- echo "Accepting ${base_name }"
262
+ echo "Accepting ${file_name }"
263
263
cp ${file} $TARGET_DIR/
264
264
fi
265
265
done
@@ -268,24 +268,29 @@ jobs:
268
268
- name : Begin Execution
269
269
# $(docker image ls | grep "<none>" | awk '{print $3;}') to get image id
270
270
run : |
271
- if [ ${{ matrix.sets }} -eq 4 ] || [ ${{ matrix.sets }} -eq 2 ]; then
271
+ if [ ${{ matrix.sets }} -eq 4 ] || [ ${{ matrix.sets }} -eq 6 ]; then
272
272
# The /* goes on the outside, otherwise bash just interprets a string!
273
273
for file in "$GITHUB_WORKSPACE/set_${{ matrix.sets }}"/*; do
274
274
echo "\"$file\""
275
275
if [ -f "$file" ]; then
276
- base_name="${file%.*}"
277
- mkdir "${base_name}_output"
278
- echo "Running \"$file\" in output folder \"${base_name}_output\""
279
- sim_input="/root/$(basename ${file})"
280
- sim_output="/root/$(basename ${base_name})_output"
281
- 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
276
+ extensionless_name="${file%.*}"
277
+ base_name="$(basename ${file})"
278
+ base_extless_name="$(basename ${extensionless_name})"
279
+ mkdir "${extensionless_name}_output"
280
+ echo "Running \"${file}\" in output folder \"${base_extless_name}_output\""
281
+ sim_input="/root/${base_name}"
282
+ sim_output="/root/${base_extless_name}_output"
283
+ 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
284
+
282
285
echo -e "\n\n\n\n\n" # give ourselves some line separation
283
286
# Check for individual Success
284
- if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }} -name errorLog.txt | wc -l) -ne 0 ]
287
+ if [ $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name errorLog.txt | wc -l) -ne 0 ]
285
288
then
286
289
# Copy error log to github workspace
287
290
touch ${{ github.workspace }}/errors.report
288
- cat $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }} -name errorLog.txt) >> ${{ github.workspace }}/errors.report
291
+ cat $(find $GITHUB_WORKSPACE/set_${{ matrix.sets }}/${base_extless_name}_output -name errorLog.txt) >> ${{ github.workspace }}/errors.report
292
+ else
293
+ echo "No errors found in set $GITHUB_WORKSPACE/set_${{ matrix.sets }}"
289
294
fi
290
295
fi
291
296
done
0 commit comments