Skip to content

A GitHub Action to install the Rust compiler fork targeting Xtensa devices

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

esp-rs/xtensa-toolchain

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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

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.

About

A GitHub Action to install the Rust compiler fork targeting Xtensa devices

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •