Integrate LZ4 library, compress the ramdisk
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m53s

This commit is contained in:
2026-03-07 02:54:26 +01:00
parent eaec32975a
commit b9e8a8bf1d
234 changed files with 52373 additions and 13 deletions

163
lz4/.github/workflows/core-tests.yml vendored Normal file
View File

@@ -0,0 +1,163 @@
# Core LZ4 functionality testing
name: Core Tests
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
benchmark:
name: Benchmark Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Basic compression test
run: make -j -C tests test-lz4c V=1
- name: Full benchmark test
run: make -j -C tests test-fullbench V=1
- name: 32-bit benchmark test
run: make -j -C tests test-fullbench32 V=1
fuzzer:
name: Fuzzer Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Setup memory mapping
run: sudo sysctl -w vm.mmap_min_addr=4096
- name: Fuzzer test (64-bit)
run: make -j -C tests test-fuzzer V=1
- name: Fuzzer test (32-bit)
run: make -C tests test-fuzzer32 V=1
versions:
name: Version Compatibility Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Version compatibility test
run: make -j -C tests versionsTest V=1
abi:
name: ABI Compatibility Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: ABI compatibility test
run: make -j -C tests abiTests V=1
frame:
name: LZ4 Frame Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Frame format test (64-bit)
run: make -j -C tests test-frametest V=1
- name: Frame format test (32-bit)
run: make -j -C tests test-frametest32 V=1
memory-usage:
name: Memory Usage Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Test different LZ4_MEMORY_USAGE values
run: make V=1 -C tests test-compile-with-lz4-memory-usage
custom-distance:
name: Custom Configuration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Custom LZ4_DISTANCE_MAX test
run: |
CPPFLAGS='-DLZ4_DISTANCE_MAX=8000' make V=1 check
make clean
- name: Dynamic library linking test
run: |
make -C programs lz4-wlib V=1
make clean
- name: User memory functions test
run: |
make -C tests fullbench-wmalloc V=1
make clean
CC="c++ -Wno-deprecated" make -C tests fullbench-wmalloc V=1
makefile-variables:
name: Makefile Standard Variables Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Test standard variable propagation
run: make test_stdvars V=1
block-device:
name: Block Device Compression Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Test block device compression
run: |
make lz4
dd if=/dev/zero of=full0.img bs=2M count=1
BLOCK_DEVICE=$(sudo losetup --show -fP full0.img)
sudo chmod 666 $BLOCK_DEVICE
./lz4 -v $BLOCK_DEVICE -c > /dev/null
sudo losetup -d $BLOCK_DEVICE
rm full0.img