jpeg-decoder 0.2.3

JPEG decoder
Documentation
name: Rust CI

on:
  push:
    branches: [master, github-actions]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        rust: ["1.48.0", stable, beta, nightly]
        features: ["", "rayon"]
        command: [test, benchmark]

    steps:
      - name: Installing Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          override: true
          toolchain: ${{ matrix.rust }}
      - uses: actions/checkout@v2
      - name: build
        run: >
          cargo build --verbose --no-default-features --features "$FEATURES"
      - name: test
        run: >
          cargo test --tests --benches --no-default-features --features "$FEATURES"
        if: ${{ matrix.command == 'test' && matrix.rust != '1.48.0' }}
        env:
          FEATURES: ${{ matrix.features }}
      - name: benchmark
        run: cargo bench --bench decoding_benchmark --no-default-features --features "$FEATURES" -- --warm-up-time 1 --measurement-time 1 --sample-size 25
        if: ${{ matrix.command == 'benchmark' && matrix.rust != '1.48.0' }}
        env:
          FEATURES: ${{ matrix.features }}

  cross_compile_aarch64:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        rust: [nightly-2022-03-24]
        features: ["", "rayon", "nightly_aarch64_neon"]

    steps:
      - name: Installing emulator and linker
        run: |
          sudo apt-get update
          sudo apt-get install qemu binfmt-support qemu-user-static gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu

      - name: Installing Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          override: true
          toolchain: ${{ matrix.rust }}
          target: aarch64-unknown-linux-musl
      - uses: actions/checkout@v2
      - name: build
        run: >
          cargo build --verbose --no-default-features --target aarch64-unknown-linux-musl --features "$FEATURES"
        env:
          CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc
      - name: test
        run: >
          cargo test --tests --benches --no-default-features --target aarch64-unknown-linux-musl --features "$FEATURES"
        env:
          FEATURES: ${{ matrix.features }}
          CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc