139 Commits

Author SHA1 Message Date
Ravi kumar Veeramally
693e456793 build: Update ARM64 GitHub action for windows integration tests
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
(cherry picked from commit fbcf5fb37dcb27ef84bce893a8658c54685e2e34)
2024-03-14 19:52:57 -07:00
Ravi kumar Veeramally
8c1b112a60 build: Add GitHub action for metrics tests
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit d245e624275ea7d93b31e056666103fe16827040)
2024-03-14 19:52:57 -07:00
Rob Bradford
26cab16830 build: Avoid cancellation of release build workflow on MQ
When running on the merge group this workflow is run twice - once for
the create event (merge queue creates a new branch) and once for the
merge_group event. Unfortunately the second event would cause the first
to be cancelled - unfortunately sometimes that second event is the
create event where the job in the workflow only runs if it is also a
tag.

By creating distinct concurrency groups for each event type then the
cross cancellation can be avoided.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 6f49d7f192beb7224ec7187debe250e97909ad23)
2024-03-14 19:52:57 -07:00
Rob Bradford
c588138187 build: Use authentication token to avoid GitHub rate limit
The workers share a common public IP address and often GitHub will
reject attempts to access the API due to exceeding the anonymous rate
limit threshold.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 0f71956d6df9c241b205ae3c68e38dfd98f73d68)
2024-03-14 19:52:57 -07:00
Bo Chen
4b72e5a886 build: Allow 'cancel-in-progress' for bare-metal workers
Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit 46c9b9693c2b28e64af103d1549278c455b97706)
2024-03-14 19:52:57 -07:00
Rob Bradford
51febbb7fe build: Add SGX, VFIO and rate limit testing to MQ
Run these workflows as part of the merge queue to help improve testing
coverage.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit cdafe5344d09b5f7fd731dec90657ed0c1a5b5f8)
2024-03-14 19:52:57 -07:00
Bo Chen
551d36e502 build: Add a step to fix workspace permissions on bare-metal workers
When a bare-metal worker is canceled, its workspace can be left with
files owned by the root user as a result of running tests from our
container. This patch add a step to fix workspace permissions for such
case before checking out code.

Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit f48942ce3f12f507ea5530b926aaf631d914dadd)
2024-03-14 19:52:57 -07:00
Bo Chen
37666f842d build: Run integration tests on smaller VMs
Signed-off-by: Bo Chen <chen.bo@intel.com>
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 7d60ab70e6d1d061f20524b85318cd650f88995f)
2024-03-14 19:52:57 -07:00
Rob Bradford
67904a90fc build: Cancel in progress actions on update
If the PR updated cancel outstanding jobs to conserve resources.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 1db30405e13995172bd45386a49a54e7c7a5f621)
2024-03-14 19:52:57 -07:00
Rob Bradford
196e653a50 build: Only run bisectability check on PRs
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 3e355298427bfbc13b2c822a1bb68b3d80783e6f)
2024-03-14 19:52:57 -07:00
Rob Bradford
355148c3d6 build: Only check DCO on PRs
The DCO tool doesn't understand merge_groups but we still need to have a
valid status check to allow the merge group to proceed.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 96cc1ba76c620f0648a64c025111309c967a3f79)
2024-03-14 19:52:57 -07:00
Rob Bradford
1dff2503a6 build: Skip release check on pull requests
This takes a long time and duplicates existing checks on the pull
requests.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 022f375ef86f6b099b68144c9a85dcecc95492ef)
2024-03-14 19:52:57 -07:00
Rob Bradford
f4c85aef89 build: Only run Intel + glibc on PR builds for x86-64 tests
Run all the tests on the merge queue.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 81b95023c47123799413d1220c06fa0c5885cea6)
2024-03-14 19:52:57 -07:00
Rob Bradford
0131a408bf build: Make the Windows Guest Test always pass on PR builds
When running with the merge queue the tests will be fully executed.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit f15ca1aec398c8180fc0602b67f6e10e9abeab0f)
2024-03-14 19:52:57 -07:00
Rob Bradford
bd506500d7 build: Remove unnecessary if event checks from vfio/sgx workflows
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit cb8a728dfbeb10b0d50e8a38c0242576cabb3cc0)
2024-03-14 19:52:57 -07:00
Rob Bradford
80724b1662 build: Use a nicer name for DCO check step
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 80aa91f24c32c532ca1a73e03d04c9b3de872224)
2024-03-14 19:52:57 -07:00
Rob Bradford
1f6b43db49 build: Ensure all required checks run on merge_group
And clean up some of the whitespace formatting so that the "name" and
"on" are grouped away from the "jobs".

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit d9f48505fec88940025e6844cc541e84ffbff6dd)
2024-03-14 19:52:57 -07:00
Ravi kumar Veeramally
5fc018abdd build: Add GitHub action for Windows guest integration tests
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit ba6bfee4fffa892a4f8e9a31b65a108786a65261)
2024-03-14 19:52:57 -07:00
Ravi kumar Veeramally
690e10eef4 build: Add GitHub action for Rate Limiter integration tests
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
(cherry picked from commit 57fb97e41f7dbeb5c7b588646940d53b2bae2cc8)
2024-03-14 19:52:57 -07:00
Ravi kumar Veeramally
ea12024793 build: Add GitHub action for VFIO integration tests
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
(cherry picked from commit b765acd6081c0d2e3e88f2d2f1a4db38661c3d37)
2024-03-14 19:52:57 -07:00
Ravi kumar Veeramally
e082ed23ed build: Add GitHub action for SGX integration tests
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
(cherry picked from commit 4fb86e99150eb428d0c35e44cd83b020c10bb7a6)
2024-03-14 19:52:57 -07:00
Rob Bradford
d1953633e2 build: Add some timeouts to integration test workflow
Add top-level timeout for the jobs and also more agressive per step
timeouts.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 1fe2771a0ddb05d5e952eb67a18a34d656efe3a7)
2024-03-14 19:52:57 -07:00
Rob Bradford
23f1490667 build: Add libc to matrix for x86-64 tests
To reduce issues caused by flaky tests split the musl and glibc jobs
into separate jobs. This means fewer jobs will need to be restarted for
flaky tests. This will also increase CI throughput since the musl builds
account for ~40% of the total CI time when run together with glibc.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 2e4079becb785e1b948b9cd4ae97ca3ab846a9ef)
2024-03-14 19:52:57 -07:00
Rob Bradford
b312a970ef build: Disable "fail fast" on x86-64 GitHub action
This will help handle flakiness in the builds by requiring the minimum
number of restarts.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit d32de07be7a1fb2e5dea1a09906578107ed9b5df)
2024-03-14 19:52:57 -07:00
Rob Bradford
6e544d0a30 build: Switch GitHub action ARM64 builds to musl
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 6ec83c7d8ee17e7db00a8e0be70484145d7171aa)
2024-03-14 19:52:57 -07:00
Rob Bradford
bc84ac4699 build: Extend x86-64 GitHub action to AMD runner
Use the matrix to add a build runnind on the AMD variant of the garm
runner.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 84a6da5e93f15b1df4e088255f51e2840b15c041)
2024-03-14 19:52:57 -07:00
Rob Bradford
8b0d43e2fe build: Add GitHub action for ARM64 integration tests
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 89f2a4882ebb6f5416d531e72577399b55aca4d3)
2024-03-14 19:52:57 -07:00
Rob Bradford
61430fb345 build: Add GitHub action for unit/integration testing
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
(cherry picked from commit 307a0166c5c0bd623f26f5701d9ee60f3b6641be)
2024-03-14 19:52:57 -07:00
Jinank Jain
5d4fe8efb9 github: ci: Move to action/checkout v4
There is a mix of v2, v3 and v4 in the codebase. Let's move to v4
everywhere because v2 seems to be using a deprecated version of nodejs.
This is throwing warnings when the Github action CI is running.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
2023-12-11 13:29:11 +00:00
Muminul Islam
b9117c9c50 github: workflow: Build/quality test for igvm
Extend the current github actions to build and
test clippy for igvm feature.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2023-12-08 09:22:42 -08:00
Michael Zhao
70380d289f ci: Enable OpenAPI validate action
Pull the container `openapitools/openapi-generator-cli` and run the
validation.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2023-11-20 07:45:55 +00:00
Ruslan Mstoi
ea7999e064 build: add gitlint commit message linter
Implement commit message check workflow using gitlint

