From 13b4304237b27b78f025a5ba956d0b3207e441d0 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sat, 12 Oct 2024 20:44:15 +0200 Subject: [PATCH 1/2] README: Document the use of locked svd2rust Due to a regression caused by proc-macro2 [1], we have to use a locked version of svd2rust to successfully build the code in this crate. Document this in the installation instructions. [1]: https://github.com/rust-embedded/svd2rust/issues/863 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6322fcd..afac10e 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ The version on `crates.io` is pre-built. The following is only necessary when t You need to have [atdf2svd][] (= 0.4.0), [svd2rust][] (= 0.28), [form][] (>= 0.8), [rustfmt][](for the *nightly* toolchain) and [svdtools][] (>= 0.1.9) installed: ```bash -cargo install atdf2svd --version 0.4.0 -cargo install svd2rust --version 0.28.0 +cargo install atdf2svd --version 0.4.0 --locked +cargo install svd2rust --version 0.28.0 --locked cargo install form rustup component add --toolchain nightly rustfmt pip3 install --user svdtools From a74086d402f2c079c34eb352fc38ffe2a9cc61ef Mon Sep 17 00:00:00 2001 From: Rahix Date: Sat, 12 Oct 2024 20:53:39 +0200 Subject: [PATCH 2/2] ci: Stop using deprecated actions-rs/install Instead, directly call `cargo install` to install the rust tools. Additionally, in light of the recent proc-macro2 regression in svd2rust, pass the `--locked` flag, to ensure the correct and deterministic versions get built. --- .github/workflows/ci.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a589c1c..60ec366 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,25 +34,16 @@ jobs: id: cache-cargo with: path: ~/cargo-bin - key: rust-tools-005 + key: rust-tools-006 - name: Install svd2rust if: steps.cache-cargo.outputs.cache-hit != 'true' - uses: actions-rs/install@v0.1 - with: - crate: svd2rust - version: 0.28.0 + run: cargo install svd2rust --version 0.28.0 --locked - name: Install cargo-form if: steps.cache-cargo.outputs.cache-hit != 'true' - uses: actions-rs/install@v0.1 - with: - crate: form - version: 0.8.0 + run: cargo install form --version 0.8.0 --locked - name: Install atdf2svd if: steps.cache-cargo.outputs.cache-hit != 'true' - uses: actions-rs/install@v0.1 - with: - crate: atdf2svd - version: 0.4.0 + run: cargo install atdf2svd --version 0.4.0 --locked - name: Copy tools to cache directory if: steps.cache-cargo.outputs.cache-hit != 'true' run: |