Home

Awesome

xtensa-toolchain Action

GitHub Workflow Status MIT/Apache-2.0 licensed

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.

Example workflow

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/xtensa-toolchain@v1.5
        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
        run: cargo check

Inputs

This action can be configured in various ways using its inputs:

NameDescriptionTypeDefault
defaultSet installed toolchain as a default toolchainboolfalse
buildtargetsComma separated list of targetsstringall
versionWhich version of the toolchain to installstringlatest
ldproxyWhether to install ldproxy (required for std)booltrue
overrideOverrides the installed toolchainbooltrue

All inputs are optional; if no inputs are provided:

Environment

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.

Use with act

act is a tool which can be used to run GitHub workflows locally, using Docker. It is possible to use the xtensa-toolchain action with act; however, due to the fact that espup queries the GitHub API, it is necessary to set the GITHUB_TOKEN environment variable in order to do so.

For more information please see the GITHUB_TOKEN section of the README for act.

License

Licensed under either of:

at your option.

Contribution

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.