GitHub Action
Rust Toolchain for Xtensa
An action which installs the Rust compiler fork with Xtensa support, as well as the required toolchain binaries.
The Rust compiler fork with Xtensa support can be found at esp-rs/rust. Pre-built binaries can be found at esp-rs/rust-build, and we install these using esp-rs/espup.
name: CI
on: [push]
# Since `espup` queries the GitHub API, we strongly recommend you provide this
# action with an API token to avoid transient errors.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
check:
name: Rust project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust for Xtensa
uses: esp-rs/[email protected]
with:
default: true
version: "1.66.0"
ldproxy: true
# `cargo check` command here will use installed `esp` toolchain, as it
# has been set as the default above
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
This action can be configured in various ways using its inputs:
Name | Description | Type | Default |
---|---|---|---|
default |
Set installed toolchain as a default toolchain | bool | false |
buildtargets |
Comma separated list of targets | string | all |
version |
Which version of the toolchain to install | string | latest |
ldproxy |
Whether to install ldproxy (required for std ) |
bool | true |
override |
Overrides the installed toolchain | bool | true |
All inputs are optional; if no inputs are provided:
- the Rust compiler fork with Xtensa support will NOT be set as the default (but is usable via the
+esp
toolchain specifier) - all available build targets will be installed
- the latest available version of the compiler will be installed
- ldproxy WILL be installed; this is required for
std
- the Rust compiler fork with Xtensa support WILL be set as the override toolchain
This action uses espup, which calls GitHub API during the installation process. [GitHub API has a low rate limit] for non-authenticated users, and this can lead to transient errors. See #15 for details.
So, we recommend defining GITHUB_TOKEN
, as seen in the example workflow, which increases the rate limit to 1000.
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.