1111env :
1212 # * style job configuration
1313 STYLE_FAIL_ON_FAULT : true # # (bool) fail the build if a style job contains a fault (error or warning); may be overridden on a per-job basis
14-
14+ CARGO_INCREMENTAL : " 0"
15+ RUST_BACKTRACE : " 1"
1516permissions :
1617 contents : read # to fetch code (actions/checkout)
1718
2526 l10n_build_test :
2627 name : L10n/Build and Test
2728 runs-on : ${{ matrix.job.os }}
28- env :
29- CARGO_INCREMENTAL : 0
3029 strategy :
3130 fail-fast : false
3231 matrix :
3837 - uses : actions/checkout@v6
3938 with :
4039 persist-credentials : false
41- - uses : dtolnay/rust-toolchain@stable
4240 - uses : taiki-e/install-action@nextest
4341 - uses : Swatinem/rust-cache@v2
4442 - name : Run sccache-cache
7573 ## Test l10n functionality
7674 cargo test -p uucore locale
7775 cargo test
78- env :
79- RUST_BACKTRACE : " 1"
8076
8177 l10n_fluent_syntax :
8278 name : L10n/Fluent Syntax Check
9894 shell : bash
9995 run : |
10096
101- fluent_dirs=$(find . -name "*.ftl" -type f -exec dirname {} \; | sort | uniq 2>/dev/null || true )
97+ fluent_dirs=$(find . -name "*.ftl" -type f -exec dirname {} \; | sort | uniq 2>/dev/null || : )
10298
10399 if [ -n "$fluent_dirs" ]; then
104100 echo "Found Fluent directories:"
@@ -133,13 +129,10 @@ jobs:
133129 l10n_clap_error_localization :
134130 name : L10n/Clap Error Localization Test
135131 runs-on : ubuntu-latest
136- env :
137- CARGO_INCREMENTAL : 0
138132 steps :
139133 - uses : actions/checkout@v6
140134 with :
141135 persist-credentials : false
142- - uses : dtolnay/rust-toolchain@stable
143136 - uses : Swatinem/rust-cache@v2
144137 - name : Run sccache-cache
145138 id : sccache-setup
@@ -206,8 +199,6 @@ jobs:
206199 echo "✗ ERROR: English clap error localization not working properly"
207200 exit 1
208201 fi
209- env :
210- RUST_BACKTRACE : " 1"
211202
212203 - name : Test French clap error localization
213204 shell : bash
@@ -271,8 +262,6 @@ jobs:
271262 echo "✗ No ANSI color codes found - colors may not be working"
272263 echo "::warning::ANSI color codes not detected in clap error output"
273264 fi
274- env :
275- RUST_BACKTRACE : " 1"
276265
277266 - name : Test clap localization with multiple utilities
278267 shell : bash
@@ -303,19 +292,14 @@ jobs:
303292 echo "✗ ERROR: Clap localization not working for enough utilities"
304293 exit 1
305294 fi
306- env :
307- RUST_BACKTRACE : " 1"
308295
309296 l10n_french_integration :
310297 name : L10n/French Integration Test
311298 runs-on : ubuntu-latest
312- env :
313- CARGO_INCREMENTAL : 0
314299 steps :
315300 - uses : actions/checkout@v6
316301 with :
317302 persist-credentials : false
318- - uses : dtolnay/rust-toolchain@stable
319303 - uses : Swatinem/rust-cache@v2
320304 - name : Run sccache-cache
321305 id : sccache-setup
@@ -418,14 +402,10 @@ jobs:
418402 echo "✗ ERROR: No French strings were detected, but commands executed successfully"
419403 exit 1
420404 fi
421- env :
422- RUST_BACKTRACE : " 1"
423405
424406 l10n_multicall_binary_install :
425407 name : L10n/Multi-call Binary Install Test
426408 runs-on : ${{ matrix.job.os }}
427- env :
428- CARGO_INCREMENTAL : 0
429409 strategy :
430410 fail-fast : false
431411 matrix :
@@ -436,7 +416,6 @@ jobs:
436416 - uses : actions/checkout@v6
437417 with :
438418 persist-credentials : false
439- - uses : dtolnay/rust-toolchain@stable
440419 - uses : Swatinem/rust-cache@v2
441420 - name : Run sccache-cache
442421 id : sccache-setup
@@ -477,7 +456,7 @@ jobs:
477456
478457 # First check if binary exists after build
479458 echo "Checking if coreutils was built..."
480- ls -la target/release-small/coreutils || echo "No coreutils binary in target/release-small/"
459+ target/release-small/coreutils --version || echo "No coreutils binary in target/release-small/"
481460
482461 make FEATURES="${{ matrix.job.features }}" PROFILE=release-small MULTICALL=y
483462
@@ -486,7 +465,7 @@ jobs:
486465
487466 echo "Running make install..."
488467 echo "Before install - checking what we have:"
489- ls -la target/release-small/coreutils 2>/dev/null || echo "No coreutils in target/release-small"
468+ target/release-small/coreutils --version 2>/dev/null || echo "No coreutils in target/release-small"
490469
491470 # Run make install with verbose output to see what happens
492471 echo "About to run: make install DESTDIR=\"$INSTALL_DIR\" PREFIX=/usr PROFILE=release-small MULTICALL=y"
@@ -506,9 +485,8 @@ jobs:
506485 echo "Current directory: $(pwd)"
507486 echo "INSTALL_DIR: $INSTALL_DIR"
508487 echo "Checking if build succeeded..."
509- if [ -f " target/release-small/coreutils" ] ; then
488+ if target/release-small/coreutils --version ; then
510489 echo "✓ Build succeeded - coreutils binary exists in target/release-small/"
511- ls -la target/release-small/coreutils
512490 else
513491 echo "✗ Build failed - no coreutils binary in target/release-small/"
514492 echo "Contents of target/release-small/:"
@@ -542,7 +520,7 @@ jobs:
542520 find "$INSTALL_DIR" -type f 2>/dev/null | head -50
543521
544522 # As a last resort, check if it's in the build directory
545- if [ -f "target/release/coreutils" ] ; then
523+ if "target/release/coreutils" --version ; then
546524 echo "Using binary from build directory as fallback"
547525 COREUTILS_BIN="$(pwd)/target/release/coreutils"
548526 export COREUTILS_BIN
@@ -581,8 +559,6 @@ jobs:
581559 l10n_installation_test :
582560 name : L10n/Installation Test (Make & Cargo)
583561 runs-on : ${{ matrix.job.os }}
584- env :
585- CARGO_INCREMENTAL : 0
586562 strategy :
587563 fail-fast : false
588564 matrix :
@@ -593,7 +569,6 @@ jobs:
593569 - uses : actions/checkout@v6
594570 with :
595571 persist-credentials : false
596- - uses : dtolnay/rust-toolchain@stable
597572 - uses : Swatinem/rust-cache@v2
598573 - name : Run sccache-cache
599574 id : sccache-setup
@@ -635,9 +610,8 @@ jobs:
635610
636611 # Verify installation
637612 echo "Testing make-installed binaries..."
638- if [ -f "$MAKE_INSTALL_DIR/usr/bin/coreutils" ] ; then
613+ if "$MAKE_INSTALL_DIR/usr/bin/coreutils" --version ; then
639614 echo "✓ coreutils binary installed via make successfully"
640- "$MAKE_INSTALL_DIR/usr/bin/coreutils" --version
641615 else
642616 echo "✗ coreutils binary not found after make install"
643617 exit 1
@@ -736,9 +710,8 @@ jobs:
736710
737711 # Verify installation
738712 echo "Testing cargo-installed binaries..."
739- if [ -f "$CARGO_INSTALL_DIR/bin/coreutils" ] ; then
713+ if "$CARGO_INSTALL_DIR/bin/coreutils" --version ; then
740714 echo "✓ coreutils binary installed successfully"
741- "$CARGO_INSTALL_DIR/bin/coreutils" --version
742715 else
743716 echo "✗ coreutils binary not found after cargo install"
744717 exit 1
@@ -778,7 +751,7 @@ jobs:
778751 echo "Checking structure of coreutils-l10n-repo:"
779752 ls -la coreutils-l10n-repo/ | head -10
780753 echo "Looking for locales directory:"
781- find coreutils-l10n-repo -name "*.ftl" -type f 2>/dev/null | head -10 || true
754+ find coreutils-l10n-repo -name "*.ftl" -type f 2>/dev/null | head -10 || :
782755 echo "Checking specific utilities:"
783756 ls -la coreutils-l10n-repo/src/uu/ls/locales/ 2>/dev/null || echo "No ls directory in correct location"
784757 find coreutils-l10n-repo -path "*/ls/*.ftl" 2>/dev/null | head -5 || echo "No ls ftl files found"
@@ -812,7 +785,7 @@ jobs:
812785
813786 # Debug: Show what was actually installed
814787 echo "Files installed in locale directory:"
815- find "$LOCALE_DIR" -name "*.ftl" 2>/dev/null | head -10 || true
788+ find "$LOCALE_DIR" -name "*.ftl" 2>/dev/null | head -10 || :
816789
817790 # Fallback: If no files were installed from l10n repo, try copying from main repo
818791 if [ -z "$(find "$LOCALE_DIR" -name "*.ftl" 2>/dev/null)" ]; then
@@ -822,11 +795,11 @@ jobs:
822795 if [ -d "$util_dir/locales" ]; then
823796 echo "Copying locales for $util_name from main repo..."
824797 mkdir -p "$LOCALE_DIR/$util_name"
825- cp "$util_dir/locales"/*.ftl "$LOCALE_DIR/$util_name/" 2>/dev/null || true
798+ cp "$util_dir/locales"/*.ftl "$LOCALE_DIR/$util_name/" 2>/dev/null || :
826799 fi
827800 done
828801 echo "Files after fallback:"
829- find "$LOCALE_DIR" -name "*.ftl" 2>/dev/null | head -10 || true
802+ find "$LOCALE_DIR" -name "*.ftl" 2>/dev/null | head -10 || :
830803 fi
831804
832805 echo "✓ Additional locale files installed"
@@ -841,7 +814,7 @@ jobs:
841814 LOCALE_DIR="$CARGO_INSTALL_DIR/share/locales"
842815
843816 echo "Checking installed binary..."
844- if [ ! -f "$CARGO_INSTALL_DIR/bin/coreutils" ] ; then
817+ if ! "$CARGO_INSTALL_DIR/bin/coreutils" --version ; then
845818 echo "✗ coreutils binary not found"
846819 exit 1
847820 fi
@@ -926,13 +899,10 @@ jobs:
926899 l10n_locale_support_verification :
927900 name : L10n/Locale Support Verification
928901 runs-on : ubuntu-latest
929- env :
930- CARGO_INCREMENTAL : 0
931902 steps :
932903 - uses : actions/checkout@v6
933904 with :
934905 persist-credentials : false
935- - uses : dtolnay/rust-toolchain@stable
936906 - uses : Swatinem/rust-cache@v2
937907 - name : Run sccache-cache
938908 id : sccache-setup
@@ -969,7 +939,7 @@ jobs:
969939
970940 # Debug: Show what was installed
971941 echo "Contents of installation directory:"
972- find "$INSTALL_DIR" -type f -name "coreutils" -o -name "ls" 2>/dev/null | head -20 || true
942+ find "$INSTALL_DIR" -type f -name "coreutils" -o -name "ls" 2>/dev/null | head -20 || :
973943 echo "Looking for binaries in: $INSTALL_DIR/usr/bin/"
974944 ls -la "$INSTALL_DIR/usr/bin/" || echo "Directory not found"
975945
@@ -1157,19 +1127,14 @@ jobs:
11571127 fi
11581128
11591129 echo "✓ All locale-specific functionality tests passed"
1160- env :
1161- RUST_BACKTRACE : " 1"
11621130
11631131 l10n_embedded_locale_regression_test :
11641132 name : L10n/Embedded Locale Regression Test
11651133 runs-on : ubuntu-latest
1166- env :
1167- CARGO_INCREMENTAL : 0
11681134 steps :
11691135 - uses : actions/checkout@v6
11701136 with :
11711137 persist-credentials : false
1172- - uses : dtolnay/rust-toolchain@stable
11731138 - uses : Swatinem/rust-cache@v2
11741139 - name : Run sccache-cache
11751140 id : sccache-setup
@@ -1196,7 +1161,6 @@ jobs:
11961161 - uses : actions/checkout@v6
11971162 with :
11981163 persist-credentials : false
1199- - uses : dtolnay/rust-toolchain@stable
12001164 - uses : Swatinem/rust-cache@v2
12011165 with :
12021166 # Use different cache key for each build to avoid conflicts
@@ -1228,7 +1192,6 @@ jobs:
12281192 - uses : actions/checkout@v6
12291193 with :
12301194 persist-credentials : false
1231- - uses : dtolnay/rust-toolchain@stable
12321195 - uses : Swatinem/rust-cache@v2
12331196 with :
12341197 # Use different cache key for each build to avoid conflicts
@@ -1260,7 +1223,6 @@ jobs:
12601223 - uses : actions/checkout@v6
12611224 with :
12621225 persist-credentials : false
1263- - uses : dtolnay/rust-toolchain@stable
12641226 - uses : Swatinem/rust-cache@v2
12651227 with :
12661228 # Use different cache key for each build to avoid conflicts
@@ -1290,13 +1252,10 @@ jobs:
12901252 l10n_locale_embedding_cargo_install :
12911253 name : L10n/Locale Embedding - Cargo Install
12921254 runs-on : ubuntu-latest
1293- env :
1294- CARGO_INCREMENTAL : 0
12951255 steps :
12961256 - uses : actions/checkout@v6
12971257 with :
12981258 persist-credentials : false
1299- - uses : dtolnay/rust-toolchain@stable
13001259 - uses : Swatinem/rust-cache@v2
13011260 with :
13021261 key : cargo-install-locale-embedding
0 commit comments