Fixes: #5840

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-11-16 16:09:17 +00:00
Rob Bradford
13fae28635 build: Bump MSRV to 1.70 for clap crate
See: #5925

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-11-08 08:13:45 -08:00
Bo Chen
b312293604 build: Bump MSRV to 1.66
This is required for the following dependency:

toml_edit v0.19.15
└── proc-macro-crate v1.3.1
    ├── zbus_macros v3.14.1 (proc-macro)
        └── zbus v3.14.1
            ├── cloud-hypervisor v35.0.0 (/home/chenb/project/cloud-hypervisor/cloud-hypervisor)
            └── vmm v0.1.0 (/home/chenb/project/cloud-hypervisor/cloud-hypervisor/vmm)
                └── cloud-hypervisor v35.0.0 (/home/chenb/project/cloud-hypervisor/cloud-hypervisor)

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-11-01 13:05:30 +00:00
Muminul Islam
a1ce37c2af build: Bump MSRV to 1.65
Sev-Snp on MSHV uses igvm crate to parse the igvm file.
igvm crate needs minimum rust version 1.65 to build.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2023-10-19 08:42:17 +01:00
Philipp Schuster
83f3b34405 ci: Run typos
This adds the typos utility as dedicated CI step.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2023-09-09 10:46:21 +01:00
Jinank Jain
51548471fd github: worflow: Add build and clippy test for snp
Extend the current github actions to add support for snp feature flag.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
2023-09-07 12:52:27 +01:00
Bo Chen
3bb26093eb build: Enable default features for release workflow
In this way, we are releasing binaries with all default features plus
feature "mshv".

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-08-04 07:33:30 +01:00
Ruslan Mstoi
a0190b16aa Add Hadolint Dockerfile Linter to CI
Fixes #5332

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-06-20 12:39:18 -07:00
Omer Faruk Bayram
c016a0d4d3 vmm: dbus: implement the D-Bus API
This commit introduces three new dependencies: `zbus`, `futures`
and `blocking`. `blocking` is used to call the Internal API in zbus'
async context which is driven by `futures::executor`. They are all
behind the `dbus_api` feature flag.

