Skip to content

Async API

Async API #1950

Workflow file for this run

name: Build BSPs
on: [push, pull_request]
jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- id: set-matrix
uses: ./.github/actions/list-BSPs
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
needs: setup
strategy:
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install Rust
run: |
rustup update
rustup set profile minimal
rustup override set ${{ matrix.toolchain }}
target=$(cat ./crates.json | jq -Mr --arg board '${{ matrix.bsp }}' -c '.boards | .[$board] | .target')
rustup target add ${target}
rustup component add clippy
- name: Setup cache
uses: Swatinem/rust-cache@v2
- name: Build ${{ matrix.bsp }}
run: |
build_invocation=$(cat ./crates.json | jq -Mr --arg board '${{ matrix.bsp }}' -c '.boards | .[$board] | .build')
set -ex
cd boards/${{ matrix.bsp }}
$(${build_invocation})
- name: Clippy ${{ matrix.bsp }}
if: ${{ matrix.toolchain == 'nightly' }}
run: |
set -ex
build_invocation=$(cat ./crates.json | jq -Mr --arg board '${{ matrix.bsp }}' -c '.boards | .[$board] | .build')
clippy_invocation=$(echo ${build_invocation} | sed 's/cargo build/cargo clippy/g')
cd boards/${{ matrix.bsp }}
$(${clippy_invocation})