1name: CI 2on: [push, pull_request] 3 4jobs: 5 test: 6 name: Test 7 runs-on: ${{ matrix.os }} 8 strategy: 9 matrix: 10 # I don't really understand the build matrix here... 11 build: [stable, beta, nightly, macos, windows, mingw] 12 include: 13 - build: stable 14 os: ubuntu-latest 15 rust: stable 16 - build: beta 17 os: ubuntu-latest 18 rust: beta 19 - build: nightly 20 os: ubuntu-latest 21 rust: nightly 22 - build: macos 23 os: macos-latest 24 rust: stable 25 - build: windows 26 os: windows-2019 27 rust: stable 28 - build: mingw 29 os: windows-2019 30 rust: stable-x86_64-gnu 31 steps: 32 - uses: actions/checkout@master 33 - name: Install Rust (rustup) 34 run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} 35 shell: bash 36 - run: cargo build 37 - run: rustdoc --test README.md -L target/debug/deps --extern flate2=target/debug/libflate2.rlib --edition=2018 38 - run: cargo test 39 - run: cargo test --features zlib 40 - run: cargo test --features zlib --no-default-features 41 - run: cargo test --features zlib-ng-compat --no-default-features 42 if: matrix.build != 'mingw' 43 - run: cargo test --features zlib-ng --no-default-features 44 if: matrix.build != 'mingw' 45 - run: cargo test --features cloudflare_zlib --no-default-features 46 if: matrix.build != 'mingw' 47 48 rustfmt: 49 name: Rustfmt 50 runs-on: ubuntu-latest 51 steps: 52 - uses: actions/checkout@master 53 - name: Install Rust 54 run: rustup update stable && rustup default stable && rustup component add rustfmt 55 - run: cargo fmt -- --check 56 57 wasm: 58 name: WebAssembly 59 runs-on: ubuntu-latest 60 strategy: 61 matrix: 62 target: [wasm32-unknown-unknown, wasm32-wasi] 63 steps: 64 - uses: actions/checkout@master 65 - name: Install Rust 66 run: rustup update stable && rustup default stable && rustup target add ${{ matrix.target }} 67 - run: cargo build --target ${{ matrix.target }} 68