|
17 | 17 |
|
18 | 18 | # - SUCCESS (all of) |
19 | 19 | # - working directory contains slurm-JOBID.out file |
20 | | -# - working directory contains eessi*tar.gz |
| 20 | +# - working directory contains eessi*tar* |
21 | 21 | # - no message FATAL |
22 | 22 | # - no message ERROR |
23 | 23 | # - no message FAILED |
@@ -165,19 +165,19 @@ if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]]; then |
165 | 165 | fi |
166 | 166 |
|
167 | 167 | if [[ $USE_CHECK_BUILD_ARTEFACTS_SCRIPT -eq 0 ]]; then |
168 | | - TGZ=-1 |
| 168 | + TARBALL_CREATED=-1 |
169 | 169 | TARBALL= |
170 | 170 | if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]]; then |
171 | | - GP_tgz_created="\.tar\.gz created!" |
172 | | - grep_out=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep "${GP_tgz_created}" | sort -u) |
| 171 | + GP_tarball_created="\.tar.* created!" |
| 172 | + grep_out=$(grep -v "^>> searching for " ${job_dir}/${job_out} | grep "${GP_tarball_created}" | sort -u) |
173 | 173 | if [[ $? -eq 0 ]]; then |
174 | | - TGZ=1 |
| 174 | + TARBALL_CREATED=1 |
175 | 175 | TARBALL=$(echo ${grep_out} | sed -e 's@^.*/\(eessi[^/ ]*\) .*$@\1@') |
176 | 176 | else |
177 | | - TGZ=0 |
| 177 | + TARBALL_CREATED=0 |
178 | 178 | fi |
179 | 179 | # have to be careful to not add searched for pattern into slurm out file |
180 | | - [[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_tgz_created}"'" |
| 180 | + [[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_tarball_created}"'" |
181 | 181 | [[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}" |
182 | 182 | fi |
183 | 183 | fi |
|
190 | 190 | [[ ${VERBOSE} -ne 0 ]] && echo " REQ_MISSING: $([[ $MISSING -eq 1 ]] && echo 'yes' || echo 'no') (no)" |
191 | 191 | [[ ${VERBOSE} -ne 0 ]] && echo " NO_MISSING.: $([[ $NO_MISSING -eq 1 ]] && echo 'yes' || echo 'no') (yes)" |
192 | 192 | if [[ $USE_CHECK_BUILD_ARTEFACTS_SCRIPT -eq 0 ]]; then |
193 | | - [[ ${VERBOSE} -ne 0 ]] && echo " TGZ_CREATED: $([[ $TGZ -eq 1 ]] && echo 'yes' || echo 'no') (yes)" |
| 193 | + [[ ${VERBOSE} -ne 0 ]] && echo " TARBALL_CREATED: $([[ $TARBALL -eq 1 ]] && echo 'yes' || echo 'no') (yes)" |
194 | 194 | fi |
195 | 195 |
|
196 | 196 | # Here, we try to do some additional analysis on the output file |
@@ -219,7 +219,7 @@ if [[ ${SLURM_OUTPUT_FOUND} -eq 1 ]] && \ |
219 | 219 | [[ ${FAILED} -eq 0 ]] && \ |
220 | 220 | [[ ${MISSING} -eq 0 ]] && \ |
221 | 221 | [[ ${NO_MISSING} -eq 1 ]] && \ |
222 | | - [[ $USE_CHECK_BUILD_ARTEFACTS_SCRIPT -ne 0 || ${TGZ} -eq 1 ]] && \ |
| 222 | + [[ $USE_CHECK_BUILD_ARTEFACTS_SCRIPT -ne 0 || ${TARBALL_CREATED} -eq 1 ]] && \ |
223 | 223 | [[ $USE_CHECK_BUILD_ARTEFACTS_SCRIPT -ne 0 || -n ${TARBALL} ]]; then |
224 | 224 | # SUCCESS |
225 | 225 | status="SUCCESS" |
@@ -429,9 +429,9 @@ failure_msg="no message matching <code>${GP_no_missing}</code>" |
429 | 429 | comment_details_list=${comment_details_list}$(add_detail ${NO_MISSING} 1 "${success_msg}" "${failure_msg}") |
430 | 430 |
|
431 | 431 | if [[ $USE_CHECK_BUILD_ARTEFACTS_SCRIPT -eq 0 ]]; then |
432 | | - success_msg="found message matching <code>${GP_tgz_created}</code>" |
433 | | - failure_msg="no message matching <code>${GP_tgz_created}</code>" |
434 | | - comment_details_list=${comment_details_list}$(add_detail ${TGZ} 1 "${success_msg}" "${failure_msg}") |
| 432 | + success_msg="found message matching <code>${GP_tarball_created}</code>" |
| 433 | + failure_msg="no message matching <code>${GP_tarball_created}</code>" |
| 434 | + comment_details_list=${comment_details_list}$(add_detail ${TARBALL_CREATED} 1 "${success_msg}" "${failure_msg}") |
435 | 435 | fi |
436 | 436 |
|
437 | 437 | # Now, do the actual replacement of __DETAILS_FMT__ |
@@ -478,7 +478,16 @@ if [[ $USE_CHECK_BUILD_ARTEFACTS_SCRIPT -eq 0 ]]; then |
478 | 478 | size="$(stat --dereference --printf=%s ${TARBALL})" |
479 | 479 | size_mib=$((${size} >> 20)) |
480 | 480 | tmpfile=$(mktemp --tmpdir=. tarfiles.XXXX) |
481 | | - tar tf ${TARBALL} > ${tmpfile} |
| 481 | + if [[ "${TARBALL}" == *.tar.zst ]]; then |
| 482 | + tar --use-compress-program=zstd -tf ${TARBALL} > ${tmpfile} |
| 483 | + elif [[ "${TARBALL}" == *.tar.gz ]]; then |
| 484 | + tar --use-compress-program=gzip -tf ${TARBALL} > ${tmpfile} |
| 485 | + elif [[ "${TARBALL}" == *.tar ]]; then |
| 486 | + tar -tf ${TARBALL} > ${tmpfile} |
| 487 | + else |
| 488 | + echo "ERROR: Unsupported tarball extension!" >&2 |
| 489 | + exit 1 |
| 490 | + fi |
482 | 491 | entries=$(cat ${tmpfile} | wc -l) |
483 | 492 | # determine prefix from job config: VERSION/software/OS_TYPE/CPU_FAMILY/ARCHITECTURE |
484 | 493 | # e.g., 2023.06/software/linux/x86_64/intel/skylake_avx512 |
|
0 commit comments