From 79ca72b26f0138b571f80e1b245e2abfd2df69b0 Mon Sep 17 00:00:00 2001 From: askmeaboutloom Date: Tue, 30 Jul 2024 10:39:39 +0200 Subject: [PATCH] WIP libvpx --- .github/actions/build-deps/action.yml | 7 +- .github/scripts/build-ffmpeg.cmake | 80 ++- .github/scripts/cmake/BuildDependency.cmake | 20 +- .github/scripts/patches/libvpx_configure.diff | 128 +++++ .github/workflows/main.yml | 491 +++++++++--------- 5 files changed, 477 insertions(+), 249 deletions(-) create mode 100644 .github/scripts/patches/libvpx_configure.diff diff --git a/.github/actions/build-deps/action.yml b/.github/actions/build-deps/action.yml index 4762fb853a..64e0a8fed6 100644 --- a/.github/actions/build-deps/action.yml +++ b/.github/actions/build-deps/action.yml @@ -56,6 +56,10 @@ inputs: description: Commit of libx264 to build default: '31e19f92f00c7003fa115047ce50978bc98c3a0d' type: string + libvpx: + description: Version of libvpx to build + default: '1.14.1' + type: string ffmpeg: description: Version of ffmpeg to build default: '7.0.1' @@ -117,13 +121,14 @@ runs: - uses: ./.github/actions/build-and-cache with: name: ffmpeg dependencies - cache_key: ffmpeg-${{ inputs.cache_key }}-${{ inputs.libx264 }}-${{ inputs.ffmpeg }} + cache_key: ffmpeg-${{ inputs.cache_key }}-${{ inputs.libx264 }}-${{ inputs.libvpx }}-${{ inputs.ffmpeg }} path: ${{ inputs.path }}/ffmpeg pre_build: ${{ inputs.ffmpeg_pre_build }} build: > cmake -DBUILD_TYPE=${{ inputs.build_type }} "-DLIBX264=${{ inputs.libx264 }}" + "-DLIBVPX=${{ inputs.libvpx }}" "-DFFMPEG=${{ inputs.ffmpeg }}" "-DCMAKE_PREFIX_PATH=${{ github.workspace }}/${{ inputs.path }}/qt" "-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/${{ inputs.path }}/ffmpeg" diff --git a/.github/scripts/build-ffmpeg.cmake b/.github/scripts/build-ffmpeg.cmake index e6c61b002b..e3b4025006 100644 --- a/.github/scripts/build-ffmpeg.cmake +++ b/.github/scripts/build-ffmpeg.cmake @@ -8,6 +8,8 @@ list(APPEND CMAKE_MODULE_PATH set(LIBX264 "31e19f92f00c7003fa115047ce50978bc98c3a0d" CACHE STRING "The commit of libx264 to build") +set(LIBVPX "1.14.1" CACHE STRING + "The version of libvpx to build") set(FFMPEG "7.0.1" CACHE STRING "The version of ffmpeg to build") option(KEEP_ARCHIVES "Keep downloaded archives instead of deleting them" OFF) @@ -18,6 +20,73 @@ set(TARGET_ARCH "x86_64" CACHE STRING include(BuildDependency) +if(LIBVPX) + set(libvpx_configure_args + --disable-dependency-tracking + --disable-docs + --disable-examples + --disable-tools + --disable-unit-tests + --disable-vp8-decoder + --disable-vp9 + --enable-pic + --enable-vp8-encoder + ) + + if(APPLE) + if(TARGET_ARCH STREQUAL "arm64") + list(PREPEND libvpx_configure_args --target=arm64-darwin20-gcc) + elseif(TARGET_ARCH STREQUAL "x86_64") + list(PREPEND libvpx_configure_args --target=x86_64-darwin20-gcc) + else() + message(FATAL_ERROR "Unhandled TARGET_ARCH '${TARGET_ARCH}'") + endif() + elseif(ANDROID) + if(TARGET_ARCH STREQUAL "arm32") + list(PREPEND libvpx_configure_args --target=armv7-android-gcc) + elseif(TARGET_ARCH STREQUAL "arm64") + list(PREPEND libvpx_configure_args --target=arm64-android-gcc) + else() + message(FATAL_ERROR "Unhandled TARGET_ARCH '${TARGET_ARCH}'") + endif() + elseif(WIN32) + if(TARGET_ARCH STREQUAL "x86") + list(PREPEND libvpx_configure_args --target=x86-win32-vs17) + elseif(TARGET_ARCH STREQUAL "x86_64") + list(PREPEND libvpx_configure_args --target=x86_64-win64-vs17) + else() + message(FATAL_ERROR "Unhandled TARGET_ARCH '${TARGET_ARCH}'") + endif() + elseif(UNIX) + if(TARGET_ARCH STREQUAL "x86") + list(PREPEND libvpx_configure_args --target=x86-linux-gcc) + elseif(TARGET_ARCH STREQUAL "x86_64") + list(PREPEND libvpx_configure_args --target=x86_64-linux-gcc) + else() + message(FATAL_ERROR "Unhandled TARGET_ARCH '${TARGET_ARCH}'") + endif() + else() + message(FATAL_ERROR "Unknown platform") + endif() + + build_dependency(libvpx ${LIBVPX} ${BUILD_TYPE} + URL https://github.com/webmproject/libvpx/archive/refs/tags/v@version@.tar.gz + TARGET_ARCH "${TARGET_ARCH}" + VERSIONS + 1.14.1 + SHA384=42392dcae787ac556e66776a03bd064e0bb5795e7d763a6459edd2127e7ffae4aafe5c755d16ec4a4ab6e9785c27684c + ALL_PLATFORMS + AUTOMAKE + ASSIGN_PREFIX + QUIRKS libvpx + ALL + ${libvpx_configure_args} + PATCHES + ALL + patches/libvpx_configure.diff + ) +endif() + if(LIBX264) build_dependency(x264 ${LIBX264} ${BUILD_TYPE} URL https://code.videolan.org/videolan/x264/-/archive/@version@/x264-@version@.tar.gz @@ -45,6 +114,11 @@ endif() if(FFMPEG) set(ffmpeg_configure_args + # This referes to warnings in configure, not build warnings. Warnings + # include pretty important stuff like not including a requested encoder, + # so we want this to fail in that case so we actually notice instead of + # being left with an incomplete build. + --fatal-warnings --enable-gpl --enable-version3 --disable-doc @@ -69,6 +143,7 @@ if(FFMPEG) --disable-xlib --disable-zlib --enable-libx264 + --enable-libvpx --disable-encoders --disable-decoders --disable-muxers @@ -81,7 +156,9 @@ if(FFMPEG) --disable-devices --disable-filters --enable-encoder=libx264 + --enable-encoder=libvpx_vp8 --enable-muxer=mp4 + --enable-muxer=webm ) if(ANDROID) @@ -119,7 +196,8 @@ if(FFMPEG) SHA384=25650331f409bf7efc09f0d859ce9a1a8e16fe429e4f9b2593743eb68e723b186559739e8b02aac83c6e5c96137fec7e ALL_PLATFORMS AUTOMAKE - ASSIGN_PREFIX FFMPEG_QUIRKS + ASSIGN_PREFIX + QUIRKS ffmpeg PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" ALL ${ffmpeg_configure_args} PATCHES diff --git a/.github/scripts/cmake/BuildDependency.cmake b/.github/scripts/cmake/BuildDependency.cmake index 99e8a0130e..3eb371a3c2 100644 --- a/.github/scripts/cmake/BuildDependency.cmake +++ b/.github/scripts/cmake/BuildDependency.cmake @@ -140,8 +140,8 @@ endfunction() function(_build_automake build_type target_bits source_dir) set(configure "${source_dir}/configure") cmake_parse_arguments( - PARSE_ARGV 2 ARG "ASSIGN_HOST;ASSIGN_PREFIX;BROKEN_INSTALL;FFMPEG_QUIRKS;NEEDS_VC_WIN_TARGET;WIN32_CC_CL" - "INSTALL_TARGET;PKG_CONFIG_PATH;WIN32_CONFIGURE_COMMAND;WIN32_MAKE_COMMAND" "MAKE_FLAGS") + PARSE_ARGV 2 ARG "ASSIGN_HOST;ASSIGN_PREFIX;BROKEN_INSTALL;NEEDS_VC_WIN_TARGET;WIN32_CC_CL" + "INSTALL_TARGET;PKG_CONFIG_PATH;QUIRKS;WIN32_CONFIGURE_COMMAND;WIN32_MAKE_COMMAND" "MAKE_FLAGS") _parse_flags("${build_type}" "${source_dir}" configure configure_flags env ${ARG_UNPARSED_ARGUMENTS}) if(NPROCS EQUAL 0 OR WIN32) @@ -154,6 +154,8 @@ function(_build_automake build_type target_bits source_dir) list(APPEND make_flags ${ARG_MAKE_FLAGS}) endif() + list(APPEND make_flags V=1) + list(APPEND env "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") # https://developer.android.com/ndk/guides/other_build_systems#autoconf @@ -162,10 +164,16 @@ function(_build_automake build_type target_bits source_dir) android_env android_ffmpeg_flags abi "${CMAKE_ANDROID_NDK}" "${CMAKE_ANDROID_ARCH_ABI}" "${ANDROID_PLATFORM}") list(APPEND env ${android_env}) - # ffmpeg's build system looks like autoconf, but isn't actually - if(ARG_FFMPEG_QUIRKS) - list(APPEND configure_flags ${android_ffmpeg_flags}) - list(APPEND env "AS_FLAGS=--target=${abi}") + if(ARG_QUIRKS) + if(ARG_QUIRKS STREQUAL ffmpeg) + # ffmpeg's build system looks like autoconf, but isn't actually + list(APPEND configure_flags ${android_ffmpeg_flags}) + list(APPEND env "AS_FLAGS=--target=${abi}") + elseif(ARG_QUIRKS STREQUAL libvpx) + # dito for libvpx, but a different kind of weirdw + else() + message(FATAL_ERROR "Unknown QUIRKS: '${ARG_QUIRKS}'") + endif() else() if(ARG_ASSIGN_HOST) list(APPEND configure_flags "--host=${abi}") diff --git a/.github/scripts/patches/libvpx_configure.diff b/.github/scripts/patches/libvpx_configure.diff new file mode 100644 index 0000000000..05832eba17 --- /dev/null +++ b/.github/scripts/patches/libvpx_configure.diff @@ -0,0 +1,128 @@ +Description: libvpx doesn't generate pkg-config files on Windows, but we need +that for ffmpeg to find the library, so we patch that in. It also tries to +generation what I think are Visual Studio files, but they try to do so by +running shell scripts directly, which of course just triggers the brilliant +WSL mechanism telling you that it's not installed, so we patch that out in turn. +It also uses pkg-config's Libs.private mechanism, which ffmpeg doesn't support, +so we also remove that and just make it use the normal Libs entry. + +--- a/libs.mk ++++ b/libs.mk +@@ -225,74 +225,25 @@ + ifeq ($(CONFIG_EXTERNAL_BUILD),yes) + ifeq ($(CONFIG_MSVS),yes) + +-vpx.def: $(call enabled,CODEC_EXPORTS) +- @echo " [CREATE] $@" +- $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ +- --name=vpx\ +- --out=$@ $^ +-CLEAN-OBJS += vpx.def +- +-vpx.$(VCPROJ_SFX): VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) +- +-vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def +- @echo " [CREATE] $@" +- $(qexec)$(GEN_VCPROJ) \ +- $(if $(CONFIG_SHARED),--dll,--lib) \ +- --target=$(TOOLCHAIN) \ +- $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ +- --name=vpx \ +- --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ +- --module-def=vpx.def \ +- --ver=$(CONFIG_VS_VERSION) \ +- --src-path-bare="$(SRC_PATH_BARE)" \ +- --out=$@ $(CFLAGS) \ +- --as=$(AS) \ +- $(filter $(SRC_PATH_BARE)/vp8/%.c, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vp8/%.h, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \ +- $(filter-out $(addprefix $(SRC_PATH_BARE)/, \ +- vp8/%.c vp8/%.h vp9/%.c vp9/%.h vpx/% vpx_dsp/%), \ +- $(VCPROJ_SRCS)) \ +- --src-path-bare="$(SRC_PATH_BARE)" \ +- +-PROJECTS-yes += vpx.$(VCPROJ_SFX) +- +-vpx.$(VCPROJ_SFX): vpx_config.asm +-vpx.$(VCPROJ_SFX): $(RTCD) +- +-vpxrc.$(VCPROJ_SFX): \ +- VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) +- +-vpxrc.$(VCPROJ_SFX): $(RC_RTC_SRCS) ++LIBS-yes += vpx.pc ++vpx.pc: config.mk libs.mk + @echo " [CREATE] $@" +- $(qexec)$(GEN_VCPROJ) \ +- $(if $(CONFIG_SHARED),--dll,--lib) \ +- --target=$(TOOLCHAIN) \ +- $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ +- --name=vpxrc \ +- --proj-guid=C26FF952-9494-4838-9A3F-7F3D4F613385 \ +- --ver=$(CONFIG_VS_VERSION) \ +- --src-path-bare="$(SRC_PATH_BARE)" \ +- --out=$@ $(CFLAGS) \ +- --as=$(AS) \ +- $(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vp9/%.cc, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \ +- $(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \ +- $(filter-out $(addprefix $(SRC_PATH_BARE)/, \ +- vp8/%.c vp8/%.h vp9/%.c vp9/%.cc vp9/%.h vpx/% \ +- vpx_dsp/%), \ +- $(VCPROJ_SRCS)) \ +- --src-path-bare="$(SRC_PATH_BARE)" \ +- +-PROJECTS-yes += vpxrc.$(VCPROJ_SFX) +- +-vpxrc.$(VCPROJ_SFX): vpx_config.asm +-vpxrc.$(VCPROJ_SFX): $(RTCD) ++ $(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@ ++ $(qexec)echo 'prefix=$(PREFIX)' >> $@ ++ $(qexec)echo 'exec_prefix=$${prefix}' >> $@ ++ $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@ ++ $(qexec)echo 'includedir=$${prefix}/include' >> $@ ++ $(qexec)echo '' >> $@ ++ $(qexec)echo 'Name: vpx' >> $@ ++ $(qexec)echo 'Description: WebM Project VPx codec implementation' >> $@ ++ $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ ++ $(qexec)echo 'Requires:' >> $@ ++ $(qexec)echo 'Conflicts:' >> $@ ++ $(qexec)echo 'Libs: -L$${libdir} -lvpx' >> $@ ++ $(qexec)echo 'Cflags: -I$${includedir}' >> $@ ++INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc ++INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc ++CLEAN-OBJS += vpx.pc + + endif # ifeq ($(CONFIG_MSVS),yes) + else # ifeq ($(CONFIG_EXTERNAL_BUILD),yes) +@@ -401,11 +352,10 @@ + $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ + $(qexec)echo 'Requires:' >> $@ + $(qexec)echo 'Conflicts:' >> $@ +- $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@ + ifeq ($(HAVE_PTHREAD_H),yes) +- $(qexec)echo 'Libs.private: -lm -lpthread' >> $@ ++ $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm -lpthread' >> $@ + else +- $(qexec)echo 'Libs.private: -lm' >> $@ ++ $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@ + endif + $(qexec)echo 'Cflags: -I$${includedir}' >> $@ + INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc +--- a/solution.mk ++++ b/solution.mk +@@ -15,7 +15,7 @@ + + vpx.sln: $(wildcard *.$(VCPROJ_SFX)) + @echo " [CREATE] $@" +- $(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \ ++ bash $(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \ + $(if $(filter vpx.$(VCPROJ_SFX),$^),$(VPX_RDEPS)) \ + --dep=test_libvpx:gtest \ + --ver=$(CONFIG_VS_VERSION)\ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 79597e15a2..12b22b1644 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,206 +43,206 @@ jobs: # There's ways to deduplicate these includes, but any mistake causes # utterly confounding errors, so just explicitly specify each target. include: - - os: ubuntu-20.04 - cross_os: '' - component: '' - qt: 5.15.14 - arch: x86_64 - sccache_triplet: x86_64-unknown-linux-musl - build_flags: -DINITSYS=systemd -DBUILD_PACKAGE_SUFFIX=x86_64 -G Ninja - build_type: Release - collect_symbols: false - # This causes the AppImage to be generated, instead of just creating - # the portable tree, because there seems to be no way to separate - # these steps with linuxdeploy - # Even though the svg component is linked explicitly, - # linuxdeploy-plugin-qt does not seem to notice and so does not - # export the iconengine if it is not told that we really, really - # want svg plugins please - packager: >- - EXTRA_QT_PLUGINS="svg;" - VERSION="${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '$(git describe)' }}" - cmake --install build --config Release - # The runner has multiple clang versions installed and CMake/Qt gets - # confused about which one to pick for some reason, so this also - # sets Clang_ROOT during the Qt build - qt_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - libatspi2.0-dev libmtdev-dev libts-dev libgtk-3-dev - libgl1-mesa-dev libglu1-mesa-dev libxi-dev libdrm-dev - libgbm-dev libgl-dev libgles-dev libegl-dev libegl1-mesa-dev - libxext-dev libxfixes-dev libxrender-dev libx11-dev - libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev - libxkbcommon-dev libxkbcommon-x11-dev libxcb-keysyms1-dev - libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev - libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev - libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev - libxcb-util-dev libinput-dev libvulkan-dev - libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libclang-12-dev - libasound2-dev libpulse-dev libcups2-dev libssl-dev - libfontconfig1-dev && - echo "Clang_ROOT=/usr/lib/llvm-12" >> $GITHUB_ENV - ffmpeg_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - nasm - other_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - libsecret-1-dev - - - os: ubuntu-20.04 - cross_os: Android - component: '' - qt: 5.15.14 - arch: arm64 - sccache_triplet: x86_64-unknown-linux-musl - build_type: Release - collect_symbols: false - packager: cmake --install build --config Release --prefix . - cross_qt_args: >- - "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" - "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" - "-DANDROID_HOST_PATH=$GITHUB_WORKSPACE/.github/deps/qt" - -DANDROID_ABI=arm64-v8a - cross_ffmpeg_args: >- - "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" - "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" - "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" - -DANDROID_PLATFORM=android-23 - -DANDROID_ABI=arm64-v8a - cross_other_args: >- - "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" - "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" - "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" - -DANDROID_PLATFORM=android-23 - -DANDROID_ABI=arm64-v8a - build_flags: >- - "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" - -DANDROID_PLATFORM=android-23 - -DANDROID_ABI=arm64-v8a - -DANDROID_SDK_PLATFORM=android-31 - -DANDROID_SDK_BUILD_TOOLS_REVISION=34.0.0 - -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=on - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH - -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH - # The runner has multiple clang versions installed and CMake/Qt gets - # confused about which one to pick for some reason, so this also - # sets Clang_ROOT during the Qt build - qt_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - libatspi2.0-dev libmtdev-dev libts-dev libgtk-3-dev - libgl1-mesa-dev libglu1-mesa-dev libxi-dev libdrm-dev - libgbm-dev libgl-dev libgles-dev libegl-dev libegl1-mesa-dev - libxext-dev libxfixes-dev libxrender-dev libx11-dev - libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev - libxkbcommon-dev libxkbcommon-x11-dev libxcb-keysyms1-dev - libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev - libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev - libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev - libxcb-util-dev libinput-dev libvulkan-dev - libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libclang-12-dev - libasound2-dev libpulse-dev libcups2-dev libssl-dev - libfontconfig1-dev && - echo "Clang_ROOT=/usr/lib/llvm-12" >> $GITHUB_ENV - ffmpeg_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - yasm - other_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - libsecret-1-dev - - - os: ubuntu-20.04 - cross_os: Android - component: '' - qt: 5.15.14 - arch: arm32 - sccache_triplet: x86_64-unknown-linux-musl - build_type: Release - collect_symbols: false - packager: cmake --install build --config Release --prefix . - cross_qt_args: >- - "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" - "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" - "-DANDROID_HOST_PATH=$GITHUB_WORKSPACE/.github/deps/qt" - -DANDROID_ABI=armeabi-v7a - cross_ffmpeg_args: >- - "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" - "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" - "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" - -DANDROID_PLATFORM=android-23 - -DANDROID_ABI=armeabi-v7a - cross_other_args: >- - "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" - "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" - "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" - -DANDROID_PLATFORM=android-23 - -DANDROID_ABI=armeabi-v7a - build_flags: >- - "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" - -DANDROID_PLATFORM=android-23 - -DANDROID_ABI=armeabi-v7a - -DANDROID_SDK_PLATFORM=android-31 - -DANDROID_SDK_BUILD_TOOLS_REVISION=34.0.0 - -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=on - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH - -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH - # The runner has multiple clang versions installed and CMake/Qt gets - # confused about which one to pick for some reason, so this also - # sets Clang_ROOT during the Qt build - qt_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - libatspi2.0-dev libmtdev-dev libts-dev libgtk-3-dev - libgl1-mesa-dev libglu1-mesa-dev libxi-dev libdrm-dev - libgbm-dev libgl-dev libgles-dev libegl-dev libegl1-mesa-dev - libxext-dev libxfixes-dev libxrender-dev libx11-dev - libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev - libxkbcommon-dev libxkbcommon-x11-dev libxcb-keysyms1-dev - libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev - libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev - libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev - libxcb-util-dev libinput-dev libvulkan-dev - libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libclang-12-dev - libasound2-dev libpulse-dev libcups2-dev libssl-dev - libfontconfig1-dev && - echo "Clang_ROOT=/usr/lib/llvm-12" >> $GITHUB_ENV - ffmpeg_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - yasm - other_pre_build: > - sudo apt-get update && - sudo apt-get install --no-install-recommends - libsecret-1-dev - - - os: macos-13 - cross_os: '' - component: '' - qt: 6.7.2 - arch: x86_64 - build_flags: -DBUILD_PACKAGE_SUFFIX=x86_64 -G Ninja - build_type: Release - collect_symbols: false - sccache_triplet: x86_64-apple-darwin - packager: cpack --verbose --config build/CPackConfig.cmake -C Release - - - os: macos-14 - cross_os: '' - component: '' - qt: 6.7.2 - arch: arm64 - build_flags: -DBUILD_PACKAGE_SUFFIX=arm64 -G Ninja - build_type: Release - collect_symbols: false - sccache_triplet: aarch64-apple-darwin - packager: cpack --verbose --config build/CPackConfig.cmake -C Release + # - os: ubuntu-20.04 + # cross_os: '' + # component: '' + # qt: 5.15.14 + # arch: x86_64 + # sccache_triplet: x86_64-unknown-linux-musl + # build_flags: -DINITSYS=systemd -DBUILD_PACKAGE_SUFFIX=x86_64 -G Ninja + # build_type: Release + # collect_symbols: false + # # This causes the AppImage to be generated, instead of just creating + # # the portable tree, because there seems to be no way to separate + # # these steps with linuxdeploy + # # Even though the svg component is linked explicitly, + # # linuxdeploy-plugin-qt does not seem to notice and so does not + # # export the iconengine if it is not told that we really, really + # # want svg plugins please + # packager: >- + # EXTRA_QT_PLUGINS="svg;" + # VERSION="${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '$(git describe)' }}" + # cmake --install build --config Release + # # The runner has multiple clang versions installed and CMake/Qt gets + # # confused about which one to pick for some reason, so this also + # # sets Clang_ROOT during the Qt build + # qt_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # libatspi2.0-dev libmtdev-dev libts-dev libgtk-3-dev + # libgl1-mesa-dev libglu1-mesa-dev libxi-dev libdrm-dev + # libgbm-dev libgl-dev libgles-dev libegl-dev libegl1-mesa-dev + # libxext-dev libxfixes-dev libxrender-dev libx11-dev + # libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev + # libxkbcommon-dev libxkbcommon-x11-dev libxcb-keysyms1-dev + # libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev + # libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev + # libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev + # libxcb-util-dev libinput-dev libvulkan-dev + # libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libclang-12-dev + # libasound2-dev libpulse-dev libcups2-dev libssl-dev + # libfontconfig1-dev && + # echo "Clang_ROOT=/usr/lib/llvm-12" >> $GITHUB_ENV + # ffmpeg_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # nasm yasm + # other_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # libsecret-1-dev + + # - os: ubuntu-20.04 + # cross_os: Android + # component: '' + # qt: 5.15.14 + # arch: arm64 + # sccache_triplet: x86_64-unknown-linux-musl + # build_type: Release + # collect_symbols: false + # packager: cmake --install build --config Release --prefix . + # cross_qt_args: >- + # "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" + # "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" + # "-DANDROID_HOST_PATH=$GITHUB_WORKSPACE/.github/deps/qt" + # -DANDROID_ABI=arm64-v8a + # cross_ffmpeg_args: >- + # "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" + # "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" + # "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" + # -DANDROID_PLATFORM=android-23 + # -DANDROID_ABI=arm64-v8a + # cross_other_args: >- + # "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" + # "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" + # "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" + # -DANDROID_PLATFORM=android-23 + # -DANDROID_ABI=arm64-v8a + # build_flags: >- + # "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" + # -DANDROID_PLATFORM=android-23 + # -DANDROID_ABI=arm64-v8a + # -DANDROID_SDK_PLATFORM=android-31 + # -DANDROID_SDK_BUILD_TOOLS_REVISION=34.0.0 + # -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=on + # -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH + # -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH + # -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH + # # The runner has multiple clang versions installed and CMake/Qt gets + # # confused about which one to pick for some reason, so this also + # # sets Clang_ROOT during the Qt build + # qt_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # libatspi2.0-dev libmtdev-dev libts-dev libgtk-3-dev + # libgl1-mesa-dev libglu1-mesa-dev libxi-dev libdrm-dev + # libgbm-dev libgl-dev libgles-dev libegl-dev libegl1-mesa-dev + # libxext-dev libxfixes-dev libxrender-dev libx11-dev + # libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev + # libxkbcommon-dev libxkbcommon-x11-dev libxcb-keysyms1-dev + # libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev + # libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev + # libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev + # libxcb-util-dev libinput-dev libvulkan-dev + # libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libclang-12-dev + # libasound2-dev libpulse-dev libcups2-dev libssl-dev + # libfontconfig1-dev && + # echo "Clang_ROOT=/usr/lib/llvm-12" >> $GITHUB_ENV + # ffmpeg_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # yasm + # other_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # libsecret-1-dev + + # - os: ubuntu-20.04 + # cross_os: Android + # component: '' + # qt: 5.15.14 + # arch: arm32 + # sccache_triplet: x86_64-unknown-linux-musl + # build_type: Release + # collect_symbols: false + # packager: cmake --install build --config Release --prefix . + # cross_qt_args: >- + # "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" + # "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" + # "-DANDROID_HOST_PATH=$GITHUB_WORKSPACE/.github/deps/qt" + # -DANDROID_ABI=armeabi-v7a + # cross_ffmpeg_args: >- + # "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" + # "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" + # "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" + # -DANDROID_PLATFORM=android-23 + # -DANDROID_ABI=armeabi-v7a + # cross_other_args: >- + # "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" + # "-DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" + # "-DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" + # -DANDROID_PLATFORM=android-23 + # -DANDROID_ABI=armeabi-v7a + # build_flags: >- + # "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" + # -DANDROID_PLATFORM=android-23 + # -DANDROID_ABI=armeabi-v7a + # -DANDROID_SDK_PLATFORM=android-31 + # -DANDROID_SDK_BUILD_TOOLS_REVISION=34.0.0 + # -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=on + # -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH + # -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH + # -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH + # # The runner has multiple clang versions installed and CMake/Qt gets + # # confused about which one to pick for some reason, so this also + # # sets Clang_ROOT during the Qt build + # qt_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # libatspi2.0-dev libmtdev-dev libts-dev libgtk-3-dev + # libgl1-mesa-dev libglu1-mesa-dev libxi-dev libdrm-dev + # libgbm-dev libgl-dev libgles-dev libegl-dev libegl1-mesa-dev + # libxext-dev libxfixes-dev libxrender-dev libx11-dev + # libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev + # libxkbcommon-dev libxkbcommon-x11-dev libxcb-keysyms1-dev + # libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev + # libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev + # libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev + # libxcb-util-dev libinput-dev libvulkan-dev + # libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libclang-12-dev + # libasound2-dev libpulse-dev libcups2-dev libssl-dev + # libfontconfig1-dev && + # echo "Clang_ROOT=/usr/lib/llvm-12" >> $GITHUB_ENV + # ffmpeg_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # yasm + # other_pre_build: > + # sudo apt-get update && + # sudo apt-get install --no-install-recommends + # libsecret-1-dev + + # - os: macos-13 + # cross_os: '' + # component: '' + # qt: 6.7.2 + # arch: x86_64 + # build_flags: -DBUILD_PACKAGE_SUFFIX=x86_64 -G Ninja + # build_type: Release + # collect_symbols: false + # sccache_triplet: x86_64-apple-darwin + # packager: cpack --verbose --config build/CPackConfig.cmake -C Release + + # - os: macos-14 + # cross_os: '' + # component: '' + # qt: 6.7.2 + # arch: arm64 + # build_flags: -DBUILD_PACKAGE_SUFFIX=arm64 -G Ninja + # build_type: Release + # collect_symbols: false + # sccache_triplet: aarch64-apple-darwin + # packager: cpack --verbose --config build/CPackConfig.cmake -C Release - os: windows-latest cross_os: '' @@ -257,6 +257,8 @@ jobs: choco install gperf jom winflexbison3 && New-Item -Path C:\ProgramData\Chocolatey\bin\flex.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_flex.exe && New-Item -Path C:\ProgramData\Chocolatey\bin\bison.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_bison.exe + ffmpeg_pre_build: > + choco install yasm # Copying files is a disgusting hack because windeployqt does not # search PATH to find DLLs and it gets confused by QtKeychain having # a Qt prefix and thinks it is part of Qt and tries to process it @@ -266,47 +268,47 @@ jobs: cp .github/deps/other/bin/qt*.dll .github/deps/qt/bin && cpack --verbose --config build/CPackConfig.cmake -C RelWithDebInfo - - os: windows-latest - cross_os: '' - component: 'Tools' - qt: 5.15.14 - arch: x86_64 - sccache_triplet: x86_64-pc-windows-msvc - build_flags: -DBUILD_PACKAGE_SUFFIX=x86_64 -G Ninja - build_type: RelWithDebInfo - collect_symbols: false - qt_pre_build: > - choco install gperf jom winflexbison3 && - New-Item -Path C:\ProgramData\Chocolatey\bin\flex.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_flex.exe && - New-Item -Path C:\ProgramData\Chocolatey\bin\bison.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_bison.exe - # Copying files is a disgusting hack because windeployqt does not - # search PATH to find DLLs and it gets confused by QtKeychain having - # a Qt prefix and thinks it is part of Qt and tries to process it - # and fails if it is not in the Qt bin directory with the rest of - # them - packager: > - cp .github/deps/other/bin/qt*.dll .github/deps/qt/bin && - cpack --verbose --config build/CPackConfig.cmake -C RelWithDebInfo - - - os: windows-latest - qt: 5.15.14 - arch: x86 - sccache_triplet: x86_64-pc-windows-msvc - build_flags: -DCARGO_TRIPLE=i686-pc-windows-msvc -DBUILD_PACKAGE_SUFFIX=x86 -G Ninja - build_type: RelWithDebInfo - collect_symbols: false - qt_pre_build: > - choco install gperf jom winflexbison3 && - New-Item -Path C:\ProgramData\Chocolatey\bin\flex.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_flex.exe && - New-Item -Path C:\ProgramData\Chocolatey\bin\bison.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_bison.exe - # Copying files is a disgusting hack because windeployqt does not - # search PATH to find DLLs and it gets confused by QtKeychain having - # a Qt prefix and thinks it is part of Qt and tries to process it - # and fails if it is not in the Qt bin directory with the rest of - # them - packager: > - cp .github/deps/other/bin/qt*.dll .github/deps/qt/bin && - cpack --verbose --config build/CPackConfig.cmake -C RelWithDebInfo + # - os: windows-latest + # cross_os: '' + # component: 'Tools' + # qt: 5.15.14 + # arch: x86_64 + # sccache_triplet: x86_64-pc-windows-msvc + # build_flags: -DBUILD_PACKAGE_SUFFIX=x86_64 -G Ninja + # build_type: RelWithDebInfo + # collect_symbols: false + # qt_pre_build: > + # choco install gperf jom winflexbison3 && + # New-Item -Path C:\ProgramData\Chocolatey\bin\flex.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_flex.exe && + # New-Item -Path C:\ProgramData\Chocolatey\bin\bison.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_bison.exe + # # Copying files is a disgusting hack because windeployqt does not + # # search PATH to find DLLs and it gets confused by QtKeychain having + # # a Qt prefix and thinks it is part of Qt and tries to process it + # # and fails if it is not in the Qt bin directory with the rest of + # # them + # packager: > + # cp .github/deps/other/bin/qt*.dll .github/deps/qt/bin && + # cpack --verbose --config build/CPackConfig.cmake -C RelWithDebInfo + + # - os: windows-latest + # qt: 5.15.14 + # arch: x86 + # sccache_triplet: x86_64-pc-windows-msvc + # build_flags: -DCARGO_TRIPLE=i686-pc-windows-msvc -DBUILD_PACKAGE_SUFFIX=x86 -G Ninja + # build_type: RelWithDebInfo + # collect_symbols: false + # qt_pre_build: > + # choco install gperf jom winflexbison3 && + # New-Item -Path C:\ProgramData\Chocolatey\bin\flex.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_flex.exe && + # New-Item -Path C:\ProgramData\Chocolatey\bin\bison.exe -ItemType SymbolicLink -Value C:\ProgramData\Chocolatey\bin\win_bison.exe + # # Copying files is a disgusting hack because windeployqt does not + # # search PATH to find DLLs and it gets confused by QtKeychain having + # # a Qt prefix and thinks it is part of Qt and tries to process it + # # and fails if it is not in the Qt bin directory with the rest of + # # them + # packager: > + # cp .github/deps/other/bin/qt*.dll .github/deps/qt/bin && + # cpack --verbose --config build/CPackConfig.cmake -C RelWithDebInfo steps: @@ -338,6 +340,11 @@ jobs: platform: win${{ matrix.arch == 'x86_64' && '64' || '32' }} if: runner.os == 'Windows' + - name: Install YASM for building libvpx in macOS + run: | + brew install yasm + if: runner.os == 'macOS' + - name: Install pkg-config for building and linking to ffmpeg in Windows run: | choco install pkgconfiglite @@ -523,6 +530,8 @@ jobs: **/*.wxs build/android-build/*.properties build/android_deployment_settings.json + **/ffmeg/**/*.h + **/*.pc - name: Save sccache uses: ./.github/actions/post-sccache