This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove chip features from
xtensa-lx
package, add a super simple CI …
…workflow (#34) * Remove chip features from `xtensa-lx` package * Add `rustfmt.toml` config file, format source * Add a CI workflow to check the `xtensa-lx` and `xtensa-lx-rt` packages
- Loading branch information
1 parent
d42af19
commit 1a028a9
Showing
15 changed files
with
214 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- "**/README.md" | ||
push: | ||
paths-ignore: | ||
- "**/README.md" | ||
merge_group: | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Cancel any currently running workflows from the same PR, branch, or | ||
# tag when a new workflow is triggered. | ||
# | ||
# https://stackoverflow.com/a/66336834 | ||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
|
||
jobs: | ||
# -------------------------------------------------------------------------- | ||
# Check Packages | ||
|
||
xtensa-lx: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: esp-rs/[email protected] | ||
with: | ||
default: true | ||
ldproxy: false | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
# Build the 'xtensa-lx' package: | ||
- name: check (no features) | ||
run: cd xtensa-lx/ && cargo build | ||
- name: check (all features) | ||
run: cd xtensa-lx/ && cargo build --features=float-save-restore,spin | ||
|
||
# xtensa-lx-rt: | ||
# runs-on: ubuntu-latest | ||
# | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# chip: ["esp32", "esp32s2", "esp32s3"] | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: esp-rs/[email protected] | ||
# with: | ||
# default: true | ||
# ldproxy: false | ||
# - uses: Swatinem/rust-cache@v2 | ||
# | ||
# # Build the 'xtensa-lx-rt' package: | ||
# - name: check (${{ matrix.chip }}, no features) | ||
# run: cd xtensa-lx-rt/ && cargo build --features=${{ matrix.chip }} | ||
# - name: check (${{ matrix.chip }}, all features) | ||
# run: cd xtensa-lx-rt/ && cargo build --features=${{ matrix.chip }},float-save-restore | ||
|
||
# -------------------------------------------------------------------------- | ||
# Lint | ||
|
||
rustfmt: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
# Some of the configuration items in 'rustfmt.toml' require the 'nightly' | ||
# release channel: | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
components: rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
# Check the formatting of all packages: | ||
- name: rustfmt (xtensa-lx) | ||
run: cargo fmt --all --manifest-path=xtensa-lx/Cargo.toml -- --check | ||
- name: rustfmt (xtensa-lx-rt) | ||
run: cargo fmt --all --manifest-path=xtensa-lx-rt/Cargo.toml -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Comments | ||
format_code_in_doc_comments = true | ||
normalize_comments = true | ||
wrap_comments = true | ||
|
||
# Imports | ||
group_imports = "StdExternalCrate" | ||
imports_granularity = "Crate" | ||
imports_layout = "HorizontalVertical" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.