Skip to content

Commit

Permalink
Raise MSRV + update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
eldruin committed Feb 7, 2024
1 parent d20e675 commit 7e52fb1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 76 deletions.
106 changes: 33 additions & 73 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
on:
push:
pull_request:

name: Build
on: [push, pull_request]

env:
RUSTFLAGS: '--deny warnings'
Expand All @@ -13,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, 1.31.0]
rust: [stable, 1.62.0]
TARGET:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
Expand All @@ -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'
Expand All @@ -44,108 +39,73 @@ 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
strategy:
matrix:
rust: [1.55.0]
TARGET:
- x86_64-unknown-linux-gnu

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.75.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'
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

...
### Changed
- Raised MSRV to 1.62.0

## [0.2.1] - 2021-01-25

Expand Down
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2018-2021 Diego Barrios Romero
Copyright (C) 2018-2024 Diego Barrios Romero

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![crates.io](https://img.shields.io/crates/v/tmp1x2.svg)](https://crates.io/crates/tmp1x2)
[![Docs](https://docs.rs/tmp1x2/badge.svg)](https://docs.rs/tmp1x2)
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.75+-blue.svg)
[![Build Status](https://github.com/eldruin/tmp1x2-rs/workflows/Build/badge.svg)](https://github.com/eldruin/tmp1x2-rs/actions?query=workflow%3ABuild)
[![Coverage Status](https://coveralls.io/repos/github/eldruin/tmp1x2-rs/badge.svg?branch=master)](https://coveralls.io/github/eldruin/tmp1x2-rs?branch=master)

Expand Down Expand Up @@ -81,7 +82,7 @@ Licensed under either of
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT)

at your option.

### Contributing
Expand Down

0 comments on commit 7e52fb1

Please sign in to comment.