Skip to content

Conversation

tjones60
Copy link
Contributor

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

@tjones60 tjones60 requested review from a team as code owners July 28, 2025 22:24
@benhillis
Copy link
Member

benhillis commented Jul 28, 2025

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.

@benhillis benhillis requested a review from Copilot August 5, 2025 17:34
Copy link
Contributor

@Copilot Copilot AI left a 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
Copy link
Preview

Copilot AI Aug 5, 2025

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.

Suggested change
//! Download a github release artifact
//! Publish (create) a GitHub release

Copilot uses AI. Check for mistakes.

Comment on lines +77 to +78
self.openhcl_igvm_files_x64.map(ctx, |x| x.join("*")),
self.openhcl_igvm_files_aarch64.map(ctx, |x| x.join("*")),
Copy link
Preview

Copilot AI Aug 5, 2025

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.

Suggested change
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.

Comment on lines +77 to +79
self.openhcl_igvm_files_x64.map(ctx, |x| x.join("*")),
self.openhcl_igvm_files_aarch64.map(ctx, |x| x.join("*")),
]
Copy link
Preview

Copilot AI Aug 5, 2025

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.

Suggested change
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);
Copy link
Preview

Copilot AI Aug 5, 2025

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 ='.

Suggested change
let files= files.claim(ctx);
let files = files.claim(ctx);

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants