Prove clean native release artifacts (#106)
Some checks failed
API and SemVer surface / api-surface (push) Failing after 1m28s
Native release artifact audit / audit (push) Failing after 1h6m34s
Native code generation / deterministic (push) Failing after 2m15s
Concurrency and resource soak audit / soak (push) Failing after 6m33s
Documentation / documentation (push) Failing after 2m0s
Imaging and meshing gate / native (push) Failing after 55s
JPEG 2000 feature / linux (push) Successful in 2m46s
performance evidence / audit (push) Failing after 13m45s
Release platform and feature matrix / audit (push) Successful in 1m3s
Native Rust workspace compile / compile (push) Failing after 55s
Skia feature / linux (push) Successful in 31m58s
Dependency and supply-chain audit / audit (push) Failing after 9m34s
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Failing after 10m2s
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Failing after 2m0s
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Failing after 1m56s
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Failing after 6m19s
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Failing after 6m57s
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Failing after 7m6s
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Failing after 8m8s
Some checks failed
API and SemVer surface / api-surface (push) Failing after 1m28s
Native release artifact audit / audit (push) Failing after 1h6m34s
Native code generation / deterministic (push) Failing after 2m15s
Concurrency and resource soak audit / soak (push) Failing after 6m33s
Documentation / documentation (push) Failing after 2m0s
Imaging and meshing gate / native (push) Failing after 55s
JPEG 2000 feature / linux (push) Successful in 2m46s
performance evidence / audit (push) Failing after 13m45s
Release platform and feature matrix / audit (push) Successful in 1m3s
Native Rust workspace compile / compile (push) Failing after 55s
Skia feature / linux (push) Successful in 31m58s
Dependency and supply-chain audit / audit (push) Failing after 9m34s
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Failing after 10m2s
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Failing after 2m0s
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Failing after 1m56s
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Failing after 6m19s
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Failing after 6m57s
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Failing after 7m6s
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Failing after 8m8s
This commit is contained in:
1145
tools/ci-matrix/src/artifact.rs
Normal file
1145
tools/ci-matrix/src/artifact.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,8 @@ use std::path::{Path, PathBuf};
|
||||
const MAPPING_PATH: &str = "api/RUST-MAPPING.tsv";
|
||||
const TYPES_PATH: &str = "api/RUST-TYPES.tsv";
|
||||
const GUIDE_PATH: &str = "docs/rust-api-guide.md";
|
||||
const CORE_GUIDE_MIRROR: &str = "crates/libremetaverse/README.md";
|
||||
const REPOSITORY_CONTENT_ROOT: &str = "https://git.rfc1437.de/hugo/MetaCrate/src/branch/main/";
|
||||
const REPORT_PATH: &str = "api/DOCUMENTATION-COVERAGE.md";
|
||||
const UPSTREAM_COMMIT: &str = "2aa70bb68513b39795da5d13c88f31b86e85a3ba";
|
||||
|
||||
@@ -234,14 +236,46 @@ fn validate_crates(root: &Path) -> Result<()> {
|
||||
}
|
||||
}
|
||||
let core = fs::read_to_string(root.join("crates/libremetaverse/src/lib.rs"))?;
|
||||
if !core.contains("include_str!(\"../../../docs/rust-api-guide.md\")") {
|
||||
if !core.contains("include_str!(\"../README.md\")") {
|
||||
return Err(MatrixError::new(
|
||||
"the tested Rust API guide is not included in libremetaverse rustdoc",
|
||||
));
|
||||
}
|
||||
let guide = fs::read_to_string(root.join(GUIDE_PATH))?;
|
||||
let packaged_guide = fs::read_to_string(root.join(CORE_GUIDE_MIRROR))?;
|
||||
if package_guide_links(&guide) != packaged_guide {
|
||||
return Err(MatrixError::new(
|
||||
"the packaged libremetaverse rustdoc guide is not the deterministic repository-link form of the tested guide",
|
||||
));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn package_guide_links(guide: &str) -> String {
|
||||
guide
|
||||
.replace("(../api/", &format!("({REPOSITORY_CONTENT_ROOT}api/"))
|
||||
.replace(
|
||||
"(release-ci-matrix.md",
|
||||
&format!("({REPOSITORY_CONTENT_ROOT}docs/release-ci-matrix.md"),
|
||||
)
|
||||
.replace(
|
||||
"(../crates/libremetaverse/examples/",
|
||||
&format!("({REPOSITORY_CONTENT_ROOT}crates/libremetaverse/examples/"),
|
||||
)
|
||||
.replace(
|
||||
"(concurrency-hardening.md",
|
||||
&format!("({REPOSITORY_CONTENT_ROOT}docs/concurrency-hardening.md"),
|
||||
)
|
||||
.replace(
|
||||
"(live-grid-smoke.md",
|
||||
&format!("({REPOSITORY_CONTENT_ROOT}docs/live-grid-smoke.md"),
|
||||
)
|
||||
.replace(
|
||||
"(../programs/README.md",
|
||||
&format!("({REPOSITORY_CONTENT_ROOT}programs/README.md"),
|
||||
)
|
||||
}
|
||||
|
||||
fn validate_guide(guide: &str) -> Result<()> {
|
||||
if !guide.contains("https://github.com/cinderblocks/libremetaverse")
|
||||
|| !guide.contains(UPSTREAM_COMMIT)
|
||||
|
||||
@@ -12,11 +12,13 @@ use std::process::{Command, ExitStatus, Stdio};
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
mod api_surface;
|
||||
mod artifact;
|
||||
mod dependency;
|
||||
mod documentation;
|
||||
mod provenance;
|
||||
|
||||
pub use api_surface::{audit_api_surface, write_api_baseline};
|
||||
pub use artifact::audit_artifacts;
|
||||
pub use dependency::audit_dependencies;
|
||||
pub use documentation::{audit_documentation, write_documentation_report};
|
||||
pub use provenance::{audit_provenance, write_provenance_reports};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use metacrate_ci_matrix::{
|
||||
audit, audit_api_surface, audit_dependencies, audit_documentation, audit_provenance, load, run,
|
||||
workspace_root, write_api_baseline, write_documentation_report, write_provenance_reports,
|
||||
audit, audit_api_surface, audit_artifacts, audit_dependencies, audit_documentation,
|
||||
audit_provenance, load, run, workspace_root, write_api_baseline, write_documentation_report,
|
||||
write_provenance_reports,
|
||||
};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
@@ -49,6 +50,9 @@ fn execute() -> Result<(), Box<dyn std::error::Error>> {
|
||||
audit_dependencies(&root, &evidence)?;
|
||||
println!("dependency policy: ok ({})", evidence.display());
|
||||
}
|
||||
Some("artifact-audit") => {
|
||||
artifact_audit_command(&root, arguments)?;
|
||||
}
|
||||
Some("documentation-report") if arguments.next().is_none() => {
|
||||
write_documentation_report(&root)?;
|
||||
println!("documentation coverage report: updated");
|
||||
@@ -94,7 +98,7 @@ fn execute() -> Result<(), Box<dyn std::error::Error>> {
|
||||
}
|
||||
_ => {
|
||||
return Err(
|
||||
"usage: ci-matrix audit | run PROFILE --evidence FILE | dependency-audit --evidence FILE | documentation-report | documentation-audit --evidence FILE | api-baseline-write | api-audit --evidence FILE | provenance-report | provenance-audit --evidence FILE"
|
||||
"usage: ci-matrix audit | run PROFILE --evidence FILE | dependency-audit --evidence FILE | artifact-audit --artifact-dir DIR --package-dir DIR --evidence FILE | documentation-report | documentation-audit --evidence FILE | api-baseline-write | api-audit --evidence FILE | provenance-report | provenance-audit --evidence FILE"
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
@@ -102,6 +106,42 @@ fn execute() -> Result<(), Box<dyn std::error::Error>> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn artifact_audit_command(
|
||||
root: &Path,
|
||||
mut arguments: impl Iterator<Item = String>,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let artifact_dir = option(&mut arguments, "--artifact-dir")?;
|
||||
let package_dir = option(&mut arguments, "--package-dir")?;
|
||||
let evidence = option(&mut arguments, "--evidence")?;
|
||||
if arguments.next().is_some() {
|
||||
return Err(
|
||||
"usage: ci-matrix artifact-audit --artifact-dir DIR --package-dir DIR --evidence FILE"
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
let artifact_dir = absolute_or_rooted(root, &artifact_dir);
|
||||
let package_dir = absolute_or_rooted(root, &package_dir);
|
||||
let evidence = absolute_or_rooted(root, &evidence);
|
||||
audit_artifacts(root, &artifact_dir, &package_dir, &evidence)?;
|
||||
println!("native release artifacts: ok ({})", evidence.display());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn option(
|
||||
arguments: &mut impl Iterator<Item = String>,
|
||||
expected: &str,
|
||||
) -> Result<String, Box<dyn std::error::Error>> {
|
||||
let flag = arguments
|
||||
.next()
|
||||
.ok_or_else(|| format!("missing {expected}"))?;
|
||||
if flag != expected {
|
||||
return Err(format!("expected {expected}, found {flag}").into());
|
||||
}
|
||||
arguments
|
||||
.next()
|
||||
.ok_or_else(|| format!("missing value for {expected}").into())
|
||||
}
|
||||
|
||||
fn provenance_audit_command(
|
||||
root: &Path,
|
||||
mut arguments: impl Iterator<Item = String>,
|
||||
|
||||
@@ -22,11 +22,12 @@ const GENERATED_RELEASE_PATHS: [&str; 4] = [
|
||||
NATIVE_NOTICE_PATH,
|
||||
DISTRIBUTION_MANIFEST_PATH,
|
||||
];
|
||||
const MATERIAL_ROOTS: [&str; 4] = [
|
||||
const MATERIAL_ROOTS: [&str; 5] = [
|
||||
"codegen/inputs",
|
||||
"tests/fixtures",
|
||||
"fuzz/corpus",
|
||||
"benchmarks/fixtures",
|
||||
"crates/libremetaverse/assets",
|
||||
];
|
||||
const BUNDLED_EXTENSIONS: [&str; 18] = [
|
||||
"a", "animatn", "bmp", "bodypart", "clothing", "dll", "dylib", "gesture", "gif", "jpeg", "jpg",
|
||||
|
||||
Reference in New Issue
Block a user