Skip to content
Open
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
22 changes: 21 additions & 1 deletion .github/workflows/GnuTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: GnuTests

# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
# spell-checker:ignore (jargon) submodules devel
# spell-checker:ignore (libs/utils) autopoint chksum getenforce gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
# spell-checker:ignore (libs/utils) autopoint chksum getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
Expand Down Expand Up @@ -74,6 +74,17 @@ jobs:
git config submodule.gnulib.url https://github.com/coreutils/gnulib.git
git submodule update --init --recursive --depth 1
working-directory: gnu
- name: Restore files for faster configure and skipping make
uses: actions/cache@v5
id: cache-config-gnu
with:
path: |
gnu/config.cache
gnu/src/getlimits
key: ${{ runner.os }}-gnu-config-${{ env.REPO_GNU_REF }}-${{ hashFiles('gnu/configure') }}
restore-keys: |
${{ runner.os }}-gnu-config-${{ env.REPO_GNU_REF }}-
${{ runner.os }}-gnu-config-

#### Build environment setup
- name: Install dependencies
Expand Down Expand Up @@ -115,6 +126,15 @@ jobs:
## Build binaries
cd 'uutils'
env PROFILE=release-small bash util/build-gnu.sh

- name: Save files for faster configure and skipping make
uses: actions/cache/save@v5
if: always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
with:
path: |
gnu/config.cache
gnu/src/getlimits
key: ${{ runner.os }}-gnu-config-${{ env.REPO_GNU_REF }}-${{ hashFiles('gnu/configure') }}

### Run tests as user
- name: Run GNU tests
Expand Down
10 changes: 5 additions & 5 deletions util/build-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,24 @@ done

if test -f gnu-built; then
echo "GNU build already found. Skip"
echo "'rm -f $(pwd)/gnu-built' to force the build"
echo "'rm -f $(pwd)/{gnu-built,src/getlimits}' to force the build"
echo "Note: the customization of the tests will still happen"
else
# Disable useless checks
"${SED}" -i 's|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
"${SED}" -i '/^wget.*/d' bootstrap.conf # wget is used to DL po. Remove the dep.
./bootstrap --skip-po
# Use CFLAGS for best build time since we discard GNU coreutils
CFLAGS="${CFLAGS} -pipe -O0 -s" ./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
CFLAGS="${CFLAGS} -pipe -O0 -s" ./configure -C --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
--enable-single-binary=symlinks \
"$([ "${SELINUX_ENABLED}" = 1 ] && echo --with-selinux || echo --without-selinux)"
#Add timeout to to protect against hangs
"${SED}" -i 's|^"\$@|'"${SYSTEM_TIMEOUT}"' 600 "\$@|' build-aux/test-driver
# Use a better diff
"${SED}" -i 's|diff -c|diff -u|g' tests/Coreutils.pm
"${MAKE}" -j "$("${NPROC}")"
# Skip make if possible
test -f src/getlimits || "${MAKE}" -j "$("${NPROC}")"
cp -f src/getlimits "${UU_BUILD_DIR}"

# Handle generated factor tests
t_first=00
Expand Down Expand Up @@ -223,8 +225,6 @@ sed -i -e "s|---dis ||g" tests/tail/overlay-headers.sh
# Do not FAIL, just do a regular ERROR
"${SED}" -i -e "s|framework_failure_ 'no inotify_add_watch';|fail=1;|" tests/tail/inotify-rotate-resources.sh

test -f "${UU_BUILD_DIR}/getlimits" || cp src/getlimits "${UU_BUILD_DIR}"

# pr produces very long log and this command isn't super interesting
# SKIP for now
"${SED}" -i -e "s|my \$prog = 'pr';$|my \$prog = 'pr';CuSkip::skip \"\$prog: SKIP for producing too long logs\";|" tests/pr/pr-tests.pl
Expand Down
Loading