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
24 changes: 5 additions & 19 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,8 @@ jobs:
fail-fast: false
matrix:
job:
# Linux: exercises both vendored (static) and OPENSSL_NO_VENDOR=1
# (dynamic against system libcrypto). ubuntu-latest ships libssl-dev.
# Linux: exercises OPENSSL_NO_VENDOR=1 (dynamic against system libcrypto). ubuntu-latest ships libssl-dev.
# static binaries are tested and published on make.yml
- { os: ubuntu-latest, features: feat_os_unix, dynamic: true }
# macOS: vendored only — system libcrypto needs OPENSSL_DIR
# pointing at Homebrew, which isn't worth wiring up for a smoke test.
Expand All @@ -848,7 +848,6 @@ jobs:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
Expand All @@ -864,31 +863,18 @@ jobs:
# from source and statically links it (mirrors how `expr` links
# oniguruma). Runs the md5sum/sha*sum/cksum integration tests end-to-end
# so we'd catch a wrong-digest regression, not just a type error.
- name: Test checksum utilities with OpenSSL (vendored / static)
- name: Test checksum utilities with OpenSSL (vendored)
if: matrix.job.os == 'macos-latest'
shell: bash
env:
RUST_BACKTRACE: "1"
run: |
cargo nextest run --hide-progress-bar --profile ci \
--features "${{ matrix.job.features }},openssl" \
-E 'test(/^test_(md5sum|sha1sum|sha224sum|sha256sum|sha384sum|sha512sum|cksum)::/)'
# Confirm the vendored build is actually statically linked. If this
# regresses, the `vendored` feature has stopped doing its job.
- name: Verify static linkage (vendored)
- name: Test checksum utilities with OpenSSL (dynamic)
if: matrix.job.os == 'ubuntu-latest'
shell: bash
run: |
cargo build --release --features "${{ matrix.job.features }},openssl" --bin coreutils
if ldd target/release/coreutils 2>&1 | grep -iE 'libssl|libcrypto'; then
echo "ERROR: coreutils dynamically links libssl/libcrypto despite vendored feature"
exit 1
fi
echo "OK: no dynamic libssl/libcrypto linkage"
# Second linking mode: OPENSSL_NO_VENDOR=1 links dynamically against
# the system libcrypto/libssl.
- name: Test checksum utilities with OpenSSL (system / dynamic)
if: matrix.job.dynamic
shell: bash
env:
OPENSSL_NO_VENDOR: "1"
RUST_BACKTRACE: "1"
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
mv -t target/ target.cache/release 2>/dev/null || true
- name: "`make nextest`"
shell: bash
run: make nextest PROFILE=ci CARGOFLAGS="--hide-progress-bar"
run: make nextest PROFILE=ci CARGOFLAGS="--hide-progress-bar --features openssl"
env:
RUST_BACKTRACE: "1"
- name: Upload test results to Codecov
Expand Down Expand Up @@ -124,15 +124,22 @@ jobs:
! test -f /tmp/usr/local/share/zsh/site-functions/_install
! test -f /tmp/usr/local/share/bash-completion/completions/head.bash
! test -f /tmp/usr/local/share/fish/vendor_completions.d/cat.fish
- name: "`make install MULTICALL=n`"
- name: make install MULTICALL=n CARGOFLAGS="--features openssl"
shell: bash
run: |
set -x
DESTDIR=/tmp/individual make PROFILE=release MULTICALL=n install
DESTDIR=/tmp/individual make PROFILE=release MULTICALL=n CARGOFLAGS="--features openssl" install
# Check that *sum are present
for s in {md5,b2,sha1,sha224,sha256,sha384,sha512}sum
do test -e /tmp/individual/usr/local/bin/${s}
done
- name: Verify static linkage (vendored)
shell: bash
run: |
if ldd target/release/cksum 2>&1 | grep -iE 'libssl|libcrypto'; then
echo "ERROR: cksum dynamically links libssl/libcrypto despite vendored feature"
exit 1
fi
- name: "`make install MULTICALL=y LN=ln -svf`"
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .vscode/cspell.dictionaries/workspace.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ wasm
wasip
statx
Statx
libcrypto

# * stty terminal flags
brkint
Expand Down
Loading