Skip to content

Protect against busy-loop in Ingress::read_from #490

Protect against busy-loop in Ingress::read_from

Protect against busy-loop in Ingress::read_from #490

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
env:
CLIPPY_PARAMS: -W clippy::all -W clippy::pedantic -W clippy::nursery -W clippy::cargo
jobs:
cancel_previous_runs:
name: Cancel previous runs
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
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: stable
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: stable
# 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
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
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- ${{ env.CLIPPY_PARAMS }}
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
target: ["x86_64-unknown-linux-gnu", "thumbv6m-none-eabi"]
features: ["", "derive"]
include:
- target: "x86_64-unknown-linux-gnu"
extra_features: "std,log"
- target: "thumbv6m-none-eabi"
extra_features: "embedded,defmt"
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: thumbv6m-none-eabi
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --target '${{ matrix.target }}' --features '${{ matrix.features }},${{ matrix.extra_features }}'
test:
name: 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: thumbv6m-none-eabi
override: true
- name: Library tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --features std,heapless,string_errors