summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2024-01-18 22:08:39 +0100
committerDiego Barrios Romero <eldruin@gmail.com>2024-01-19 14:47:10 +0100
commit56f880ad96f6778eae7029d1f432b414caa39739 (patch)
treea674e0459687fbee61dae7cf5e772fb5c2dbb868
parent451f9fb372d4f7ff6f4f7196782ae18d0d7b3abd (diff)
downloadads1x1x-async-56f880ad96f6778eae7029d1f432b414caa39739.tar.gz
ads1x1x-async-56f880ad96f6778eae7029d1f432b414caa39739.tar.xz
ads1x1x-async-56f880ad96f6778eae7029d1f432b414caa39739.zip
Raise MSRV + update CI
-rw-r--r--.github/workflows/build.yml110
-rw-r--r--CHANGELOG.md3
-rw-r--r--README.md1
3 files changed, 45 insertions, 69 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2b8cf0e..0df9b82 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, 1.60.0]
+ rust: [stable, 1.62.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@v4
+ - 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@v4
with:
repository: 'eldruin/rust-driver-ci-scripts'
ref: 'master'
@@ -44,108 +39,87 @@ 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]
- TARGET:
- - x86_64-unknown-linux-gnu
steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
+ - uses: actions/checkout@v4
+ - 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
+<<<<<<< HEAD
strategy:
matrix:
rust: [1.60.0]
TARGET:
- x86_64-unknown-linux-gnu
+||||||| parent of 25424bf... Update CI
+ strategy:
+ matrix:
+ rust: [1.52.1]
+ TARGET:
+ - x86_64-unknown-linux-gnu
+=======
+>>>>>>> 25424bf... Update CI
steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@master
with:
- profile: minimal
- toolchain: ${{ matrix.rust }}
- target: ${{ matrix.TARGET }}
- override: true
+ toolchain: 1.73.0
+ targets: x86_64-unknown-linux-gnu
components: clippy
- - name: Clippy
- uses: actions-rs/clippy-check@v1
- with:
- 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@v4
+ - 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
+ 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@v4
+ - 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
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- path-to-lcov: './lcov.info'
+ path-to-lcov: './lcov.info' \ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1085703..9ab0670 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,8 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
-- MSRV increased to 1.60.
+### Changed
- Updated `embedded-hal` to version `1`, `read` in one-shot mode is therefore only an inherent method.
+- Raised MSRV to 1.62.0
## [0.2.2] - 2021-07-29
diff --git a/README.md b/README.md
index 024b8e9..070af22 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
[![crates.io](https://img.shields.io/crates/v/ads1x1x.svg)](https://crates.io/crates/ads1x1x)
[![Docs](https://docs.rs/ads1x1x/badge.svg)](https://docs.rs/ads1x1x)
+![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.62+-blue.svg)
[![Build Status](https://github.com/eldruin/ads1x1x-rs/workflows/Build/badge.svg)](https://github.com/eldruin/ads1x1x-rs/actions?query=workflow%3ABuild)
[![Coverage Status](https://coveralls.io/repos/github/eldruin/ads1x1x-rs/badge.svg?branch=master)](https://coveralls.io/github/eldruin/ads1x1x-rs?branch=master)