feat: add GzipEncoder
and ZlibEncoder
, make compress
use encoders
#132
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
conf: | |
- stable | |
- msrv | |
include: | |
- conf: stable | |
toolchain: stable | |
- conf: nightly | |
toolchain: nightly | |
- conf: msrv | |
toolchain: '1.66' | |
env: | |
RUST_BACKTRACE: 1 | |
# For other ways of skipping CI runs, see: https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs | |
if: >- | |
(github.event_name == 'push' && !endsWith(github.event.head_commit.message, 'CI: skip')) || | |
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.names, 'skip-ci')) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Install ${{ matrix.toolchain }} | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: rustfmt, clippy | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run rustfmt | |
if: matrix.conf == 'nightly' | |
run: cargo fmt --check --verbose -- --color=always | |
- name: Run linter | |
if: matrix.conf == 'nightly' | |
run: cargo clippy | |
- name: Run tests | |
run: make zopfli && make test | |
- name: Run tests (no-std) | |
if: matrix.conf == 'nightly' | |
run: cargo test --release --no-default-features --features nightly | |
- name: Generate documentation | |
if: matrix.conf == 'nightly' | |
run: cargo doc --no-deps |