GitHub actions

This commit is contained in:
imarkov 2021-10-25 12:55:48 -04:00
parent 0a6f0fd44e
commit 77cd6e9aff
5 changed files with 92 additions and 1 deletions

3
.github/configs/sdkconfig.defaults vendored Normal file
View File

@ -0,0 +1,3 @@
# Workaround for https://github.com/espressif/esp-idf/issues/7631
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=n
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=n

36
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '50 4 * * *'
jobs:
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
- name: Setup | Std
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: Setup | Default to nightly
run: rustup default nightly
- name: Build | Fmt Check
run: cargo fmt -- --check
- name: Build | Clippy
run: export ESP_IDF_SYS_GLOB_BASE=$(pwd)/.github/configs; export ESP_IDF_SYS_GLOB_0=/sdkconfig.*; cargo clippy --no-deps --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort
# - name: Build | Compile
# run: export ESP_IDF_SYS_GLOB_BASE=$(pwd)/.github/configs; export ESP_IDF_SYS_GLOB_0=/sdkconfig.*; cargo build --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort
- name: Build | Compile Native / ESP-IDF master
run: export ESP_IDF_VERSION=master; cargo build --features native --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort
# - name: Build | Compile Native
# run: export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --features native --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort

22
.github/workflows/publish-dry-run.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: PublishDryRun
on:
workflow_dispatch
jobs:
publishdryrun:
name: Publish Dry Run
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Setup | Std
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: Setup | Default to nightly
run: rustup default nightly
- name: Build | Publish Dry Run
run: export ESP_IDF_SYS_GLOB_BASE=$(pwd)/.github/configs; export ESP_IDF_SYS_GLOB_0=/sdkconfig.*; cargo publish --dry-run --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort

26
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Publish
on:
workflow_dispatch
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Setup | Std
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: Setup | Default to nightly
run: rustup default nightly
- name: Setup | Default to nightly
run: rustup default nightly
- name: Login
run: cargo login ${{ secrets.crates_io_token }}
- name: Build | Publish
run: export ESP_IDF_SYS_GLOB_BASE=$(pwd)/.github/configs; export ESP_IDF_SYS_GLOB_0=/sdkconfig.*; cargo publish --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort

6
.gitignore vendored
View File

@ -1,3 +1,7 @@
/.vscode
/.espressif
/.embuild
/target
/Cargo.lock
**/*.rs.bk
ulp/ulp_start.o
Cargo.lock