mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 12:13:27 +00:00
[ENG-748] Fix cache factory and libheif on Windows (#950)
* Attempt to fix cache factory * Fix macOS/Windows failing to find libheif - Some clippy changes * Discard changes to core/src/p2p/p2p_manager.rs * Attempt fix libheif.lib not being built for windows * Added missing libde265 to ffmpeg-windows Dockerfile - Build .lib file for libheif to fix compilation failing in windows * Remove borked cmake option from libheif build script * Fix .lib name * Remove incorrect build option for libheif * Add cargo to cache factory * Cache factory is working, disable it on pull_request
This commit is contained in:
parent
3198a9bdb6
commit
2d6228115c
6
.github/scripts/ffmpeg-windows/Dockerfile
vendored
6
.github/scripts/ffmpeg-windows/Dockerfile
vendored
|
@ -90,6 +90,10 @@ FROM layer-45 AS layer-50-kvazaar
|
|||
|
||||
RUN --mount=src=scripts.d/50-kvazaar.sh,dst=/stage.sh run_stage /stage.sh
|
||||
|
||||
FROM layer-45 AS layer-50-libde265
|
||||
|
||||
RUN --mount=src=scripts.d/50-libde265.sh,dst=/stage.sh run_stage /stage.sh
|
||||
|
||||
FROM layer-45 AS layer-50-libjxl
|
||||
|
||||
RUN --mount=src=scripts.d/50-libjxl.sh,dst=/stage.sh run_stage /stage.sh
|
||||
|
@ -173,6 +177,8 @@ COPY --from=layer-50-ffnvcodec $FFBUILD_PREFIX/. $FFBUILD_PREFIX
|
|||
|
||||
COPY --from=layer-50-kvazaar $FFBUILD_PREFIX/. $FFBUILD_PREFIX
|
||||
|
||||
COPY --from=layer-50-libde265 $FFBUILD_PREFIX/. $FFBUILD_PREFIX
|
||||
|
||||
COPY --from=layer-50-libjxl $FFBUILD_PREFIX/. $FFBUILD_PREFIX
|
||||
|
||||
COPY --from=layer-50-libmp3lame $FFBUILD_PREFIX/. $FFBUILD_PREFIX
|
||||
|
|
|
@ -12,26 +12,37 @@ ffbuild_dockerbuild() {
|
|||
|
||||
cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX='/opt/dlls' \
|
||||
-DCMAKE_INSTALL_BINDIR='/opt/dlls/bin' \
|
||||
-DCMAKE_INSTALL_LIBDIR='/opt/dlls/lib' \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DWITH_EXAMPLES=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DWITH_X265=ON \
|
||||
-DWITH_X265_PLUGIN=OFF \
|
||||
-DWITH_DAV1D=ON \
|
||||
-DWITH_DAV1D_PLUGIN=OFF \
|
||||
-DWITH_RAV1E=ON \
|
||||
-DWITH_RAV1E_PLUGIN=OFF \
|
||||
-DWITH_LIBDE265=ON \
|
||||
-DWITH_LIBDE265_PLUGIN=OFF \
|
||||
-DWITH_LIBSHARPYUV=ON \
|
||||
-DWITH_FUZZERS=OFF \
|
||||
-DWITH_EXAMPLES=OFF \
|
||||
-DWITH_UNCOMPRESSED_CODEC=ON \
|
||||
-DWITH_REDUCED_VISIBILITY=ON \
|
||||
-DWITH_DEFLATE_HEADER_COMPRESSION=ON \
|
||||
-DWITH_AOM_DECODER_PLUGIN=OFF \
|
||||
-DWITH_AOM_ENCODER_PLUGIN=OFF \
|
||||
-DWITH_DAV1D_PLUGIN=OFF \
|
||||
-DWITH_LIBDE265_PLUGIN=OFF \
|
||||
-DWITH_RAV1E_PLUGIN=OFF \
|
||||
-DWITH_SvtEnc_PLUGIN=OFF \
|
||||
-DWITH_X265_PLUGIN=OFF \
|
||||
-DENABLE_PLUGIN_LOADING=OFF \
|
||||
-DENABLE_MULTITHREADING_SUPPORT=ON \
|
||||
..
|
||||
|
||||
ninja -j"$(nproc)"
|
||||
ninja install
|
||||
|
||||
cd /opt/dlls/bin
|
||||
|
||||
"${FFBUILD_CROSS_PREFIX}gendef" libheif.dll
|
||||
|
||||
"${FFBUILD_CROSS_PREFIX}dlltool" -m i386:x86-64 -d libheif.def -l heif.lib -D libheif.dll
|
||||
}
|
||||
|
|
2
.github/scripts/setup-system.ps1
vendored
2
.github/scripts/setup-system.ps1
vendored
|
@ -400,7 +400,7 @@ if ($success -ne 'yes') {
|
|||
"FFMPEG_DIR = `"$("$projectRoot\target\Frameworks" -replace '\\', '\\')`"",
|
||||
'',
|
||||
'[target.x86_64-pc-windows-msvc]',
|
||||
"rustflags = [`"-L $("$projectRoot\target\Frameworks\lib" -replace '\\', '\\')`"]",
|
||||
"rustflags = [`"-L`", `"$("$projectRoot\target\Frameworks\lib" -replace '\\', '\\')`"]",
|
||||
'',
|
||||
(Get-Content "$projectRoot\.cargo\config.toml" -Encoding utf8)
|
||||
) | Out-File -Force -Encoding utf8 -FilePath "$projectRoot\.cargo\config"
|
||||
|
|
4
.github/scripts/setup-system.sh
vendored
4
.github/scripts/setup-system.sh
vendored
|
@ -408,10 +408,10 @@ PROTOC = "${_frameworks_dir}/bin/protoc"
|
|||
FFMPEG_DIR = "${_frameworks_dir}"
|
||||
|
||||
[target.aarch64-apple-darwin]
|
||||
rustflags = ["-L ${_frameworks_dir}/lib"]
|
||||
rustflags = ["-L", "${_frameworks_dir}/lib"]
|
||||
|
||||
[target.x86_64-apple-darwin]
|
||||
rustflags = ["-L ${_frameworks_dir}/lib"]
|
||||
rustflags = ["-L", "${_frameworks_dir}/lib"]
|
||||
|
||||
$(cat "${_cargo_config}/config.toml")
|
||||
EOF
|
||||
|
|
7
.github/workflows/cache-factory.yaml
vendored
7
.github/workflows/cache-factory.yaml
vendored
|
@ -59,8 +59,11 @@ jobs:
|
|||
targets: ${{ matrix.settings.target }}
|
||||
save-cache: 'true'
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --workspace --all-features --target ${{ matrix.settings.target }}
|
||||
|
||||
- name: Compile (debug)
|
||||
run: cargo test --workspace --all-features --no-run
|
||||
run: cargo test --workspace --all-features --no-run --target ${{ matrix.settings.target }}
|
||||
|
||||
- name: Compile (release)
|
||||
run: cargo test --workspace --all-features --no-run --release
|
||||
run: cargo test --workspace --all-features --no-run --release --target ${{ matrix.settings.target }}
|
||||
|
|
Loading…
Reference in a new issue