Establish release CI matrix (#99)
Some checks failed
Native code generation / deterministic (push) Failing after 2m4s
Imaging and meshing gate / native (push) Successful in 6m35s
JPEG 2000 feature / linux (push) Successful in 2m45s
Release platform and feature matrix / audit (push) Successful in 34s
Native Rust workspace compile / compile (push) Failing after 56s
Skia feature / linux (push) Successful in 30m55s
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled

This commit is contained in:
2026-08-11 22:12:31 +00:00
parent a9e2711447
commit 9779e50ce9
15 changed files with 1194 additions and 23 deletions

View File

@@ -1,7 +1,10 @@
use crate::assets::{AssetMesh, AssetMutable, AssetSound, AssetTexture};
#[cfg(feature = "jpeg2000")]
use crate::assets::AssetTexture;
use crate::assets::{AssetMesh, AssetMutable, AssetSound};
use crate::{
AssetCache, AssetCacheComputeAssetCacheFilenameDelegate, Error, GridClient, ImageCodec,
};
#[cfg(feature = "jpeg2000")]
use libremetaverse_imaging::{ManagedImage, ManagedImageImageChannels};
use libremetaverse_types::{AssetType, UUID};
use std::fs;
@@ -33,10 +36,28 @@ fn asset_models_retain_type_and_reject_malformed_meshes() {
}
#[test]
fn sound_and_texture_codecs_produce_real_valid_payloads() {
#[cfg(feature = "vorbis")]
fn sound_codec_produces_real_valid_payload() {
let ogg = AssetSound::pcm_to_ogg(vec![0_u8; 256 * 2], 44_100, 1, Some(16)).unwrap();
assert!(ogg.starts_with(b"OggS"));
}
#[test]
#[cfg(not(feature = "vorbis"))]
fn sound_codec_is_explicitly_feature_gated() {
assert_eq!(
AssetSound::pcm_to_ogg(vec![0_u8; 256 * 2], 44_100, 1, Some(16)),
Err(Error::InvalidOperation)
);
assert_eq!(
AssetSound::pcm_to_ogg(Vec::new(), 44_100, 1, Some(16)),
Err(Error::Argument)
);
}
#[test]
#[cfg(feature = "jpeg2000")]
fn texture_codec_produces_real_valid_payload() {
let mut image = ManagedImage::new(2, 2, ManagedImageImageChannels::COLOR).unwrap();
image.red.fill(255);
let texture = AssetTexture::new_with_managed_image(image).unwrap();