Skip to content

Commit

Permalink
chore(CI): Line break long command line invocations
Browse files Browse the repository at this point in the history
All repeated-ish items have trailing commas or backslashes as needed;
this later makes it easier to sort (sorting works even if the last item
changes) and to extend (a new last item doesn't change the previous last
item).

In strings that became quoted strings for better line breaking, old
single quotes were removed.
  • Loading branch information
chrysn committed Oct 31, 2024
1 parent 7d0603d commit c274f0e
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 16 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/build-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<meta http-equiv=\"refresh\" content=\"0; url=riot_rs\">" > target/doc/index.html
mkdir -p ./_site/dev/docs/api && mv target/doc/* ./_site/dev/docs/api
Expand Down
197 changes: 182 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c274f0e

Please sign in to comment.