Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSRV checks to the CI workflow and bump MSRV #38

Merged
merged 1 commit into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,46 @@ jobs:
with:
command: run
args: --manifest-path=xtask/Cargo.toml -- ${{ matrix.chip }}

msrv-riscv:
name: Check MSRV for RISC-V
runs-on: ubuntu-latest
strategy:
matrix:
chip: [esp32c2, esp32c3]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
target: riscv32imc-unknown-none-elf
toolchain: "1.60.0"
default: true
components: rust-src
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: run
args: --manifest-path=xtask/Cargo.toml -- --generate-only ${{ matrix.chip }}
- run: |
cd ${{ matrix.chip }} && cargo +1.60.0 check

msrv-xtensa:
name: Check MSRV for Xtensa
runs-on: ubuntu-latest
strategy:
matrix:
chip: [esp32, esp32s2, esp32s3, esp8266]
steps:
- uses: actions/checkout@v2
- uses: esp-rs/xtensa-toolchain@v1.2
with:
default: true
ldproxy: false
buildtargets: ${{ matrix.chip }}
version: "1.60.0"
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: run
args: --manifest-path=xtask/Cargo.toml -- ${{ matrix.chip }}
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,26 @@ Peripheral Access Crates for Espressif SoCs and modules. For information on how

If you discover any errors in an SVD file, please report the issue(s) upstream in the [espressif/svd] repository.

Please note that in order to build the PACs for Xtensa devices (**ESP32**, **ESP32-S2**, **ESP32-S3**, **ESP8266**) you will need to first install the [Rust compiler fork] with Xtensa support. The minimum supported Rust version (MSRV) for these devices is `1.58.0`.
Please note that in order to build the PACs for Xtensa devices (**ESP32**, **ESP32-S2**, **ESP32-S3**, **ESP8266**) you will need to first install the [Rust compiler fork] with Xtensa support.

[svd2rust documentation]: https://docs.rs/svd2rust/latest/svd2rust/
[espressif/svd]: https://github.com/espressif/svd/
[rust compiler fork]: https://github.com/esp-rs/rust-build/

## MSRV

The **M**inimum **S**upported **R**ust **V**ersions are:

- `1.60.0` for RISC-V devices (**ESP32-C2**, **ESP32-C3**)
- `1.60.0` for Xtensa devices (**ESP32**, **ESP32-S2**, **ESP32-S3**, **ESP8266**)

Note that targeting the Xtensa ISA currently requires the use of the [esp-rs/rust] compiler fork. The [esp-rs/rust-build] repository has pre-compiled release artifacts for most common platforms, and provides installation scripts to aid you in the process.

RISC-V is officially supported by the official Rust compiler.

[esp-rs/rust]: https://github.com/esp-rs/rust
[esp-rs/rust-build]: https://github.com/esp-rs/rust-build

## Patching the SVDs

[svdtools](https://github.com/stm32-rs/svdtools) is used to patch the SVDs rather than modifying the files directly. This makes it easier to upstream the changes to the official SVDs, which is done periodically. A full description of the patching format is available in the `svdtools` README.
Expand Down
2 changes: 1 addition & 1 deletion esp32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
"Arjan Mels <arjan@mels.email>",
]
edition = "2021"
rust-version = "1.58"
rust-version = "1.60"
repository = "https://github.com/esp-rs/esp-pacs"
description = "Peripheral access crate for the ESP32"
keywords = [
Expand Down
2 changes: 1 addition & 1 deletion esp32s2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "esp32s2"
version = "0.3.0"
authors = ["Jesse Braham <jesse@beta7.io>"]
edition = "2021"
rust-version = "1.58"
rust-version = "1.60"
readme = "README.md"
repository = "https://github.com/esp-rs/esp-pacs"
description = "Peripheral access crate for the ESP32-S2"
Expand Down
2 changes: 1 addition & 1 deletion esp32s3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "esp32s3"
version = "0.3.0"
authors = ["Jesse Braham <jesse@beta7.io>"]
edition = "2021"
rust-version = "1.58"
rust-version = "1.60"
readme = "README.md"
repository = "https://github.com/esp-rs/esp-pacs"
description = "Peripheral access crate for the ESP32-S3"
Expand Down