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
19 changes: 1 addition & 18 deletions .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) chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
# spell-checker:ignore (libs/utils) chksum dpkg getenforce gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
# 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 @@ -52,14 +52,6 @@ jobs:
workspaces: "./uutils -> target"
- name: Checkout code (GNU coreutils)
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
- 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-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }} # use build-gnu.sh for extremely safe caching

#### Build environment setup
- name: Install dependencies
Expand Down Expand Up @@ -105,15 +97,6 @@ jobs:
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-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }}

### Run tests as user
- name: Run GNU tests
shell: bash
Expand Down
7 changes: 3 additions & 4 deletions util/build-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)

if test -f gnu-built; then
echo "GNU build already found. Skip"
echo "'rm -f $(pwd)/{gnu-built,src/getlimits}' to force the build"
echo "'rm -f $(pwd)/gnu-built' to force the build"
echo "Note: the customization of the tests will still happen"
else
# Disable useless checks
Expand All @@ -135,9 +135,8 @@ else
# Skip make if possible
# Use GNU nproc for *BSD and macOS
NPROC="$(command -v nproc||command -v gnproc)"
test "${SELINUX_ENABLED}" = 1 && touch src/getlimits # SELinux tests does not use it
test -f src/getlimits || make -j "$("${NPROC}")"
cp -f src/getlimits "${UU_BUILD_DIR}"
test "${SELINUX_ENABLED}" = 1 || make -j "$("${NPROC}")" # SELinux tests does not use it
test "${SELINUX_ENABLED}" = 1 || cp -f src/getlimits "${UU_BUILD_DIR}"

# Handle generated factor tests
t_first=00
Expand Down
Loading