-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement(shadows): Remove state from persisted shadow (#54)
* Remove the bound on PAL Error type being Copy * Change PersistedShadow to not contain the actual state, but rather read it from storage on every get, and write it on every change. This saves quite a bit of stack for larger shadow states * Update CI to use nightly and remove codecov * Update pfx credentials for integration test to new format used by openssl3
- Loading branch information
1 parent
edeb11e
commit f4b1dbc
Showing
13 changed files
with
386 additions
and
352 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -19,205 +19,55 @@ jobs: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
test: | ||
name: Test | ||
name: Build & Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: thumbv7m-none-eabi | ||
override: true | ||
|
||
uses: actions/checkout@v3 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --all --target thumbv7m-none-eabi --features ${{ env.ALL_FEATURES }} | ||
args: --all --target thumbv7em-none-eabihf --features ${{ env.ALL_FEATURES }} | ||
|
||
- name: Test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --lib --features "ota_mqtt_data,log" | ||
grcov: | ||
name: Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
target: x86_64-unknown-linux-gnu | ||
override: true | ||
|
||
- name: Install grcov | ||
uses: actions-rs/cargo@v1 | ||
# uses: actions-rs/[email protected] | ||
with: | ||
# crate: grcov | ||
# version: latest | ||
# use-tool-cache: true | ||
command: install | ||
args: --locked grcov --git https://github.com/mozilla/grcov | ||
|
||
- name: Test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --lib --no-fail-fast --features "ota_mqtt_data,ota_http_data,log" | ||
env: | ||
CARGO_INCREMENTAL: "0" | ||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests" | ||
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests" | ||
|
||
- name: Generate coverage data | ||
id: grcov | ||
# uses: actions-rs/[email protected] | ||
run: | | ||
grcov target/debug/ \ | ||
--branch \ | ||
--llvm \ | ||
--source-dir . \ | ||
--output-file lcov.info \ | ||
--ignore='/**' \ | ||
--ignore='C:/**' \ | ||
--ignore='../**' \ | ||
--ignore-not-existing \ | ||
--excl-line "#\\[derive\\(" \ | ||
--excl-br-line "(#\\[derive\\()|(debug_assert)" \ | ||
--excl-start "#\\[cfg\\(test\\)\\]" \ | ||
--excl-br-start "#\\[cfg\\(test\\)\\]" \ | ||
--commit-sha ${{ github.sha }} \ | ||
--service-job-id ${{ github.job }} \ | ||
--service-name "GitHub Actions" \ | ||
--service-number ${{ github.run_id }} | ||
- name: Upload coverage as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lcov.info | ||
# path: ${{ steps.grcov.outputs.report }} | ||
path: lcov.info | ||
|
||
- name: Upload coverage to codecov.io | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
# file: ${{ steps.grcov.outputs.report }} | ||
file: lcov.info | ||
fail_ci_if_error: true | ||
|
||
rustfmt: | ||
name: rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt | ||
|
||
- name: Run rustfmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check --verbose | ||
|
||
# tomlfmt: | ||
# name: tomlfmt | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout source code | ||
# uses: actions/checkout@v2 | ||
|
||
# - name: Install Rust | ||
# uses: actions-rs/toolchain@v1 | ||
# with: | ||
# profile: minimal | ||
# toolchain: nightly | ||
# override: true | ||
|
||
# - name: Install tomlfmt | ||
# uses: actions-rs/[email protected] | ||
# with: | ||
# crate: cargo-tomlfmt | ||
# version: latest | ||
# use-tool-cache: true | ||
|
||
# - name: Run Tomlfmt | ||
# uses: actions-rs/cargo@v1 | ||
# with: | ||
# command: tomlfmt | ||
# args: --dryrun | ||
uses: actions/checkout@v3 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- name: Rustfmt | ||
run: cargo fmt -- --check | ||
|
||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
|
||
uses: actions/checkout@v3 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- name: Run clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: -- ${{ env.CLIPPY_PARAMS }} | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Build documentation | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --verbose --no-deps --features ${{ env.ALL_FEATURES }} | ||
|
||
integration-test: | ||
name: Integration Tests | ||
runs-on: ubuntu-latest | ||
needs: ['test', 'rustfmt', 'clippy'] | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: x86_64-unknown-linux-gnu | ||
override: true | ||
uses: actions/checkout@v3 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- name: Create OTA Job | ||
run: | | ||
./scripts/create_ota.sh | ||
|
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,7 @@ | ||
[toolchain] | ||
channel = "nightly-2023-06-28" | ||
components = [ "rust-src", "rustfmt", "llvm-tools-preview", "clippy" ] | ||
targets = [ | ||
"x86_64-unknown-linux-gnu", | ||
"thumbv7em-none-eabihf" | ||
] |
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.