From 1522bc10988b0a1d698c2dfe3c53d5ff620c7a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Sun, 4 Jun 2023 17:55:21 +0200 Subject: [PATCH 1/5] update ci removes clippy_check in favour of running clippy directly --- .github/bors.toml | 1 - .github/workflows/ci.yml | 26 +++++++------------------- .github/workflows/clippy.yml | 21 --------------------- .github/workflows/rustfmt.yml | 9 ++------- cmsis-svd | 2 +- 5 files changed, 10 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/clippy.yml diff --git a/.github/bors.toml b/.github/bors.toml index 8ac1e7b7..eae7dc5c 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -7,5 +7,4 @@ status = [ "build (stable)", "test", "test-strict", - "clippy_check", ] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77397100..297cb53d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,14 +21,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - profile: minimal - override: true - - uses: actions-rs/cargo@v1 - with: - command: check + components: clippy + - run: cargo clippy test: runs-on: ubuntu-latest @@ -36,14 +33,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: stable - profile: minimal - override: true - - uses: actions-rs/cargo@v1 - with: - command: test + - run: cargo test test-strict: runs-on: ubuntu-latest @@ -51,12 +44,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: stable - profile: minimal - override: true - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features + - run: cargo test --all-features diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml deleted file mode 100644 index f47507a6..00000000 --- a/.github/workflows/clippy.yml +++ /dev/null @@ -1,21 +0,0 @@ -on: - push: - branches: [ staging, trying, master ] - pull_request: - -name: Clippy check -jobs: - clippy_check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: clippy - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 5e5fd482..23673aad 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -11,13 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all -- --check diff --git a/cmsis-svd b/cmsis-svd index e5db2387..9c416c5f 160000 --- a/cmsis-svd +++ b/cmsis-svd @@ -1 +1 @@ -Subproject commit e5db2387d9c48359c9c5229a5bb436cf2ed5381f +Subproject commit 9c416c5ff18e7d272a792c13bd235ebe30eef816 From 1e3064d4cde26d128aa464c4d1c87c95ed8a3b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Sun, 4 Jun 2023 18:45:31 +0200 Subject: [PATCH 2/5] bump msrv --- .github/bors.toml | 2 +- .github/workflows/ci.yml | 2 +- README.md | 2 +- svd-encoder/Cargo.toml | 2 +- svd-encoder/README.md | 2 +- svd-parser/CHANGELOG.md | 2 ++ svd-parser/Cargo.toml | 2 +- svd-parser/README.md | 2 +- svd-rs/CHANGELOG.md | 6 ++++-- svd-rs/Cargo.toml | 2 +- svd-rs/README.md | 2 +- 11 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/bors.toml b/.github/bors.toml index eae7dc5c..e113d2f0 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -3,7 +3,7 @@ delete_merged_branches = true required_approvals = 1 timeout_sec = 14400 status = [ - "build (1.56.0)", + "build (1.58.0)", "build (stable)", "test", "test-strict", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 297cb53d..9ae83fd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: continue-on-error: ${{ matrix.experimental || false }} strategy: matrix: - rust: [ 1.56.0, stable ] + rust: [ 1.58.0, stable ] include: # Test nightly but don't fail the build. - rust: nightly diff --git a/README.md b/README.md index 1e2d84e8..3b512463 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It consists of: ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.56.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.58.0 and up. It *might* compile with older versions but that may change in any new patch release. ## License diff --git a/svd-encoder/Cargo.toml b/svd-encoder/Cargo.toml index 4f04cf5e..6c59e244 100644 --- a/svd-encoder/Cargo.toml +++ b/svd-encoder/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0" name = "svd-encoder" repository = "https://github.com/rust-embedded/svd" edition = "2021" -rust-version = "1.56.0" +rust-version = "1.58.0" version = "0.14.3" readme = "README.md" diff --git a/svd-encoder/README.md b/svd-encoder/README.md index dad33aff..88c100f5 100644 --- a/svd-encoder/README.md +++ b/svd-encoder/README.md @@ -13,7 +13,7 @@ This project is developed and maintained by the [Tools team][team]. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.56.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.58.0 and up. It *might* compile with older versions but that may change in any new patch release. ## License diff --git a/svd-parser/CHANGELOG.md b/svd-parser/CHANGELOG.md index b48d8b82..c52d87b7 100644 --- a/svd-parser/CHANGELOG.md +++ b/svd-parser/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +- Bump MSRV to 1.58.0 + ## [v0.14.1] - 2022-10-23 - Update to `svd-rs` 0.14.1 diff --git a/svd-parser/Cargo.toml b/svd-parser/Cargo.toml index 43c66c57..4b8548ed 100644 --- a/svd-parser/Cargo.toml +++ b/svd-parser/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" name = "svd-parser" repository = "https://github.com/rust-embedded/svd" edition = "2021" -rust-version = "1.56.0" +rust-version = "1.58.0" version = "0.14.1" readme = "README.md" diff --git a/svd-parser/README.md b/svd-parser/README.md index 5f67b085..169a1ab1 100644 --- a/svd-parser/README.md +++ b/svd-parser/README.md @@ -13,7 +13,7 @@ This project is developed and maintained by the [Tools team][team]. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.56.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.58.0 and up. It *might* compile with older versions but that may change in any new patch release. ## License diff --git a/svd-rs/CHANGELOG.md b/svd-rs/CHANGELOG.md index 67d7f92e..8d9f5977 100644 --- a/svd-rs/CHANGELOG.md +++ b/svd-rs/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +- Bump MSRV to 1.58.0 + ## [v0.14.2] - 2023-04-04 - Add support of `a-Z` for `dimIndex` @@ -14,7 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [v0.14.1] - 2022-10-23 -- (De)serialize `dimIndex` (from)to string +- (De)serialize `dimIndex` (from)to string ## [v0.14.0] - 2022-07-19 @@ -63,7 +65,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). `header_struct_name` to `PeripheralInfo`, `alternate_cluster` to `ClusterInfo` - Add `protection` to `RegisterProperties` and `AddressBlock` - Add `readAction` to `RegisterInfo` and `FieldInfo` -- Add `single` and `array` for `Info` types, +- Add `single` and `array` for `Info` types, `is_single` and `is_array` for `Peripheral`, `Cluster`, `Register` and `Field` - Add array support for peripherals diff --git a/svd-rs/Cargo.toml b/svd-rs/Cargo.toml index c2805679..5435301d 100644 --- a/svd-rs/Cargo.toml +++ b/svd-rs/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" name = "svd-rs" repository = "https://github.com/rust-embedded/svd" edition = "2021" -rust-version = "1.56.0" +rust-version = "1.58.0" version = "0.14.2" readme = "README.md" diff --git a/svd-rs/README.md b/svd-rs/README.md index 44637ee0..23d25d6f 100644 --- a/svd-rs/README.md +++ b/svd-rs/README.md @@ -13,7 +13,7 @@ This project is developed and maintained by the [Tools team][team]. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.56.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.58.0 and up. It *might* compile with older versions but that may change in any new patch release. ## License From 14cae8baea47e52f03eb3d67cf55aca0f42c591d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Sun, 4 Jun 2023 19:49:13 +0200 Subject: [PATCH 3/5] remove bors and use merge_group --- .github/bors.toml | 10 ---------- .github/workflows/ci.yml | 3 ++- .github/workflows/rustfmt.yml | 3 ++- 3 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 .github/bors.toml diff --git a/.github/bors.toml b/.github/bors.toml deleted file mode 100644 index e113d2f0..00000000 --- a/.github/bors.toml +++ /dev/null @@ -1,10 +0,0 @@ -block_labels = ["needs-decision", "S-waiting-on-team"] -delete_merged_branches = true -required_approvals = 1 -timeout_sec = 14400 -status = [ - "build (1.58.0)", - "build (stable)", - "test", - "test-strict", -] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ae83fd3..0096a5d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,8 @@ on: push: - branches: [ staging, trying, master ] + branches: master pull_request: + merge_group: name: Continuous Integration diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 23673aad..4d678a63 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -1,7 +1,8 @@ on: push: - branches: [ staging, trying, master ] + branches: master pull_request: + merge_group: name: Code formatting check From 58ab077633cb2e7c34602780305addd45e03b6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Sun, 4 Jun 2023 19:56:02 +0200 Subject: [PATCH 4/5] name msrv check --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0096a5d1..3f74720c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,15 +9,19 @@ name: Continuous Integration jobs: # check if the project builds with MSRV, stable and nighly build: + name: "Build (${{ matrix.name || matrix.rust }})" runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental || false }} strategy: matrix: - rust: [ 1.58.0, stable ] + rust: [ stable ] include: # Test nightly but don't fail the build. - rust: nightly experimental: true + # MSRV + - rust: 1.58.0 + name: "MSRV" steps: - name: Checkout repository uses: actions/checkout@v3 From 4a5e13c79ae91ebd585bd75a681055c483131570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Sun, 4 Jun 2023 20:11:09 +0200 Subject: [PATCH 5/5] deny warnings on check and run clippy afterwards --- .github/workflows/ci.yml | 12 ++++++++++++ svd-parser/src/lib.rs | 4 +--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f74720c..ead26011 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,15 @@ on: name: Continuous Integration jobs: + ci: + name: CI + runs-on: ubuntu-latest + needs: [build, test, test-strict] + if: always() + steps: + - name: Done + run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' + # check if the project builds with MSRV, stable and nighly build: name: "Build (${{ matrix.name || matrix.rust }})" @@ -30,6 +39,9 @@ jobs: with: toolchain: ${{ matrix.rust }} components: clippy + - run: cargo check + env: + RUSTFLAGS: -D warnings - run: cargo clippy test: diff --git a/svd-parser/src/lib.rs b/svd-parser/src/lib.rs index 510294b7..a03d2559 100644 --- a/svd-parser/src/lib.rs +++ b/svd-parser/src/lib.rs @@ -19,9 +19,7 @@ //! - [SVD Schema file](https://www.keil.com/pack/doc/CMSIS/SVD/html/schema_1_2_gr.html) //! - [SVD file database](https://github.com/posborne/cmsis-svd/tree/master/data) //! - [Sample SVD file](https://www.keil.com/pack/doc/CMSIS/SVD/html/svd_Example_pg.html) - -#![deny(warnings)] - +//! //! Parse traits. //! These support parsing of SVD types from XML