Skip to content

Workflow file for this run

name: CI test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build cat-once
run: |
cargo build --release
sudo mv target/release/cat-once /usr/bin/cat-once
- name: Prepare test file
run: |
cat-once --file test.file --test-create-ascii-file-size=1000000000
sha1sum test.file > test-in.file.sha1
tar -cf - test.file | zstd -c > test.tar.zstd
- name: Mount tmpfs
run: |
mkdir tmp
sudo mount -t tmpfs -o size=1560M tmpfs tmp
cp test.tar.zstd tmp
cd tmp
cat-once --file test.tar.zstd > test2.tar.zstd
cat-once --file test2.tar.zstd | tar -I zstd -xf - -C .
sha1sum test.file > ../test-out.file.sha1
- name: Compare checksums
run: |
cat test-in.file.sha1
cat test-out.file.sha1
diff test-in.file.sha1 test-out.file.sha1