diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de3e868..4385c96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,5 @@ -on: - push: - pull_request: - name: Build +on: [push, pull_request] env: RUSTFLAGS: '--deny warnings' @@ -13,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: [stable, beta, 1.35.0] + rust: [stable, 1.60.0] TARGET: - x86_64-unknown-linux-gnu - x86_64-unknown-linux-musl @@ -26,16 +23,14 @@ jobs: - thumbv7m-none-eabi steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - target: ${{ matrix.TARGET }} - override: true + targets: ${{ matrix.TARGET }} - name: Checkout CI scripts - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: 'eldruin/rust-driver-ci-scripts' ref: 'master' @@ -44,114 +39,70 @@ jobs: - run: ./ci/patch-no-std.sh if: ${{ ! contains(matrix.TARGET, 'x86_64') }} - - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --target=${{ matrix.TARGET }} + - run: cargo build --target=${{ matrix.TARGET }} checks: name: Checks runs-on: ubuntu-latest - strategy: - matrix: - rust: [stable, beta] - TARGET: - - x86_64-unknown-linux-gnu steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: ${{ matrix.rust }} - target: ${{ matrix.TARGET }} - override: true + targets: x86_64-unknown-linux-gnu components: rustfmt - - name: Doc - uses: actions-rs/cargo@v1 - with: - command: doc - - - name: Formatting - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo doc + - run: cargo fmt --all -- --check clippy: name: Clippy runs-on: ubuntu-latest - strategy: - matrix: - rust: [1.58.1] - TARGET: - - x86_64-unknown-linux-gnu steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal - toolchain: ${{ matrix.rust }} - target: ${{ matrix.TARGET }} - override: true + toolchain: 1.70.0 + targets: x86_64-unknown-linux-gnu components: clippy - - name: Clippy - uses: actions-rs/clippy-check@v1 - with: - args: --all-targets -- --allow clippy::bool_assert_comparison - token: ${{ secrets.GITHUB_TOKEN }} + - run: cargo clippy --all-targets test: name: Tests runs-on: ubuntu-latest strategy: matrix: - rust: [stable, beta] + rust: [stable] TARGET: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl] steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - target: ${{ matrix.TARGET }} - override: true + targets: ${{ matrix.TARGET }} - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - args: --target=${{ matrix.TARGET }} + run: cargo test --target=${{ matrix.TARGET }} - name: Build examples - uses: actions-rs/cargo@v1 - if: contains(matrix.TARGET, 'x86_64') - with: - command: build - args: --target=${{ matrix.TARGET }} --examples + run: cargo build --target=${{ matrix.TARGET }} --examples coverage: name: Coverage runs-on: ubuntu-latest + container: + image: xd009642/tarpaulin:latest + options: --security-opt seccomp=unconfined steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable - name: Run cargo-tarpaulin - uses: actions-rs/tarpaulin@v0.1 - with: - args: '--out Lcov -- --test-threads 1' + run: cargo tarpaulin --out Lcov -- --test-threads 1 - name: upload to Coveralls uses: coverallsapp/github-action@master diff --git a/CHANGELOG.md b/CHANGELOG.md index 56599d4..11f8712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -... +### Changed +- Raised MSRV to version 1.60.0 ## [0.5.0] - 2022-02-21 diff --git a/README.md b/README.md index 8ed15bf..054df82 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![crates.io](https://img.shields.io/crates/v/ds323x.svg)](https://crates.io/crates/ds323x) [![Docs](https://docs.rs/ds323x/badge.svg)](https://docs.rs/ds323x) -![MSRV](https://img.shields.io/badge/rustc-1.35+-blue.svg) +![MSRV](https://img.shields.io/badge/rustc-1.60+-blue.svg) [![Build Status](https://github.com/eldruin/ds323x-rs/workflows/Build/badge.svg)](https://github.com/eldruin/ds323x-rs/actions?query=workflow%3ABuild) [![Coverage Status](https://coveralls.io/repos/eldruin/ds323x-rs/badge.svg?branch=master)](https://coveralls.io/r/eldruin/ds323x-rs?branch=master)