From 520a71eb22138f741f07a6610a4c43daec2f1862 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 18 Apr 2024 00:15:54 -0400 Subject: [PATCH] ci.yml: upgrade to upload-artifact@v4 and upload test failures Signed-off-by: Theodore Ts'o --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da44fd078..4a1aef402 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,11 @@ jobs: - run: make -j8 check V=1 CFLAGS_WARN="-Werror" - run: make -j8 install V=1 DESTDIR=$PWD/installdir - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir + - uses: actions/upload-artifact@v4 + with: + name: gcc-test-fail-logs + path: tests/*.failed + if-no-files-found: ignore clang-build-and-test: name: Build and test with clang @@ -27,10 +32,15 @@ jobs: - run: make -j8 check V=1 CFLAGS_WARN="-Werror" - run: make -j8 install V=1 DESTDIR=$PWD/installdir - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ubuntu-config.h path: lib/config.h + - uses: actions/upload-artifact@v4 + with: + name: clang-test-fail-logs + path: tests/*.failed + if-no-files-found: ignore i386-build-and-test: name: Build and test with gcc -m32 @@ -45,6 +55,11 @@ jobs: - run: make -j8 check V=1 CFLAGS_WARN="-Werror" - run: make -j8 install V=1 DESTDIR=$PWD/installdir - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir + - uses: actions/upload-artifact@v4 + with: + name: i386-test-fail-logs + path: tests/*.failed + if-no-files-found: ignore asan-build-and-test: name: Build and test with ASAN enabled @@ -58,6 +73,11 @@ jobs: - run: echo "ASAN_CFLAGS=$DEF_CFLAGS -fsanitize=address -fno-sanitize-recover=address" >> $GITHUB_ENV - run: ./configure CC=clang CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS" - run: make -j8 check V=1 CFLAGS_WARN="-Werror" + - uses: actions/upload-artifact@v4 + with: + name: asan-test-fail-logs + path: tests/*.failed + if-no-files-found: ignore ubsan-build-and-test: name: Build and test with UBSAN enabled @@ -71,6 +91,11 @@ jobs: - run: echo "UBSAN_CFLAGS=$DEF_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" >> $GITHUB_ENV - run: ./configure CC=clang CFLAGS="$UBSAN_CFLAGS" LDFLAGS="$UBSAN_CFLAGS" - run: make -j8 check V=1 CFLAGS_WARN="-Werror" + - if: failure() + uses: actions/upload-artifact@v4 + with: + name: ubsan-test-fail-logs + path: tests/*.failed macos-build-and-test: name: Build and test on macOS @@ -81,9 +106,14 @@ jobs: # -Wno-error=deprecated-declarations is needed to suppress known warnings # due to e2fsprogs' use of sbrk(0) and daemon(). - run: make -j8 check V=1 CFLAGS_WARN="-Werror -Wno-error=deprecated-declarations" + - uses: actions/upload-artifact@v4 + with: + name: macos-test-fail-logs + path: tests/*.failed + if-no-files-found: ignore - run: make -j8 install DESTDIR=$PWD/installdir - run: make -j8 uninstall DESTDIR=$PWD/installdir - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: macOS-config.h path: lib/config.h @@ -121,7 +151,7 @@ jobs: - run: make -j8 -C lib/e2p/ all V=1 CFLAGS_WARN="-Werror" - run: make -j8 -C misc/ mke2fs V=1 CFLAGS_WARN="-Werror" - run: misc/mke2fs.exe -T ext4 image.ext4 128M - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: windows-${{matrix.env}}-config.h path: lib/config.h @@ -154,7 +184,7 @@ jobs: export STRIP=$TOOLCHAIN/bin/llvm-strip ./configure --host=${{matrix.target}} CFLAGS="$DEF_CFLAGS" - run: make -j8 V=1 CFLAGS_WARN="-Werror" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: android-${{matrix.arch}}-config.h path: lib/config.h