Merge pull request #418 from ithinuel/give-names-to-gha-steps

Add meaningful names to steps and remove quasi-repetition
This commit is contained in:
Wilfried Chauveau 2022-08-17 19:35:49 +01:00 committed by GitHub
commit 9792408902
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,13 @@
on: [push, pull_request] on: [push, pull_request]
name: Build and Test check name: Build and Test check
jobs: jobs:
check: builds:
name: cargo-check name: "Build checks"
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy:
matrix:
features: ["", "--features eh1_0_alpha", "--features chrono"]
mode: ["", "--release"]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
@ -12,43 +16,26 @@ jobs:
target: thumbv6m-none-eabi target: thumbv6m-none-eabi
override: true override: true
profile: minimal profile: minimal
- uses: actions-rs/cargo@v1 - name: "Build workspace"
uses: actions-rs/cargo@v1
with: with:
command: build command: build
args: --workspace args: ${{ matrix.mode }} --workspace ${{ matrix.features }}
- uses: actions-rs/cargo@v1 - name: "Build workspace and examples"
uses: actions-rs/cargo@v1
with: with:
command: build command: build
args: --workspace --examples args: ${{ matrix.mode }} --workspace --examples ${{ matrix.features }}
- run: echo "Debug examples built:" && ls target/thumbv6m-none-eabi/debug/examples/ |grep -v '-' |grep -v '\.d' - name: "List built examples and clean"
- run: rm target/thumbv6m-none-eabi/debug/examples/ -rf run: rm -vrf target/thumbv6m-none-eabi/*/examples/* | sed -e "s/removed '\(.*\)'/\1/" | xargs -l basename | grep -Ev '(-|\.d)'
- uses: actions-rs/cargo@v1 - name: "Test"
with: uses: actions-rs/cargo@v1
command: build
args: --workspace --examples --features eh1_0_alpha
- run: echo "Debug eh1_0 examples built:" && ls target/thumbv6m-none-eabi/debug/examples/ |grep -v '-' |grep -v '\.d'
- run: rm target/thumbv6m-none-eabi/debug/examples/ -rf
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --workspace --examples
- run: echo "Release examples built:" && ls target/thumbv6m-none-eabi/release/examples/ |grep -v '-' |grep -v '\.d'
- run: rm target/thumbv6m-none-eabi/release/examples/ -rf
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --workspace --examples --features eh1_0_alpha
- run: echo "Release eh1_0 examples built:" && ls target/thumbv6m-none-eabi/release/examples/ |grep -v '-' |grep -v '\.d'
- run: rm target/thumbv6m-none-eabi/release/examples/ -rf
- uses: actions-rs/cargo@v1
with: with:
command: test command: test
args: --doc --target x86_64-unknown-linux-gnu args: --tests --target x86_64-unknown-linux-gnu ${{ matrix.features }}
- uses: actions-rs/cargo@v1 - name: "Test docs"
uses: actions-rs/cargo@v1
with: with:
command: test command: test
args: --doc --target x86_64-unknown-linux-gnu --features chrono args: --doc --target x86_64-unknown-linux-gnu ${{ matrix.features }}
- uses: actions-rs/cargo@v1
with:
command: test
args: --tests --target x86_64-unknown-linux-gnu