Skip to content

Commit

Permalink
Update to Rust version 2021 and bumb MSRV to 1.63 (#52)
Browse files Browse the repository at this point in the history
* update rust version and MSRV

* update changelog

* Update and fix CI

* reduce MSRV to 1.63

* remove bors, update dev deps and ci versions

* Update CHANGELOG.md
  • Loading branch information
Boog900 authored Oct 3, 2023
1 parent 0dd0451 commit dc16245
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 59 deletions.
87 changes: 56 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,79 @@
name: CI

on:
pull_request: # Need to run on pull-requests, otherwise PRs from forks don't run
pull_request:
push:
branches:
- main

jobs:
static_analysis:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/[email protected]
- uses: dprint/[email protected]
- run: cargo clippy --workspace --all-targets -- -D warnings
- uses: actions/checkout@v4

msrv:
- uses: dtolnay/rust-toolchain@master
with:
components: clippy,rustfmt
toolchain: stable

- run: cargo fmt --all --check

- run: cargo clippy --workspace --all-targets --all-features -- -D warnings

mdtomlfmt:
name: Generic format (md,toml)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Run dprint
run: |
curl -fsSL https://dprint.dev/install.sh | sh
/home/runner/.dprint/bin/dprint check
build_msrv:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.63

- uses: Swatinem/[email protected]

- run: cargo build --workspace --all-features

build_features:
name: Build with varying features
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Install Rust
uses: actions-rs/[email protected]
with:
toolchain: 1.41 # MSRV
override: true
profile: minimal
- run: cargo install cargo-hack

- uses: Swatinem/rust-cache@v2.2.0
- uses: Swatinem/rust-cache@v2.7.0

- run: cargo build
- run: cargo hack build --workspace --each-feature

test:
strategy:
matrix:
rust: [
stable,
nightly
]
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Rust ${{ matrix.rust }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust }}
override: true
profile: minimal
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- uses: Swatinem/rust-cache@v2.2.0
- uses: Swatinem/rust-cache@v2.7.0

- run: cargo test
- run: cargo test --workspace --all-features
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Updated Rust version to 2021 and bumped MSRV to 1.63 ([#52](https://github.com/monero-rs/monero-epee-bin-serde/pull/37)).

### Fixed

- Deserialization of nested structs ([#37](https://github.com/monero-rs/monero-epee-bin-serde/pull/37)).
Expand Down
15 changes: 8 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "monero-epee-bin-serde"
version = "1.0.1"
authors = [ "CoBloX Team <[email protected]>" ]
authors = ["Monero Rust Contributors", "CoBloX Team <[email protected]>"]
documentation = "https://docs.rs/monero-epee-bin-serde"
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/comit-network/monero-epee-bin-serde"
repository = "https://github.com/monero-rs/monero-epee-bin-serde"
rust-version = "1.63.0"
description = "A serde format for the binary encoding defined within the epee helper library of Monero."

[dependencies]
Expand All @@ -14,7 +15,7 @@ serde = "1"

[dev-dependencies]
hex = "0.4"
hex-literal = "0.3"
monero = "0.18"
serde = { version = "1", features = [ "derive" ] }
serde_with = "1"
hex-literal = "0.4"
monero = "0.19"
serde = { version = "1", features = ["derive"] }
serde_with = "3"
6 changes: 0 additions & 6 deletions bors.toml

This file was deleted.

21 changes: 6 additions & 15 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
{
"$schema": "https://dprint.dev/schemas/v0.json",
"projectType": "openSource",
"incremental": true,
"json": {
},
"markdown": {
},
"rustfmt": {
"toml": {
},
"includes": ["**/*.{json,md,rs,toml}"],
"excludes": [
"**/*-lock.json",
"**/target"
],
"includes": ["**/*.{md,toml}"],
"excludes": ["target"],
"plugins": [
"https://plugins.dprint.dev/json-0.10.2.wasm",
"https://plugins.dprint.dev/markdown-0.7.1.wasm",
"https://plugins.dprint.dev/rustfmt-0.3.0.wasm",
"https://github.com/thomaseizinger/dprint-plugin-cargo-toml/releases/download/0.1.0/cargo-toml-0.1.0.wasm"
"https://plugins.dprint.dev/markdown-0.13.3.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm"
]
}
}

0 comments on commit dc16245

Please sign in to comment.