mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-25 21:19:35 +01:00
320: No build opt on msrv r=korken89 a=AfoHT #314 is failing the tests since 1.36.0 is not capable of 'build-override' profiles. This extends current CI setup for both Travis and GHA to remove any `build-override` before running in case toolchain is 1.36.0. 322: Update resources.md r=korken89 a=lonesometraveler This fixes some typos. Co-authored-by: Henrik Tjäder <henrik@tjaders.com> Co-authored-by: KENTARO OKUDA <lonesometraveler@mac.com>
This commit is contained in:
commit
28e963488f
3 changed files with 28 additions and 5 deletions
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
|
@ -59,6 +59,10 @@ jobs:
|
|||
target: ${{ matrix.target }}
|
||||
override: true
|
||||
|
||||
- name: Disable optimisation profiles
|
||||
if: matrix.toolchain == '1.36.0'
|
||||
run: sed -i '/^\[profile.*build-override]$/,/^$/{/^#/!{/^$/!d}}' Cargo.toml
|
||||
|
||||
- name: cargo check
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
@ -268,6 +272,11 @@ jobs:
|
|||
toolchain: ${{ matrix.toolchain }}
|
||||
target: ${{ matrix.target }}
|
||||
override: true
|
||||
|
||||
- name: Disable optimisation profiles
|
||||
if: matrix.toolchain == '1.36.0'
|
||||
run: sed -i '/^\[profile.*build-override]$/,/^$/{/^#/!{/^$/!d}}' Cargo.toml
|
||||
|
||||
- name: cargo check
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
@ -287,6 +296,10 @@ jobs:
|
|||
toolchain: 1.36.0
|
||||
target: thumbv7m-none-eabi
|
||||
override: true
|
||||
|
||||
- name: Disable optimisation profiles
|
||||
run: sed -i '/^\[profile.*build-override]$/,/^$/{/^#/!{/^$/!d}}' Cargo.toml
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
use-cross: false
|
||||
|
@ -305,6 +318,10 @@ jobs:
|
|||
toolchain: 1.36.0
|
||||
target: thumbv6m-none-eabi
|
||||
override: true
|
||||
|
||||
- name: Disable optimisation profiles
|
||||
run: sed -i '/^\[profile.*build-override]$/,/^$/{/^#/!{/^$/!d}}' Cargo.toml
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
use-cross: false
|
||||
|
|
|
@ -11,7 +11,7 @@ All resources are declared as a single `struct` within the `#[app]`
|
|||
pseudo-module. Each field in the structure corresponds to a different resource.
|
||||
Resources can optionally be given an initial value using the `#[init]`
|
||||
attribute. Resources that are not given an initial value are referred to as
|
||||
*late* resources and are covered in more detail in a follow up section in this
|
||||
*late* resources and are covered in more detail in a follow-up section in this
|
||||
page.
|
||||
|
||||
Each context (task handler, `init` or `idle`) must declare the resources it
|
||||
|
@ -31,7 +31,7 @@ access to a resource named `shared`.
|
|||
$ cargo run --example resource
|
||||
{{#include ../../../../ci/expected/resource.run}}```
|
||||
|
||||
Note that the `shared` resource cannot accessed from `idle`. Attempting to do
|
||||
Note that the `shared` resource cannot be accessed from `idle`. Attempting to do
|
||||
so results in a compile error.
|
||||
|
||||
## `lock`
|
||||
|
@ -75,14 +75,14 @@ $ cargo run --example lock
|
|||
|
||||
## Late resources
|
||||
|
||||
Late resources are resources that are not given an initial value at compile
|
||||
using the `#[init]` attribute but instead are initialized are runtime using the
|
||||
Late resources are resources that are not given an initial value at compile time
|
||||
using the `#[init]` attribute but instead are initialized at runtime using the
|
||||
`init::LateResources` values returned by the `init` function.
|
||||
|
||||
Late resources are useful for *moving* (as in transferring the ownership of)
|
||||
peripherals initialized in `init` into interrupt handlers.
|
||||
|
||||
The example below uses late resources to stablish a lockless, one-way channel
|
||||
The example below uses late resources to establish a lockless, one-way channel
|
||||
between the `UART0` interrupt handler and the `idle` task. A single producer
|
||||
single consumer [`Queue`] is used as the channel. The queue is split into
|
||||
consumer and producer end points in `init` and then each end point is stored
|
||||
|
|
|
@ -36,6 +36,12 @@ main() {
|
|||
|
||||
mkdir -p ci/builds
|
||||
|
||||
# Current MSRV cannot handle profiles, remove compilation optimisations
|
||||
if [[ $TRAVIS_RUST_VERSION == 1.*.* ]]; then
|
||||
echo "Removing optimisation profiles"
|
||||
sed -i '/^\[profile.*build-override]$/,/^$/{/^#/!{/^$/!d}}' Cargo.toml
|
||||
fi
|
||||
|
||||
if [ $T = x86_64-unknown-linux-gnu ]; then
|
||||
if [[ $TRAVIS_RUST_VERSION == 1.*.* ]]; then
|
||||
# test on a fixed version (MSRV) to avoid problems with changes in rustc diagnostics
|
||||
|
|
Loading…
Reference in a new issue