commit | de94a5c7f2d6040b579f8ea3931ea1872ee029e2 | [log] [tgz] |
---|---|---|
author | Vignesh Venkat <vigneshv@google.com> | Mon Feb 26 22:51:29 2024 |
committer | Vignesh Venkatasubramanian <vigneshvg@users.noreply.github.com> | Tue Feb 27 17:06:54 2024 |
tree | b0ae226912606399bdf83c546009139d5587be6b | |
parent | 80a4e98db76314254390d737d0cec026a34ea994 [diff] |
ci: Ensure that avif.h is kept up to date This file is used by C/C++ libraries that need to depend on CrabbyAvif. It is generated by using cbindgen and is checked into the repository so that apps that don't use the cargo build system do not have to build it separately. This CI makes sure that the header file is in sync with any changes to the rust code.
Avif parser/decoder implementation in Rust.
git clone https://github.com/webmproject/CrabbyAvif.git # If dav1d system library can be found with pkg-config, this step can be skipped. cd CrabbyAvif/sys/dav1d-sys ./dav1d.cmd # If libyuv system library can be found with pkg-config, this step can be skipped. cd ../libyuv-sys ./libyuv.cmd cd ../.. cargo build
cargo test -- --skip test_conformance
git clone https://github.com/AOMediaCodec/av1-avif.git third_party/av1-avif git clone https://github.com/AOMediaCodec/libavif.git third_party/libavif cd third_party/libavif/ext ./dav1d.cmd cd .. cmake -S . -B build -DAVIF_CODEC_DAV1D=LOCAL -DAVIF_LIBYUV=OFF -DAVIF_BUILD_APPS=ON cmake --build build --parallel -t avifdec cd ../.. cargo test -- test_conformance
# Build google test cd third_party ./googletest.cmd cd .. # Build the library with C API enabled cargo build --features capi --release # Build and run the C/C++ Tests mkdir c_build cd c_build cmake ../c_api_tests/ make make test
The decoder tests can be run on Android using dinghy.
# One time set up cargo install cargo-dinghy # Set path to NDK export ANDROID_NDK_HOME=<path_to_ndk> # Install rust toolchain for target rustup target add aarch64-linux-android # End of One time set up # Make sure the device/emulator is available via adb. cargo dinghy -d android test --no-default-features --features android_mediacodec,libyuv --target aarch64-linux-android --test decoder_tests