diff --git a/.github/workflows/build-deploy-docs.yml b/.github/workflows/build-deploy-docs.yml index 7e9284c12..5c0b9f5ff 100644 --- a/.github/workflows/build-deploy-docs.yml +++ b/.github/workflows/build-deploy-docs.yml @@ -48,7 +48,25 @@ jobs: - name: Build rustdoc docs run: | - cargo doc -p riot-rs --features bench,coap,csprng,executor-thread,external-interrupts,hwrng,i2c,net,no-boards,random,riot-rs-coap/doc,spi,storage,threading,usb + cargo doc \ + -p riot-rs \ + --features " + bench, + coap, + csprng, + executor-thread, + external-interrupts, + hwrng, + i2c, + net, + no-boards, + random, + riot-rs-coap/doc, + spi, + storage, + threading, + usb, + " echo "" > target/doc/index.html mkdir -p ./_site/dev/docs/api && mv target/doc/* ./_site/dev/docs/api diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe073fb6f..2e77087e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -156,19 +156,61 @@ jobs: # TODO: we'll eventually want to enable relevant features - name: Run crate tests run: | - cargo test --no-default-features --features external-interrupts,i2c,no-boards,spi -p riot-rs -p riot-rs-embassy -p riot-rs-embassy-common -p riot-rs-identity -p riot-rs-runqueue -p riot-rs-threads -p riot-rs-macros - cargo test -p rbi -p ringbuffer -p coapcore + cargo test \ + --no-default-features \ + --features " + external-interrupts, + i2c, + no-boards, + spi, + " \ + -p riot-rs \ + -p riot-rs-embassy \ + -p riot-rs-embassy-common \ + -p riot-rs-identity \ + -p riot-rs-runqueue \ + -p riot-rs-threads \ + -p riot-rs-macros \ + + cargo test \ + -p rbi \ + -p ringbuffer \ + -p coapcore \ # We need to set `RUSTDOCFLAGS` as well in the following jobs, because it # is used for doc tests. - name: cargo test for RP - run: RUSTDOCFLAGS='--cfg context="rp2040"' RUSTFLAGS='--cfg context="rp2040"' cargo test --features external-interrupts,i2c,spi,embassy-rp/rp2040 -p riot-rs-rp + run: | + RUSTDOCFLAGS='--cfg context="rp2040"' RUSTFLAGS='--cfg context="rp2040"' cargo test \ + --features " + external-interrupts, + i2c, + spi, + embassy-rp/rp2040, + " \ + -p riot-rs-rp - name: cargo test for nRF - run: RUSTDOCFLAGS='--cfg context="nrf52840"' RUSTFLAGS='--cfg context="nrf52840"' cargo test --features external-interrupts,i2c,spi,'embassy-nrf/nrf52840' -p riot-rs-nrf + run: | + RUSTDOCFLAGS='--cfg context="nrf52840"' RUSTFLAGS='--cfg context="nrf52840"' cargo test \ + --features " + external-interrupts, + i2c, + spi, + embassy-nrf/nrf52840, + " \ + -p riot-rs-nrf - name: cargo test for STM32 - run: RUSTDOCFLAGS='--cfg context="stm32wb55rgvx"' RUSTFLAGS='--cfg context="stm32wb55rgvx"' cargo test --features external-interrupts,i2c,spi,'embassy-stm32/stm32wb55rg' -p riot-rs-stm32 + run: | + RUSTDOCFLAGS='--cfg context="stm32wb55rgvx"' RUSTFLAGS='--cfg context="stm32wb55rgvx"' cargo test \ + --features " + external-interrupts, + i2c, + spi, + embassy-stm32/stm32wb55rg, + " \ + -p riot-rs-stm32 lint: runs-on: ubuntu-latest @@ -216,49 +258,174 @@ jobs: - name: clippy uses: clechasseur/rs-clippy-check@v3 with: - args: --verbose --locked --features net,no-boards,external-interrupts,spi,storage -p riot-rs -p riot-rs-arch -p riot-rs-boards -p riot-rs-chips -p riot-rs-coap -p riot-rs-debug -p riot-rs-embassy -p riot-rs-embassy-common -p riot-rs-identity -p riot-rs-macros -p riot-rs-random -p riot-rs-rt -p riot-rs-storage -p riot-rs-threads -p riot-rs-utils -- --deny warnings + args: | + --verbose + --locked + --features " + net, + no-boards, + external-interrupts, + spi, + storage, + " + -p riot-rs + -p riot-rs-arch + -p riot-rs-boards + -p riot-rs-chips + -p riot-rs-coap + -p riot-rs-debug + -p riot-rs-embassy + -p riot-rs-embassy-common + -p riot-rs-identity + -p riot-rs-macros + -p riot-rs-random + -p riot-rs-rt + -p riot-rs-storage + -p riot-rs-threads + -p riot-rs-utils + -- + --deny warnings - run: echo 'RUSTFLAGS=--cfg context="esp32c6"' >> $GITHUB_ENV - name: clippy for ESP32 uses: clechasseur/rs-clippy-check@v3 with: - args: --verbose --locked --target=riscv32imac-unknown-none-elf --features external-interrupts,i2c,spi,esp-hal/esp32c6,esp-hal-embassy/esp32c6 -p riot-rs-esp -- --deny warnings + args: | + --verbose + --locked + --target=riscv32imac-unknown-none-elf + --features " + external-interrupts, + i2c, + spi, + esp-hal/esp32c6, + esp-hal-embassy/esp32c6, + " + -p riot-rs-esp + -- + --deny warnings - run: echo 'RUSTFLAGS=--cfg context="rp2040"' >> $GITHUB_ENV - name: clippy for RP uses: clechasseur/rs-clippy-check@v3 with: - args: --verbose --locked --features external-interrupts,i2c,spi,embassy-rp/rp2040 -p riot-rs-rp -- --deny warnings + args: | + --verbose + --locked + --features " + external-interrupts, + i2c, + spi, + embassy-rp/rp2040, + " + -p riot-rs-rp + -- + --deny warnings - run: echo 'RUSTFLAGS=--cfg context="nrf52840"' >> $GITHUB_ENV - name: clippy for nRF uses: clechasseur/rs-clippy-check@v3 with: - args: --verbose --locked --features external-interrupts,i2c,spi,embassy-nrf/nrf52840 -p riot-rs-nrf -- --deny warnings + args: | + --verbose + --locked + --features " + external-interrupts, + i2c, + spi, + embassy-nrf/nrf52840, + " + -p riot-rs-nrf + -- + --deny warnings - run: echo 'RUSTFLAGS=--cfg context="stm32wb55rgvx"' >> $GITHUB_ENV - name: clippy for STM32 uses: clechasseur/rs-clippy-check@v3 with: - args: --verbose --locked --features external-interrupts,i2c,spi,embassy-stm32/stm32wb55rg -p riot-rs-stm32 -- --deny warnings + args: | + --verbose + --locked + --features " + external-interrupts, + i2c, + spi, + embassy-stm32/stm32wb55rg, + " + -p riot-rs-stm32 + -- + --deny warnings # Reset `RUSTFLAGS` - run: echo 'RUSTFLAGS=' >> $GITHUB_ENV - name: rustdoc - run: RUSTDOCFLAGS='-D warnings' cargo doc -p riot-rs --features bench,coap,csprng,executor-thread,external-interrupts,hwrng,i2c,net,no-boards,random,riot-rs-coap/doc,spi,storage,threading,usb + run: | + RUSTDOCFLAGS='-D warnings' cargo doc \ + -p riot-rs \ + --features " + bench, + coap, + csprng, + executor-thread, + external-interrupts, + hwrng, + i2c, + net, + no-boards, + random, + riot-rs-coap/doc, + spi, + storage, + threading, + usb, + " - name: rustdoc for ESP32 - run: RUSTDOCFLAGS='-D warnings --cfg context="esp32c6"' cargo doc --target=riscv32imac-unknown-none-elf --features external-interrupts,i2c,spi,esp-hal/esp32c6,esp-hal-embassy/esp32c6 -p riot-rs-esp + run: | + RUSTDOCFLAGS='-D warnings --cfg context="esp32c6"' cargo doc \ + --target=riscv32imac-unknown-none-elf \ + --features " + external-interrupts, + i2c, + spi, + esp-hal/esp32c6, + esp-hal-embassy/esp32c6, + " \ + -p riot-rs-esp - name: rustdoc for RP - run: RUSTDOCFLAGS='-D warnings --cfg context="rp2040"' cargo doc --features external-interrupts,i2c,spi,embassy-rp/rp2040 -p riot-rs-rp + run: | + RUSTDOCFLAGS='-D warnings --cfg context="rp2040"' cargo doc \ + --features " + external-interrupts, + i2c, + spi, + embassy-rp/rp2040, + " \ + -p riot-rs-rp - name: rustdoc for nRF - run: RUSTDOCFLAGS='-D warnings --cfg context="nrf52840"' cargo doc --features external-interrupts,i2c,spi,embassy-nrf/nrf52840 -p riot-rs-nrf + run: | + RUSTDOCFLAGS='-D warnings --cfg context="nrf52840"' cargo doc \ + --features " + external-interrupts, + i2c, + spi, + embassy-nrf/nrf52840, + " \ + -p riot-rs-nrf - name: rustdoc for STM32 - run: RUSTDOCFLAGS='-D warnings --cfg context="stm32wb55rgvx"' cargo doc --features external-interrupts,i2c,spi,embassy-stm32/stm32wb55rg -p riot-rs-stm32 + run: | + RUSTDOCFLAGS='-D warnings --cfg context="stm32wb55rgvx"' cargo doc \ + --features " + external-interrupts, + i2c, + spi, + embassy-stm32/stm32wb55rg, + " \ + -p riot-rs-stm32 - name: rustfmt run: cargo fmt --check --all