You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make each native codec and direction a Cargo feature, so an application builds only the codecs it uses (issue #635). The zvidlib crate depended on every codec crate unconditionally, so a consumer that needed VP9 decoding alone still compiled and linked every encoder and decoder. av1-decoder, av1-encoder, vp8-decoder, vp8-encoder, vp9-decoder, vp9-encoder, hevc-decoder, hevc-encoder, opus-decoder, opus-encoder, vorbis-decoder, vorbis-encoder, aac-decoder and aac-encoder each build one direction of one codec; av1, vp8, vp9, hevc, opus, vorbis and aac build both directions of a codec, and all builds every one. A new hardware feature builds the NVDEC, Media Foundation and VideoToolbox backends of whichever enabled codecs have one; without it HardwarePreference::Require reports HardwareUnavailable. The default features are all and hardware, so a plain zvidlib dependency builds exactly what it did and its public API is unchanged; default-features = false with, for example, features = ["vp9-decoder"] builds the VP9 decoder and nothing else. Three internal crates make that possible: zvidlib-opus-syntax and zvidlib-vorbis-syntax hold the Opus and Vorbis configuration records the containers read and write, which lived in the codec crates, and zvidlib-hevc holds the HEVC engine the encoder shares with the decoder, so the HEVC encoder no longer builds the decoder crate. The --no-default-features --features web the browser build documented now turns every codec off; build with --features web instead, as the README, the examples and the release workflow now do.
The README's "Using a release" section no longer names a specific version, so it can no longer fall behind a release (issue #641). Its crates.io dependency takes the latest version from crates.io, the Git-tag dependency and .crate archive use an X.Y.Z placeholder, and the browser package points to the latest GitHub release's zvidlib-web-vX.Y.Z.tgz asset. The release version is written only in Cargo.toml, Cargo.lock and CHANGELOG.md, and tests/ci_version_lives_in_cargo_toml.rs fails, naming each file and line, if it appears anywhere else.
Release from the Actions tab instead of by hand (issue #643). The new Release workflow takes a major, minor or patch level, or an explicit X.Y.Z version, sets the workspace version and every =X.Y.Z pin in Cargo.toml, promotes ## Unreleased in CHANGELOG.md to ## X.Y.Z - <date> under a new empty ## Unreleased, pushes that commit and the vX.Y.Z tag to main, and starts Finalize release on the tag. Finalize release, which also runs when a v* tag is pushed by hand or when it is dispatched with a tag, does what the tag-triggered release workflow did: it checks every package is at the tag's version, packages the crates and the browser package, and publishes the crates to crates.io. The GitHub release now takes its notes from the tag's changelog section rather than generated notes, and a re-run on a release that already exists uploads its assets again instead of failing. Re-running Release for a version already prepared and tagged only starts Finalize release again.
Publish the crates to crates.io one at a time, paced to crates.io's rate limits, so a release of many new crates no longer fails with 429 Too Many Requests (issue #637). The release workflow uploaded every crate in one cargo publish --workspace call, and crates.io allows an account only five new crates at once and then one every ten minutes, so the v0.4.0 release failed partway through on every attempt and never created its GitHub release. .github/scripts/publish_crates.py now publishes each crate with cargo publish --package in dependency order, waits before an upload that crates.io's limits would refuse, and answers a 429 by waiting until the time crates.io names and retrying the same crate. New versions of crates already on crates.io are allowed thirty at once, so a release of the existing crates is not slowed down. Every upload, skipped crate and wait is logged, a wait with the crate it is for and when it ends, and the step may run for up to four hours. A crate already on crates.io at the tag's version is still skipped, so a re-run resumes where the last one stopped.
CI no longer hangs for hours when an apt mirror stalls (issue #647). Every workflow step that installs Ubuntu packages, such as the Rust tests (<package>) jobs' libasound2 and ffmpeg install, now runs .github/scripts/apt_install.py, which has apt retry failed downloads and drop silent connections, kills an apt-get update or apt-get install that runs for more than four minutes, and retries the whole install up to three times, finishing any install it interrupted first and fetching from the runner's next mirror instead of its first. Packages are installed without their recommendations, and the Rust tests (<package>) jobs install ffmpeg only for the nine packages whose tests run ffmpeg or ffprobe, rather than downloading its hundred packages for every package. Each of those steps also stops after 15 minutes, so an install that never succeeds fails its job instead of holding the run until the 6-hour job limit.