Commit Graph

10 Commits

Author SHA1 Message Date
Ruoqing He
752ad1322a Introduce riscv64 CI
Introduce logic necessary for generating YAML needed by BuildKite, which
are designed to work with image introduced in
rust-vmm/rust-vmm-container#106.

The container version is updated to v44 to enable CI on RISC-V platform.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-09-02 09:38:45 +02:00
Stefano Garzarella
352bc23bee Generate Cargo.lock before call cargo audit
Starting from v0.18.0, cargo-audit hangs indefinitely if Cargo.lock
does not exist. We discovered this while upgrading the container
from v26 to v28 [1], which among other things updated cargo-audit.

For the binary crates this should not be a problem, since they have
Cargo.lock committed, but for many libraries this may not be true.

If Cargo.lock is not there, we are generating one with the latest
available versions, which may not be very significant. For this and
other reasons it's now suggested that libraries also have a
Cargo.lock [2] committed (thanks Manos for pointing this out).

Note: `cargo generate-lockfile` updates Cargo.lock if it's already
there, but we don't want it, that's why we have the guard.

[1] https://github.com/rust-vmm/rust-vmm-ci/pull/138
[2] https://doc.rust-lang.org/nightly/cargo/faq.html#why-have-cargolock-in-version-control

Suggested-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Suggested-by: Patrick Roy <roypat@amazon.co.uk>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2023-10-20 17:16:00 +02:00
Viresh Kumar
3640704b02 Cargo audit is missing for arm platforms
Lets run it only for x86 for the moment.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-04-05 10:17:12 +02:00
Andreea Florescu
edd221ac3b don't allow undocumented unsafe blocks
We already have this as a requirement for merging PRs as part of the
PR checklist template, but it's better to enforce it. This comes with
the disadvantage that we will need to update all comments and add the
prefix "SAFETY: " as required by the clippy check.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
2022-10-25 10:53:24 +03:00
Laura Loghin
b6858b232d run cargo audit with --deny warnings enabled
It is better to fail on warnings as well when running `cargo
audit` so we can catch problems in time.
Fixes https://github.com/rust-vmm/rust-vmm-ci/issues/52.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
2022-01-11 15:11:28 +01:00
Sergii Glushchenko
68d4dbf85c Check formatting of code examples in doc comments
Add format_code_in_doc_comments=true to the cargo fmt
config options.

Fixes: https://github.com/rust-vmm/rust-vmm-ci/issues/58

Signed-off-by: Sergii Glushchenko <gsserge@amazon.com>
2021-10-06 17:39:17 +03:00
alindima
ce13bfb1ef Make build warnings fatal, again
Add the RUSTFLAGS="-D warnings" to cargo build
commands

The yaml config file has been deleted in the meantime,
so we need to add this again.

Signed-off-by: alindima <alindima@amazon.com>
2021-09-23 19:19:35 +03:00
Catalin Dumitru
1311bfa03f Update clippy test command
Added the option --all-targets to the command in the clippy test for
clippy to also run on the integration tests.

Signed-off-by: Catalin Dumitru <catdum@amazon.com>
2021-09-01 15:59:39 +03:00
Catalin Dumitru
cc6ed996a0 Format integration tests code
Split lines that were too long, adjusted intendation and fixed typos.

Signed-off-by: Catalin Dumitru <catdum@amazon.com>
2021-08-25 16:25:48 +03:00
Catalin Dumitru
b47488a9b9 Autogenerate pipeline fron json config file
Instead of having a static pipeline.yml, autogenerate it from a JSON
configuration file. The json approach is taken because we also want to
be able to run tests locally, and thus the json can be parsed once for
generating the pipeline, and once for generating a local test run.

Signed-off-by: Catalin Dumitru <catdum@amazon.com>
2021-08-19 14:17:39 +03:00