-
Notifications
You must be signed in to change notification settings - Fork 138
wip: flowey: publish openvmm and openhcl via github release #1774
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
base: main
Are you sure you want to change the base?
Conversation
What are your thoughts about when a release will be updated? I think we definitely don't want one per commit one main, maybe something tag-based? I just worry if we publish a release for every commit it's going to get very big very quickly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements GitHub release publishing functionality for OpenVMM and OpenHCL through the flowey build system. The changes add the necessary infrastructure to automatically create GitHub releases with binaries and IGVM files.
Key changes:
- Adds a new
publish_gh_release
common flowey node for creating GitHub releases - Implements OpenVMM-specific release publishing logic that packages Windows/Linux binaries and IGVM files
- Integrates the release publishing into the CI pipeline to run after all build jobs complete
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
flowey/flowey_lib_common/src/publish_gh_release.rs |
New generic GitHub release publishing node using GitHub CLI |
flowey/flowey_lib_hvlite/src/_jobs/publish_openvmm_gh_release.rs |
OpenVMM-specific release publishing job that collects artifacts and creates releases |
flowey/flowey_hvlite/src/pipelines/checkin_gates.rs |
Integration of release publishing into CI pipeline with artifact collection |
flowey/flowey_core/src/node/github_context.rs |
Additional GitHub context variables for release creation |
.github/workflows/openvmm-ci.yaml |
Generated CI workflow with new release publishing job |
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
//! Download a github release artifact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module comment incorrectly states 'Download a github release artifact' but this module is for publishing/creating releases, not downloading them.
//! Download a github release artifact | |
//! Publish (create) a GitHub release |
Copilot uses AI. Check for mistakes.
self.openhcl_igvm_files_x64.map(ctx, |x| x.join("*")), | ||
self.openhcl_igvm_files_aarch64.map(ctx, |x| x.join("*")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using wildcard '' in path construction with join()
creates a literal path component '', not a glob pattern. This will likely cause the file upload to fail as the path won't exist.
self.openhcl_igvm_files_x64.map(ctx, |x| x.join("*")), | |
self.openhcl_igvm_files_aarch64.map(ctx, |x| x.join("*")), | |
{ | |
let dir = self.openhcl_igvm_files_x64.get(ctx); | |
let mut files = Vec::new(); | |
if let Ok(entries) = std::fs::read_dir(&dir) { | |
for entry in entries.flatten() { | |
let path = entry.path(); | |
if path.is_file() { | |
files.push(ReadVar::from_path(path)); | |
} | |
} | |
} | |
files | |
}, | |
{ | |
let dir = self.openhcl_igvm_files_aarch64.get(ctx); | |
let mut files = Vec::new(); | |
if let Ok(entries) = std::fs::read_dir(&dir) { | |
for entry in entries.flatten() { | |
let path = entry.path(); | |
if path.is_file() { | |
files.push(ReadVar::from_path(path)); | |
} | |
} | |
} | |
files | |
}, |
Copilot uses AI. Check for mistakes.
self.openhcl_igvm_files_x64.map(ctx, |x| x.join("*")), | ||
self.openhcl_igvm_files_aarch64.map(ctx, |x| x.join("*")), | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using wildcard '' in path construction with join()
creates a literal path component '', not a glob pattern. This will likely cause the file upload to fail as the path won't exist.
self.openhcl_igvm_files_x64.map(ctx, |x| x.join("*")), | |
self.openhcl_igvm_files_aarch64.map(ctx, |x| x.join("*")), | |
] | |
// Collect all files in the x64 IGVM directory | |
{ | |
let dir = self.openhcl_igvm_files_x64.get(ctx); | |
match std::fs::read_dir(&dir) { | |
Ok(entries) => entries | |
.filter_map(|entry| entry.ok()) | |
.filter(|entry| entry.path().is_file()) | |
.map(|entry| ReadVar::from(entry.path())) | |
.collect::<Vec<_>>(), | |
Err(_) => vec![], | |
} | |
}, | |
// Collect all files in the aarch64 IGVM directory | |
{ | |
let dir = self.openhcl_igvm_files_aarch64.get(ctx); | |
match std::fs::read_dir(&dir) { | |
Ok(entries) => entries | |
.filter_map(|entry| entry.ok()) | |
.filter(|entry| entry.path().is_file()) | |
.map(|entry| ReadVar::from(entry.path())) | |
.collect::<Vec<_>>(), | |
Err(_) => vec![], | |
} | |
}, | |
{ | |
let dir = self.openhcl_igvm_files_x64.get(ctx); | |
match std::fs::read_dir(&dir) { | |
Ok(entries) => { | |
for entry in entries.filter_map(|e| e.ok()) { | |
if entry.path().is_file() { | |
paths.push(ReadVar::from(entry.path())); | |
} | |
} | |
} | |
Err(_) => {} | |
} | |
} | |
// Collect all files in the aarch64 IGVM directory | |
{ | |
let dir = self.openhcl_igvm_files_aarch64.get(ctx); | |
match std::fs::read_dir(&dir) { | |
Ok(entries) => { | |
for entry in entries.filter_map(|e| e.ok()) { | |
if entry.path().is_file() { | |
paths.push(ReadVar::from(entry.path())); | |
} | |
} | |
} | |
Err(_) => {} | |
} | |
} | |
paths |
Copilot uses AI. Check for mistakes.
let tag = tag.claim(ctx); | ||
let title = title.claim(ctx); | ||
let target = target.claim(ctx); | ||
let files= files.claim(ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space in variable assignment: 'files= ' should be 'files ='.
let files= files.claim(ctx); | |
let files = files.claim(ctx); |
Copilot uses AI. Check for mistakes.
Implements the necessary flowey code to publish a github release in flowey, and publishes a barebones release of OpenVMM and OpenHCL.
Note that this code still needs to be tested