* Update and optimize dependencies These changes update the dependencies to their latest versions, fixing some known issues that prevented doing so in the first place. In addition, the direct dependency on byteorder was dropped in favor of stdlib functions that have been stabilized for some time in Rust, and the transitive dependency on chrono, pulled by stderrlog, was also dropped, which had been affected by security issues and improperly maintained in the past: - https://github.com/cardoe/stderrlog-rs/issues/31 - https://www.reddit.com/r/rust/comments/ts84n4/chrono_or_time_03/ * Run rustfmt * Bump MSRV to 1.56.1 Updating to this patch version should not be cumbersome for end-users, and it is required by a transitive dependency. * Bump MSRV to 1.57.0 os_str_bytes requires it.
92 lines
2.7 KiB
YAML
92 lines
2.7 KiB
YAML
name: oxipng
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
target:
|
|
- x86_64-unknown-linux-gnu
|
|
- x86_64-unknown-linux-musl
|
|
- x86_64-pc-windows-msvc
|
|
- x86_64-apple-darwin
|
|
toolchain:
|
|
# Minimum stable
|
|
- "1.57.0"
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
include:
|
|
- target: x86_64-unknown-linux-gnu
|
|
os: ubuntu-latest
|
|
- target: x86_64-unknown-linux-musl
|
|
os: ubuntu-latest
|
|
- target: x86_64-pc-windows-msvc
|
|
os: windows-latest
|
|
- target: x86_64-apple-darwin
|
|
os: macOS-latest
|
|
exclude:
|
|
- target: x86_64-pc-windows-msvc
|
|
toolchain: beta
|
|
- target: x86_64-pc-windows-msvc
|
|
toolchain: nightly
|
|
- target: x86_64-apple-darwin
|
|
toolchain: beta
|
|
- target: x86_64-apple-darwin
|
|
toolchain: nightly
|
|
- target: x86_64-unknown-linux-musl
|
|
toolchain: beta
|
|
- target: x86_64-unknown-linux-musl
|
|
toolchain: nightly
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install musl tools
|
|
run: sudo apt-get install musl-tools
|
|
if: "contains(matrix.target, 'musl')"
|
|
- name: Install ${{ matrix.toolchain }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.toolchain }}
|
|
override: true
|
|
components: clippy, rustfmt
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/registry/cache
|
|
key: ${{ matrix.target }}-${{ matrix.toolchain }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ matrix.target }}-${{ matrix.toolchain }}-cargo-registry-
|
|
- name: Run rustfmt
|
|
if: matrix.toolchain == 'stable'
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: -- --check
|
|
- name: Run clippy
|
|
if: matrix.toolchain == 'stable'
|
|
uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: -- -D warnings
|
|
- name: Run tests
|
|
run: cargo test
|
|
- name: Build benchmarks
|
|
if: matrix.toolchain == 'nightly'
|
|
run: cargo bench --no-run
|
|
- name: Build docs
|
|
run: cargo doc --no-deps
|
|
- name: Check no default features
|
|
if: matrix.toolchain == 'stable'
|
|
uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --no-default-features -- -D warnings
|