Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gha: Print all *.log files, in a separate action #1655

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/actions/print-logs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Print logs"
description: "Print the log files produced by ci/ci.sh"
runs:
using: "composite"
steps:
- shell: bash
run: |
# Print the log files produced by ci/ci.sh

# Helper functions
group() {
title=$1
echo "::group::$title"
}
endgroup() {
echo "::endgroup::"
}
cat_file() {
file=$1
group "$file"
cat "$file"
endgroup
}

# Print all *.log files
shopt -s nullglob
for file in *.log; do
cat_file "$file"
done
Comment on lines +26 to +29
Copy link
Member

@hebasto hebasto Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The make.log file is now printed along with other logs.

Does it make sense to separate logs by groups:

  • config.log and make.log
  • tests and benchmarks
  • examples

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this would produce better output, but I also think that *.log is good enough and much easier to maintain.


# Print environment
group "CI env"
env
endgroup
264 changes: 43 additions & 221 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,9 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

i686_debian:
name: "i686: Linux (Debian stable)"
Expand Down Expand Up @@ -157,23 +143,9 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

s390x_debian:
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
Expand Down Expand Up @@ -203,23 +175,10 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}


arm32_debian:
name: "ARM32: Linux (Debian stable, QEMU)"
Expand Down Expand Up @@ -257,23 +216,9 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

arm64_debian:
name: "ARM64: Linux (Debian stable, QEMU)"
Expand Down Expand Up @@ -314,23 +259,9 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

ppc64le_debian:
name: "ppc64le: Linux (Debian stable, QEMU)"
Expand Down Expand Up @@ -360,23 +291,10 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}


valgrind_debian:
name: "Valgrind (memcheck)"
Expand Down Expand Up @@ -416,23 +334,9 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

sanitizers_debian:
name: "UBSan, ASan, LSan"
Expand Down Expand Up @@ -473,23 +377,9 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

msan_debian:
name: "MSan"
Expand Down Expand Up @@ -537,23 +427,10 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}


mingw_debian:
name: ${{ matrix.configuration.job_name }}
Expand Down Expand Up @@ -593,23 +470,9 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

x86_64-macos-native:
name: "x86_64: macOS Ventura, Valgrind"
Expand Down Expand Up @@ -652,23 +515,9 @@ jobs:
env: ${{ matrix.env_vars }}
run: ./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

arm64-macos-native:
name: "ARM64: macOS Sonoma"
Expand Down Expand Up @@ -708,23 +557,10 @@ jobs:
env: ${{ matrix.env_vars }}
run: ./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}


win64-native:
name: ${{ matrix.configuration.job_name }}
Expand Down Expand Up @@ -813,23 +649,9 @@ jobs:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image

- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
if: ${{ always() }}
- run: cat exhaustive_tests.log || true
if: ${{ always() }}
- run: cat ctime_tests.log || true
if: ${{ always() }}
- run: cat bench.log || true
if: ${{ always() }}
- run: cat config.log || true
if: ${{ always() }}
- run: cat test_env.log || true
if: ${{ always() }}
- name: CI env
run: env
if: ${{ always() }}
- name: Print logs
uses: ./.github/actions/print-logs
if: ${{ !cancelled() }}

cxx_headers_debian:
name: "C++ (public headers)"
Expand Down