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

[Relay] Crate Init + Wifi Library #1

Merged
merged 30 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f57cc33
.gitignore
twoshark Feb 3, 2024
f1db76e
ESP32 IDF Template
twoshark Feb 3, 2024
a855299
Rust Workspace & CI
twoshark Feb 3, 2024
e4cd28f
Remove workspace
twoshark Feb 3, 2024
5c554a3
individually build and check each crate
twoshark Feb 3, 2024
2e4a999
use cargo --manifest_path instead of cd
twoshark Feb 3, 2024
2cb50ca
Remove led lib
twoshark Feb 3, 2024
810282a
Wifi Loading Lib
twoshark Feb 3, 2024
2b7f804
lint
twoshark Feb 3, 2024
2255b86
Bin Cargo.lock
twoshark Feb 3, 2024
2531929
manifest flag first in ci
twoshark Feb 3, 2024
cc3e33c
.gitignore
twoshark Feb 3, 2024
2ba6317
only run action on ci and manual exec
twoshark Feb 3, 2024
dfabbac
lint
twoshark Feb 3, 2024
19ec0ed
remove led driver
twoshark Feb 3, 2024
656f6b8
check, don't build since this is for an esp32
twoshark Feb 3, 2024
176d795
lint
twoshark Feb 3, 2024
d200a25
lint
twoshark Feb 3, 2024
f936e0e
correct target for ci cargo commands
twoshark Feb 3, 2024
ea3a2a6
add caching for wifi and relay workspaces
twoshark Feb 3, 2024
224221b
add xtensa target
twoshark Feb 3, 2024
a42964f
target not needed for clippy or fmt
twoshark Feb 3, 2024
7658ae8
move cache action to after rust setup
twoshark Feb 3, 2024
6850011
target only xtensa for clippy check
twoshark Feb 3, 2024
8aea5e0
xtensa-esp32-idf target
twoshark Feb 3, 2024
0f97702
xtensa-esp32-idf target
twoshark Feb 3, 2024
104bdd5
source espup script in ci
twoshark Feb 3, 2024
716c9bc
remove failing ci for now
twoshark Feb 3, 2024
8f03071
fix wifi lib target
twoshark Feb 3, 2024
e9b5f07
remove wifi config
twoshark Feb 4, 2024
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
45 changes: 45 additions & 0 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Rust CI

on:
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
rust-checks:
name: Rust Checks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crate: ["relay", "wifi"]
action:
# - command: check
# args: --target=xtensa-esp32-espidf --release
- command: fmt
args: --all -- --check --color always
# - command: clippy
# args: --target=xtensa-esp32-espidf --all-features --workspace -- -D warnings
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: esp-rs/[email protected]
with:
default: true
buildtargets: esp32
ldproxy: true
- name: Enable caching
uses: Swatinem/rust-cache@v2
with:
workspaces: "relay/ -> target
wifi/ -> target"
- name: Xtensa rustup target
run: espup install
- name: Source espup script
run: . $HOME/export-esp.sh
- name: Run command
run: cargo ${{ matrix.action.command }} --manifest-path=${{ matrix.crate }}/Cargo.toml ${{ matrix.action.args }}
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# jetbrains
.idea

/.embuild
17 changes: 17 additions & 0 deletions relay/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[build]
target = "xtensa-esp32-espidf"

[target.xtensa-esp32-espidf]
linker = "ldproxy"
# runner = "espflash --monitor" # Select this runner for espflash v1.x.x
runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x
rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110

[unstable]
build-std = ["std", "panic_abort"]

[env]
MCU="esp32"
# Note: this variable is not used by the pio builder (`cargo build --features pio`)
ESP_IDF_VERSION = "v5.1.2"

2 changes: 2 additions & 0 deletions relay/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
.embuild
Loading