262: core_intrinsics attr need to be in the lib crate r=jordens a=jordens



Co-authored-by: Robert Jördens <rj@quartiq.de>
This commit is contained in:
bors[bot] 2021-02-03 17:15:46 +00:00 committed by GitHub
commit 5951a0d41d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 64 additions and 71 deletions

6
.github/bors.toml vendored
View File

@ -1,3 +1,7 @@
block_labels = [ "S-blocked" ] block_labels = [ "S-blocked" ]
delete_merged_branches = true delete_merged_branches = true
status = ["ci"] status = [
"style",
"test (stable)",
"compile (stable, false)",
]

View File

@ -16,11 +16,9 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal
toolchain: stable toolchain: stable
target: thumbv7em-none-eabihf target: thumbv7em-none-eabihf
override: true override: true
components: rustfmt, clippy
- name: cargo fmt --check - name: cargo fmt --check
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
@ -37,59 +35,33 @@ jobs:
compile: compile:
runs-on: ubuntu-latest runs-on: ubuntu-latest
continue-on-error: ${{ matrix.optional }}
strategy: strategy:
matrix: matrix:
toolchain: toolchain: [stable]
- stable features: ['']
bin: optional: [false]
- dual-iir
- lockin-internal
- lockin-external
features:
- ''
include: include:
- toolchain: beta - toolchain: beta
bin: dual-iir
features: '' features: ''
optional: false
- toolchain: stable - toolchain: stable
bin: lockin-internal
features: pounder_v1_1 features: pounder_v1_1
optional: false
- toolchain: nightly
features: nightly
optional: true
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@v1
with: with:
toolchain: ${{ matrix.toolchain }} toolchain: ${{ matrix.toolchain }}
target: thumbv7em-none-eabihf target: thumbv7em-none-eabihf
override: true override: true
components: llvm-tools-preview - uses: actions-rs/cargo@v1
- name: cargo build release
uses: actions-rs/cargo@v1
with: with:
command: build command: build
args: --release --features "${{ matrix.features }}" --bin ${{ matrix.bin }} args: --release --features "${{ matrix.features }}"
- name: cargo-binutils
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-binutils
- name: cargo size
uses: actions-rs/cargo@v1
with:
command: size
args: --release --features "${{ matrix.features }}" --bin ${{ matrix.bin }}
- name: cargo objcopy
uses: actions-rs/cargo@v1
with:
command: objcopy
args: --release --features "${{ matrix.features }}" --bin ${{ matrix.bin }} --verbose -- -O binary ${{ matrix.bin }}-release.bin
- uses: actions/upload-artifact@v2
if: ${{ matrix.toolchain == 'stable' && matrix.features == '' }}
with:
name: stabilizer_${{ matrix.bin }}
path: |
target/*/release/${{ matrix.bin }}
${{ matrix.bin }}-release.bin
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -100,8 +72,7 @@ jobs:
- beta - beta
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@v1
with: with:
toolchain: ${{ matrix.toolchain }} toolchain: ${{ matrix.toolchain }}
- name: cargo test - name: cargo test
@ -114,28 +85,3 @@ jobs:
with: with:
command: bench command: bench
args: --package dsp --target=x86_64-unknown-linux-gnu args: --package dsp --target=x86_64-unknown-linux-gnu
# Tell bors about it
# https://github.com/rtic-rs/cortex-m-rtic/blob/8a4f9c6b8ae91bebeea0791680f89375a78bffc6/.github/workflows/build.yml#L566-L603
ci-success:
name: ci
if: github.event_name == 'push' && success()
needs:
- style
- compile
- test
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
run: exit 0
ci-failure:
name: ci
if: github.event_name == 'push' && !success()
needs:
- style
- compile
- test
runs-on: ubuntu-latest
steps:
- name: Mark the job as a failure
run: exit 1

45
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Release binaries
on:
push:
tags: ['v*']
env:
CARGO_TERM_COLOR: always
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --features ""
- run: >
zip bin.zip
target/*/release/dual-iir
target/*/release/lockin-external
target/*/release/lockin-internal
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin.zip
asset_name: stabilizer-${{ github.ref }}.zip
asset_content_type: application/zip

View File

@ -1,7 +1,6 @@
#![deny(warnings)] #![deny(warnings)]
#![no_std] #![no_std]
#![no_main] #![no_main]
#![cfg_attr(feature = "nightly", feature(core_intrinsics))]
use stm32h7xx_hal as hal; use stm32h7xx_hal as hal;

View File

@ -1,7 +1,6 @@
#![deny(warnings)] #![deny(warnings)]
#![no_std] #![no_std]
#![no_main] #![no_main]
#![cfg_attr(feature = "nightly", feature(core_intrinsics))]
use stm32h7xx_hal as hal; use stm32h7xx_hal as hal;

View File

@ -1,7 +1,6 @@
#![deny(warnings)] #![deny(warnings)]
#![no_std] #![no_std]
#![no_main] #![no_main]
#![cfg_attr(feature = "nightly", feature(core_intrinsics))]
use dsp::{iir_int, lockin::Lockin, Accu}; use dsp::{iir_int, lockin::Lockin, Accu};
use hardware::{Adc1Input, Dac0Output, Dac1Output, AFE0, AFE1}; use hardware::{Adc1Input, Dac0Output, Dac1Output, AFE0, AFE1};

View File

@ -1,4 +1,5 @@
#![no_std] #![no_std]
#![cfg_attr(feature = "nightly", feature(core_intrinsics))]
#[macro_use] #[macro_use]
extern crate log; extern crate log;