diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.yml index 9cfbb11831e2..28fa36981347 100644 --- a/.github/workflows/release_nightly.yml +++ b/.github/workflows/release_nightly.yml @@ -76,23 +76,25 @@ jobs: os: macos-latest target: x86_64-apple-darwin MACOSX_DEPLOYMENT_TARGET: 10.7 - DESKTOP_FEATURES: sandbox + DESKTOP_FEATURES: sandbox,jpegxr - build_name: macos-aarch64 os: macos-latest target: aarch64-apple-darwin MACOSX_DEPLOYMENT_TARGET: 11.0 - DESKTOP_FEATURES: sandbox + DESKTOP_FEATURES: sandbox,jpegxr - build_name: windows-x86_32 os: windows-latest target: i686-pc-windows-msvc RUSTFLAGS: -Ctarget-feature=+crt-static + DESKTOP_FEATURES: jpegxr - build_name: windows-x86_64 os: windows-latest target: x86_64-pc-windows-msvc RUSTFLAGS: -Ctarget-feature=+crt-static + DESKTOP_FEATURES: jpegxr env: PACKAGE_FILE: ${{ needs.create-nightly-release.outputs.package_prefix }}-${{ matrix.build_name }}.${{ startsWith(matrix.build_name, 'win') && 'zip' || 'tar.gz' }} diff --git a/.github/workflows/test_rust.yml b/.github/workflows/test_rust.yml index 20d3b80afe7c..264e34a3db20 100644 --- a/.github/workflows/test_rust.yml +++ b/.github/workflows/test_rust.yml @@ -82,7 +82,7 @@ jobs: RUSTDOCFLAGS: -D warnings - name: Run tests with image tests - run: cargo test --all --locked --features imgtests,lzma + run: cargo test --all --locked --features imgtests,lzma,jpegxr env: XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml index 3b98968e436c..999f91755b87 100644 --- a/desktop/Cargo.toml +++ b/desktop/Cargo.toml @@ -53,7 +53,8 @@ embed-resource = "2" vergen = { version = "8.2.5", features = ["build", "git", "gitcl", "cargo"] } [features] -default = ["software_video", "ruffle_core/jpegxr"] +default = ["software_video"] +jpegxr = ["ruffle_core/jpegxr"] # core features avm_debug = ["ruffle_core/avm_debug"] diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 7b122396e680..578392634012 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -23,7 +23,8 @@ url = "2.4.1" # Enable running image comparison tests. This is off by default, # since the images we compare against are generated on CI, and may # not match your local machine's Vulkan version / image output. -imgtests = ["ruffle_video_software", "ruffle_core/jpegxr"] +imgtests = ["ruffle_video_software"] +jpegxr = ["ruffle_core/jpegxr"] lzma = ["ruffle_core/lzma"] [dev-dependencies] diff --git a/tests/README.md b/tests/README.md index cba63f9ec3c9..e772a5d9e4f7 100644 --- a/tests/README.md +++ b/tests/README.md @@ -51,6 +51,7 @@ trigger = "last_frame" # When to trigger this capture. Options are last_frame (d # Which build features are required for this test to run. [required_features] lzma = false # If LZMA support is enabled in this build +jpegxr = false # If JPEG XR support is enabled in this build ``` ## Frame-based tests diff --git a/tests/tests/swfs/avm2/stage3d_texture_bytearray/test.toml b/tests/tests/swfs/avm2/stage3d_texture_bytearray/test.toml index 4f58da2ea1ab..e17c8d960f61 100644 --- a/tests/tests/swfs/avm2/stage3d_texture_bytearray/test.toml +++ b/tests/tests/swfs/avm2/stage3d_texture_bytearray/test.toml @@ -4,4 +4,7 @@ num_frames = 1 tolerance = 2 [player_options] -with_renderer = { optional = true, sample_count = 1 } \ No newline at end of file +with_renderer = { optional = true, sample_count = 1 } + +[required_features] +jpegxr = true \ No newline at end of file diff --git a/tests/tests/util/options.rs b/tests/tests/util/options.rs index 38229a555236..b18b607e9f0f 100644 --- a/tests/tests/util/options.rs +++ b/tests/tests/util/options.rs @@ -117,11 +117,12 @@ impl Approximations { #[serde(default, deny_unknown_fields)] pub struct RequiredFeatures { lzma: bool, + jpegxr: bool, } impl RequiredFeatures { pub fn can_run(&self) -> bool { - !self.lzma || cfg!(feature = "lzma") + (!self.lzma || cfg!(feature = "lzma")) && (!self.jpegxr || cfg!(feature = "jpegxr")) } }