Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow warnings during local development #271

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ rrv32imc = "rriscv32imc"
rthumbv7em = "run --release --target=thumbv7em-none-eabi --example"
rtv7em = "rthumbv7em"

# Deny warnings on all architectures. build.rustflags cannot be used here as the lower section would override its effect.
[target.'cfg(all())']
rustflags = ["-D", "warnings"]

# Common settings for all embedded targets
[target.'cfg(any(target_arch = "arm", target_arch = "riscv32"))']
rustflags = [
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ jobs:
# makefile can be tested locally. We experimentally determined that -j2 is
# optimal for the Azure Standard_DS2_v2 VM, which is the VM type used by
# GitHub Actions at the time of this writing.
#
# We have to append the "-D warnings" flag to .cargo/config rather than
# using the RUSTFLAGS environment variable because if we set RUSTFLAGS
# cargo will ignore the rustflags config in .cargo/config, breaking
# relocation.
- name: Build and Test
run: |
cd "${GITHUB_WORKSPACE}"
echo "[target.'cfg(all())']" >> .cargo/config
echo 'rustflags = ["-D", "warnings"]' >> .cargo/config
make -j2 setup
make -j2 test