diff --git a/.github/workflows/extract-sage-local.sh b/.ci/extract-sage-local.sh similarity index 100% rename from .github/workflows/extract-sage-local.sh rename to .ci/extract-sage-local.sh diff --git a/.github/workflows/scan-logs.sh b/.ci/scan-logs.sh similarity index 63% rename from .github/workflows/scan-logs.sh rename to .ci/scan-logs.sh index 5df32b0fc48..2d417980bfa 100755 --- a/.github/workflows/scan-logs.sh +++ b/.ci/scan-logs.sh @@ -2,13 +2,13 @@ # The markup in the output is a GitHub Actions logging command # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions LOGS=${1-logs} -for a in $(find "$LOGS" -type f -name "*.log"); do - if tail -100 "$a" 2>/dev/null | grep "^[A-Za-z]*Error" >/dev/null; then +for a in $(find "$LOGS" -type f -name "*.log" | sort); do + if tail -100 "$a" 2>/dev/null | grep -E "^(([[][^]]*[]] *)*[A-Za-z]*Error|configure: exit)" >/dev/null; then echo :":"error file=$a:":" ==== ERROR IN LOG FILE $a ==== echo "::group::$a" cat "$a" echo "::endgroup::" - elif tail -20 "$a" 2>/dev/null | grep -E "^(Warning: Error testing|^sage .*doctest.*failed)" >/dev/null; then + elif tail -20 "$a" 2>/dev/null | grep -E "^([[][^]]*[]] *)*(Warning: Error testing|^sage .*doctest.*failed)" >/dev/null; then echo :":"warning file=$a:":" ==== TESTSUITE FAILURE IN LOG FILE $a ==== echo "::group::$a" cat "$a" diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index d1a5d62f425..f7823f1cd6e 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -155,5 +155,6 @@ jobs: - name: Print out logs for immediate inspection # and markup the output with GitHub Actions logging commands run: | - .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME" + if [ -x .ci/scan-logs.sh ]; then .ci/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"; fi + if [ -x .github/workflows/scan-logs.sh ]; then .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"; fi if: always() diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ccc2b07a02f..d2b22727a56 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -260,7 +260,8 @@ jobs: - name: Print out logs for immediate inspection # and markup the output with GitHub Actions logging commands run: | - .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME" + if [ -x .ci/scan-logs.sh ]; then .ci/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"; fi + if [ -x .github/workflows/scan-logs.sh ]; then .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"; fi if: always() - name: List Docker images run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ccba31a3dcc..8bea8950872 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -119,7 +119,8 @@ jobs: # This is macOS tar -- cannot use --listed-incremental run: | export SAGE_LOCAL=$(pwd)/.tox/$TOX_ENV/local - .github/workflows/extract-sage-local.sh sage-local-artifact/sage-local-*.tar + if [ -x .ci/extract-sage-local.sh ]; then .ci/extract-sage-local.sh sage-local-artifact/sage-local-*.tar; fi + if [ -x .github/workflows/extract-sage-local.sh ]; then .github/workflows/extract-sage-local.sh sage-local-artifact/sage-local-*.tar; fi if: contains(inputs.stage, '2') - name: Build and test with tox # We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts. @@ -157,7 +158,8 @@ jobs: - name: Print out logs for immediate inspection # and markup the output with GitHub Actions logging commands run: | - .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME" + if [ -x .ci/scan-logs.sh ]; then .ci/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"; fi + if [ -x .github/workflows/scan-logs.sh ]; then .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"; fi if: always() - name: Prepare sage-local artifact # This also includes the copies of homebrew or conda installed in the tox environment.