The D-Bus API implementation is behind the same `dbus_api` feature
flag as well.

Signed-off-by: Omer Faruk Bayram <omer.faruk@sartura.hr>
2023-06-06 10:18:26 -07:00
Rob Bradford
b955f09b80 build: Bump MSRV to 1.64
This is required for openssl-src crate as it now uses functionality
first released in this version.

See: https://github.com/alexcrichton/openssl-src-rs/pull/184

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-06-06 17:34:22 +01:00
Rob Bradford
ca96ff601b build: Migrate from DockerHub to ghcr
It is necessary to transition away from DockerHub as the small
organisation plan in being EOLed.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-03-15 22:41:23 +00:00
Bo Chen
85962099c7 build: Update development container and release action to Rust 1.67
This latest stable Rust toolchain can help reduce the final binary size
around ~300k when comparing with building with Rust 1.62. Specifically,
the binary size now is 3.3M (previously 3.6M) with default feature, and
4.0M (previously 4.2M) with "kvm+mshv" feature (e.g. our release action
build) .

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-03-01 15:16:23 +00:00
Rob Bradford
7ceb126184 github: Build examples as well as tests in quality workflow
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-02-16 09:59:14 -08:00
Rob Bradford
8b9da4e286 build: Bump MSRV to 1.62
Needed for #[derive(Default)] on enums which is now clippy checked in
1.68.

Fixes: #5140

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-26 13:05:23 +00:00
Rob Bradford
f6c058da56 .github: Don't try and create releases for created branches
Dependabot will create a branch on the repo for it's updates this
triggers the release action (because it's the same event as a tag) which
will then fail leading to dependabot PRs not being automerged. Instead
only run the release check test on PRs or tag creation.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-20 09:58:53 +00:00
Rob Bradford
6e9172bf6f .github: Re-order release steps to ensure binaries are available
Since we run "cargo clean" before running the aarch64 build we need to
create the release and upload the x86-64 assets before the clean.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-14 12:12:11 +00:00
Rob Bradford
547230bb77 .github: Clean source tree before cross building release assets
This address issues with leaking symbols into the cross build.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-13 16:44:59 +00:00
Rob Bradford
ef7e177df2 .github: Run release style builds on all PRs
Adjust the release workflow to move the conditional check on the tag
creation into the steps that create the release/upload the assets.

This allows us to ensure we're always in a releaseable state.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-13 14:38:15 +00:00
Rob Bradford
a1c6ef8385 .github: Add musl variants to quality (clippy) checks
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-12-07 17:50:48 +00:00