Merge branch 'master' into otio

This commit is contained in:
itsmattkc
2020-09-23 14:52:19 +10:00
18 changed files with 991 additions and 220 deletions
+2
View File
@@ -4,3 +4,5 @@
# Enforce LF line endings on source files
*.h text eol=lf
*.cpp text eol=lf
*.sh text eol=lf
*.desktop text eol=lf
+264 -107
View File
@@ -5,7 +5,108 @@ on:
branches:
- master
env:
DOWNLOAD_TOOL: curl -fLOSs --retry 3
jobs:
linux:
strategy:
fail-fast: false
matrix:
build: [1, 2]
include:
- build: 1
build-type: RelWithDebInfo
cc-compiler: gcc
cxx-compiler: g++
compiler-name: GCC 9.3.1
cmake-gen: Ninja
os-name: Linux (CentOS 7)
vfx-cy: 2021
ci-common-version: 2
- build: 2
build-type: RelWithDebInfo
cc-compiler: clang
cxx-compiler: clang++
compiler-name: Clang 10.0.0
cmake-gen: Ninja
os-name: Linux (CentOS 7)
vfx-cy: 2021
ci-common-version: 2
name: |
${{ matrix.os-name }}
<${{ matrix.compiler-name }},
${{ matrix.build-type }},
${{ matrix.cmake-gen }},
VFX CY${{ matrix.vfx-cy }},
CI Common Version ${{ matrix.ci-common-version }}>
runs-on: ubuntu-latest
container:
image: olivevideoeditor/ci-olive:${{ matrix.vfx-cy }}.${{ matrix.ci-common-version }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Configure CMake
run: |
mkdir build
cd build
cmake .. -G "${{ matrix.cmake-gen }}" \
-DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" \
-DCMAKE_C_COMPILER="${{ matrix.cc-compiler }}" \
-DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}"
- name: Build
working-directory: build
run: |
cmake --build .
- name: Test
working-directory: build
run: |
ctest -C ${{ matrix.build-type }}
- name: Create Package
id: package
working-directory: build
env:
ARCH: x86_64
run: |
cmake --install app --prefix appdir/usr
VERSION=${GITHUB_SHA::8}
export VERSION
/usr/local/linuxdeployqt-x86_64.AppImage \
appdir/usr/share/applications/org.olivevideoeditor.Olive.desktop \
-appimage \
--appimage-extract-and-run
filename=$(echo Olive*.AppImage)
pkgname="${filename/x86_64/Linux-x86_64}"
mv "${filename}" "${pkgname}"
echo "::set-output name=pkgname::${pkgname}"
echo "::set-output name=artifact::${filename/x86_64/Linux-x86_64-${{ matrix.cc-compiler }}}"
- name: Upload Artifact to GitHub
uses: actions/upload-artifact@v2
with:
name: ${{ steps.package.outputs.artifact }}
path: build/Olive*.AppImage
- name: Upload Packages to Nightly Page
working-directory: build
env:
GH_AUTH_KEY: ${{ secrets.GH_AUTH_KEY }}
PKGNAME: ${{ steps.package.outputs.pkgname }}
if: github.event_name == 'push' && matrix.cc-compiler == 'gcc'
run: |
curl -X POST \
-F file="@$PKGNAME" \
-F key="$GH_AUTH_KEY" \
-F hash="$GITHUB_SHA" \
-F time="$(git show -s --format=%ct)" \
-F comment="$(git show -s --format=%B)" \
https://olivevideoeditor.org/dl/push.php
windows:
strategy:
matrix:
@@ -18,26 +119,15 @@ jobs:
os-arch: x86_64
os: windows-latest
cmake-gen: Ninja
dep-suffix: win.7z
extract-tool: 7z x
- build: 2
build-type: RelWithDebInfo
compiler-name: Clang LLVM
os-name: macOS
os-arch: x86_64
os: macos-latest
cmake-gen: Unix Makefiles
dep-suffix: mac.zip
extract-tool: sudo unzip -d /usr/local -o
env:
EXTRACT_TOOL: 7z x
name: |
${{ matrix.os-name }}
<${{ matrix.compiler-name }},
${{ matrix.build-type }}>
${{ matrix.build-type }},
${{ matrix.cmake-gen }}>
runs-on: ${{ matrix.os }}
env:
DOWNLOAD_TOOL: curl -fLOSs --retry 3
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
@@ -48,7 +138,7 @@ jobs:
PLATFORM: ${{ matrix.os-name }}
ARCH: ${{ matrix.os-arch }}
run: |
echo "::set-env name=PKGNAME::$(echo Olive-${GITHUB_SHA::8}-$PLATFORM-$ARCH)"
echo "::set-env name=PKGNAME::$(echo Olive-${GITHUB_SHA::8}-${PLATFORM}-${ARCH})"
- name: Create Build Folder
run: |
@@ -56,7 +146,6 @@ jobs:
- name: Enable Developer Command Prompt (Windows)
uses: ilammy/msvc-dev-cmd@v1.3.0
if: matrix.os == 'windows-latest'
- name: Acquire Qt
uses: jurplel/install-qt-action@v2.8.0
@@ -65,57 +154,40 @@ jobs:
- name: Acquire FFmpeg
shell: bash
env:
DEP_SUFFIX: ${{ matrix.dep-suffix }}
EXTRACT_TOOL: ${{ matrix.extract-tool }}
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ffmpeg-$DEP_SUFFIX
$EXTRACT_TOOL ffmpeg-$DEP_SUFFIX
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ffmpeg-win.7z
$EXTRACT_TOOL ffmpeg-win.7z
- name: Acquire OpenColorIO
shell: bash
env:
DEP_SUFFIX: ${{ matrix.dep-suffix }}
EXTRACT_TOOL: ${{ matrix.extract-tool }}
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ocio-$DEP_SUFFIX
$EXTRACT_TOOL ocio-$DEP_SUFFIX
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ocio-win.7z
$EXTRACT_TOOL ocio-win.7z
- name: Acquire OpenEXR
shell: bash
env:
DEP_SUFFIX: ${{ matrix.dep-suffix }}
EXTRACT_TOOL: ${{ matrix.extract-tool }}
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/openexr-$DEP_SUFFIX
$EXTRACT_TOOL openexr-$DEP_SUFFIX
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/openexr-win.7z
$EXTRACT_TOOL openexr-win.7z
- name: Acquire OpenImageIO
shell: bash
env:
DEP_SUFFIX: ${{ matrix.dep-suffix }}
EXTRACT_TOOL: ${{ matrix.extract-tool }}
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/oiio-$DEP_SUFFIX
$EXTRACT_TOOL oiio-$DEP_SUFFIX
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/oiio-win.7z
$EXTRACT_TOOL oiio-win.7z
- name: Acquire Crashpad
shell: bash
env:
DEP_SUFFIX: ${{ matrix.dep-suffix }}
EXTRACT_TOOL: ${{ matrix.extract-tool }}
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/crashpad-$DEP_SUFFIX
$EXTRACT_TOOL crashpad-$DEP_SUFFIX
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/crashpad-win.7z
$EXTRACT_TOOL crashpad-win.7z
- name: Configure CMake
shell: bash
working-directory: ${{ runner.workspace }}/build
env:
CMAKE_GEN: ${{ matrix.cmake-gen }}
run: |
PATH=$GITHUB_WORKSPACE:$PATH \
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "$CMAKE_GEN"
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.cmake-gen }}"
- name: Build
working-directory: ${{ runner.workspace }}/build
@@ -132,11 +204,7 @@ jobs:
- name: Create Package
working-directory: ${{ runner.workspace }}/build
shell: bash
env:
MATRIX_OS: ${{ matrix.os }}
run: |
if [ "$MATRIX_OS" == "windows-latest" ]
then
mkdir olive-editor
cp app/olive-editor.exe olive-editor
cp app/olive-crashhandler.exe olive-editor
@@ -145,30 +213,14 @@ jobs:
windeployqt olive-editor/olive-editor.exe
cp $(cygpath $GITHUB_WORKSPACE)/bin/*.dll olive-editor
cp $(cygpath $GITHUB_WORKSPACE)/out/Default/crashpad_handler.exe olive-editor
cp $(cygpath $GITHUB_WORKSPACE)/minidump_stackwalk/* olive-editor
elif [ "$MATRIX_OS" == "macos-latest" ]
then
export BUNDLE_NAME=Olive.app
mv app/$BUNDLE_NAME .
# HACK: OCIO doesn't link it's library properly so we need to manually correct
install_name_tool -change libOpenColorIO.1.dylib @rpath/libOpenColorIO.1.dylib $BUNDLE_NAME/Contents/MacOS/Olive
macdeployqt $BUNDLE_NAME
$DOWNLOAD_TOOL https://github.com/arl/macdeployqtfix/raw/master/macdeployqtfix.py
python2 macdeployqtfix.py $BUNDLE_NAME/Contents/MacOS/Olive /usr/local/Cellar/qt5/5.*/
fi
cp $(cygpath $GITHUB_WORKSPACE)/breakpad/bin/* olive-editor
- name: Deploy Packages
working-directory: ${{ runner.workspace }}/build
shell: bash
env:
MATRIX_OS: ${{ matrix.os }}
run: |
if [ "$MATRIX_OS" == "windows-latest" ]
then
# Create Installer Executable
curl -fLOSs https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe
$DOWNLOAD_TOOL https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe
cp $(cygpath $GITHUB_WORKSPACE)/app/packaging/windows/nsis/* .
cp $(cygpath $GITHUB_WORKSPACE)/LICENSE .
makensis -V4 -DX64 "-XOutFile $PKGNAME.exe" olive.nsi
@@ -176,20 +228,26 @@ jobs:
# Create Portable ZIP
echo -n > olive-editor/portable
7z a $PKGNAME.zip olive-editor
elif [ "$MATRIX_OS" == "macos-latest" ]
then
zip -r $PKGNAME.zip Olive.app
fi
- name: Upload Installer Artifact to GitHub
uses: actions/upload-artifact@v2
with:
name: ${{ env.PKGNAME }}.exe
path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.exe
- name: Upload Portable Artifact to GitHub
uses: actions/upload-artifact@v2
with:
name: ${{ env.PKGNAME }}.zip
path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.zip
- name: Upload Packages to Nightly Page
shell: bash
working-directory: ${{ runner.workspace }}/build
env:
GH_AUTH_KEY: ${{ secrets.GH_AUTH_KEY }}
MATRIX_OS: ${{ matrix.os }}
if: github.event_name == 'push'
run: |
if [ "$MATRIX_OS" == "windows-latest" ]
then
curl -X POST \
-F file=@$PKGNAME.exe \
-F key="$GH_AUTH_KEY" \
@@ -205,38 +263,6 @@ jobs:
-F time="$(git -C $GITHUB_WORKSPACE show -s --format=%ct)" \
-F comment="$(git -C $GITHUB_WORKSPACE show -s --format=%B)" \
https://olivevideoeditor.org/dl/push.php
elif [ "$MATRIX_OS" == "macos-latest" ]
then
curl -X POST \
-F file=@$PKGNAME.zip \
-F key="$GH_AUTH_KEY" \
-F hash="$GITHUB_SHA" \
-F time="$(git -C $GITHUB_WORKSPACE show -s --format=%ct)" \
-F comment="$(git -C $GITHUB_WORKSPACE show -s --format=%B)" \
https://olivevideoeditor.org/dl/push.php
fi
if: github.event_name != 'pull_request'
- name: Upload Installer Artifact to GitHub (Windows)
uses: actions/upload-artifact@v2
with:
name: ${{ env.PKGNAME }}.exe
path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.exe
if: matrix.os == 'windows-latest'
- name: Upload Portable Artifact to GitHub (Windows)
uses: actions/upload-artifact@v2
with:
name: ${{ env.PKGNAME }}.zip
path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.zip
if: matrix.os == 'windows-latest'
- name: Upload Artifact to GitHub (macOS)
uses: actions/upload-artifact@v2
with:
name: ${{ env.PKGNAME }}.zip
path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.zip
if: matrix.os == 'macos-latest'
- name: Export Crashpad Symbols and Upload To Server
working-directory: ${{ runner.workspace }}/build
@@ -250,4 +276,135 @@ jobs:
-F symfile=@olive-editor.sym \
-F key="$GH_AUTH_KEY" \
https://olivevideoeditor.org/crashpad/symbols.php
if: matrix.os == 'windows-latest'
macos:
strategy:
matrix:
build: [1]
include:
- build: 1
build-type: RelWithDebInfo
compiler-name: Clang LLVM
os-name: macOS
os-arch: x86_64
os: macos-latest
cmake-gen: Unix Makefiles
env:
EXTRACT_TOOL: sudo unzip -d /usr/local -o
name: |
${{ matrix.os-name }}
<${{ matrix.compiler-name }},
${{ matrix.build-type }},
${{ matrix.cmake-gen }}>
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Automatically Generate Package Name
shell: bash
env:
PLATFORM: ${{ matrix.os-name }}
ARCH: ${{ matrix.os-arch }}
run: |
echo "::set-env name=PKGNAME::$(echo Olive-${GITHUB_SHA::8}-${PLATFORM}-${ARCH})"
- name: Create Build Folder
run: |
cmake -E make_directory ${{ runner.workspace }}/build
- name: Acquire Qt
uses: jurplel/install-qt-action@v2.8.0
with:
version: 5.15.1
- name: Acquire FFmpeg
shell: bash
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ffmpeg-mac.zip
$EXTRACT_TOOL ffmpeg-mac.zip
- name: Acquire OpenColorIO
shell: bash
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ocio-mac.zip
$EXTRACT_TOOL ocio-mac.zip
- name: Acquire OpenEXR
shell: bash
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/openexr-mac.zip
$EXTRACT_TOOL openexr-mac.zip
- name: Acquire OpenImageIO
shell: bash
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/oiio-mac.zip
$EXTRACT_TOOL oiio-mac.zip
- name: Acquire Crashpad
shell: bash
run: |
$DOWNLOAD_TOOL http://olivevideoeditor.org/deps/crashpad-mac.zip
$EXTRACT_TOOL crashpad-mac.zip
- name: Configure CMake
shell: bash
working-directory: ${{ runner.workspace }}/build
run: |
PATH=$GITHUB_WORKSPACE:$PATH \
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.cmake-gen }}"
- name: Build
working-directory: ${{ runner.workspace }}/build
shell: bash
run: |
cmake --build .
- name: Test
working-directory: ${{ runner.workspace }}/build
shell: bash
run: |
ctest -C ${{ matrix.build-type }}
- name: Create Package
working-directory: ${{ runner.workspace }}/build
shell: bash
run: |
export BUNDLE_NAME=Olive.app
mv app/$BUNDLE_NAME .
# HACK: OCIO doesn't link it's library properly so we need to manually correct
install_name_tool -change libOpenColorIO.1.dylib @rpath/libOpenColorIO.1.dylib $BUNDLE_NAME/Contents/MacOS/Olive
macdeployqt $BUNDLE_NAME
$DOWNLOAD_TOOL https://github.com/arl/macdeployqtfix/raw/master/macdeployqtfix.py
python2 macdeployqtfix.py $BUNDLE_NAME/Contents/MacOS/Olive /usr/local/Cellar/qt5/5.*/
- name: Deploy Packages
working-directory: ${{ runner.workspace }}/build
shell: bash
run: |
zip -r $PKGNAME.zip Olive.app
- name: Upload Artifact to GitHub
uses: actions/upload-artifact@v2
with:
name: ${{ env.PKGNAME }}.zip
path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.zip
- name: Upload Packages to Nightly Page
shell: bash
working-directory: ${{ runner.workspace }}/build
env:
GH_AUTH_KEY: ${{ secrets.GH_AUTH_KEY }}
if: github.event_name == 'push'
run: |
curl -X POST \
-F file=@$PKGNAME.zip \
-F key="$GH_AUTH_KEY" \
-F hash="$GITHUB_SHA" \
-F time="$(git -C $GITHUB_WORKSPACE show -s --format=%ct)" \
-F comment="$(git -C $GITHUB_WORKSPACE show -s --format=%B)" \
https://olivevideoeditor.org/dl/push.php
+9 -2
View File
@@ -223,14 +223,21 @@ if (GoogleCrashpad_FOUND)
${CRASHPAD_LIBRARIES}
)
set(CRASHPAD_HANDLER "crashpad_handler${CMAKE_EXECUTABLE_SUFFIX}")
set(MINIDUMP_STACKWALK "minidump_stackwalk${CMAKE_EXECUTABLE_SUFFIX}")
if(UNIX AND NOT APPLE)
install(TARGETS ${OLIVE_TARGET} ${OLIVE_CRASH_TARGET} RUNTIME DESTINATION bin)
install(PROGRAMS ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} DESTINATION bin)
install(PROGRAMS ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} DESTINATION bin)
endif()
if(APPLE)
# Move crash handler program inside Mac app bundle
# Move crash handler executables inside Mac app bundle
add_custom_command(TARGET ${OLIVE_CRASH_TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${OLIVE_CRASH_TARGET} $<TARGET_FILE_DIR:${OLIVE_TARGET}>
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OLIVE_CRASH_TARGET} $<TARGET_FILE_DIR:${OLIVE_TARGET}>
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} $<TARGET_FILE_DIR:${OLIVE_TARGET}>
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} $<TARGET_FILE_DIR:${OLIVE_TARGET}>
)
endif()
endif()
+1
View File
@@ -51,6 +51,7 @@ Block::Block() :
speed_input_ = new NodeInput("speed_in", NodeParam::kFloat);
speed_input_->set_standard_value(1.0);
speed_input_->set_property(QStringLiteral("view"), QStringLiteral("percent"));
AddInput(speed_input_);
// A block's length must be greater than 0
@@ -136,6 +136,9 @@ void NodeParamView::SelectNodes(const QList<Node *> &nodes)
connect(item, &NodeParamViewItem::InputDoubleClicked, this, &NodeParamView::InputDoubleClicked);
connect(item, &NodeParamViewItem::RequestSelectNode, this, &NodeParamView::RequestSelectNode);
// Set time target
item->SetTimeTarget(GetTimeTarget());
items_.insert(n, item);
}
+26 -10
View File
@@ -63,28 +63,44 @@ endif()
# Find the libraries we need
set (_crashpad_components
client/client
util/util
third_party/mini_chromium/mini_chromium/base/base)
client
util
third_party/mini_chromium/mini_chromium/base
compat)
foreach (COMPONENT ${_crashpad_components})
string(REGEX MATCH "^(.*[\\\/])" SUBDIR ${COMPONENT})
string(REGEX MATCH "([^\/]+$)" SHORT_COMPONENT ${COMPONENT})
string(TOUPPER ${SHORT_COMPONENT} UPPERCOMPONENT)
get_filename_component(SHORT_COMPONENT ${COMPONENT} NAME)
string(TOUPPER ${SHORT_COMPONENT} UPPER_COMPONENT)
find_library(CRASHPAD_${UPPERCOMPONENT}_LIB
find_library(CRASHPAD_${UPPER_COMPONENT}_LIB
${SHORT_COMPONENT}
HINTS "${CRASHPAD_LIBRARY_DIRS}/obj/${SUBDIR}"
HINTS
"${CRASHPAD_LIBRARY_DIRS}/obj/${COMPONENT}"
)
list(APPEND CRASHPAD_LIBRARIES ${CRASHPAD_${UPPERCOMPONENT}_LIB})
list(APPEND CRASHPAD_LIBRARIES ${CRASHPAD_${UPPER_COMPONENT}_LIB})
endforeach()
if (UNIX AND NOT APPLE)
list(APPEND CRASHPAD_LIBRARIES ${CMAKE_DL_LIBS} Threads::Threads)
list(APPEND CRASHPAD_LIBRARIES
${CMAKE_DL_LIBS} # Crashpad compat lib needs libdl.so (-ldl)
Threads::Threads # Link against libpthread.so (-lpthread)
)
endif()
# Find Breakpad's minidump_stackwalk
find_path(BREAKPAD_BIN_DIR
"minidump_stackwalk${CMAKE_EXECUTABLE_SUFFIX}"
HINTS
"${BREAKPAD_LOCATION}"
"$ENV{BREAKPAD_LOCATION}"
"${BREAKPAD_BASE_DIR}"
PATH_SUFFIXES
breakpad/bin
)
find_package_handle_standard_args(GoogleCrashpad
REQUIRED_VARS
CRASHPAD_LIBRARIES
CRASHPAD_INCLUDE_DIRS
BREAKPAD_BIN_DIR
)
+71
View File
@@ -0,0 +1,71 @@
# Copyright (C) 2020 Olive Team
# SPDX-License-Identifier: GPL-3.0-or-later
# Build image (default):
# docker build -t olivevideoeditor/ci-common:2 -f ci-common/Dockerfile .
ARG OLIVE_ORG=olivevideoeditor
ARG ASWF_PKG_ORG=aswftesting
ARG CI_COMMON_VERSION=2
ARG DTS_VERSION=9
ARG CMAKE_VERSION=3.17.3
FROM ${ASWF_PKG_ORG}/ci-package-clang:${CI_COMMON_VERSION} as ci-package-clang
FROM ${ASWF_PKG_ORG}/ci-package-ninja:${CI_COMMON_VERSION} as ci-package-ninja
FROM centos:7 as ci-common
ARG OLIVE_ORG
ARG CI_COMMON_VERSION
ARG DTS_VERSION
ARG CMAKE_VERSION
LABEL maintainer="olivevideoeditor@gmail.com"
LABEL org.opencontainers.image.name="$OLIVE_ORG/ci-common"
LABEL org.opencontainers.image.description="CentOS CI Shared Image"
LABEL org.opencontainers.image.url="http://olivevideoeditor.org"
LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive"
LABEL org.opencontainers.image.vendor="Olive Team"
LABEL org.opencontainers.image.version="1.0"
USER root
COPY scripts/${CI_COMMON_VERSION}/versions_common.sh \
scripts/common/install_yumpackages.sh \
scripts/common/before_build.sh \
scripts/common/copy_new_files.sh \
/tmp/
RUN source /tmp/versions_common.sh && \
/tmp/install_yumpackages.sh
RUN mkdir /opt/olive
WORKDIR /opt/olive
ENV OLIVE_ORG=${OLIVE_ORG} \
CI_COMMON_VERSION=${CI_COMMON_VERSION} \
DTS_VERSION=${DTS_VERSION} \
CMAKE_VERSION=${CMAKE_VERSION} \
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:/opt/rh/httpd24/root/usr/lib64:/opt/rh/devtoolset-${DTS_VERSION}/root/usr/lib64:/opt/rh/devtoolset-${DTS_VERSION}/root/usr/lib:${LD_LIBRARY_PATH} \
PATH=/opt/rh/rh-git218/root/usr/bin:/usr/local/bin:/opt/rh/devtoolset-${DTS_VERSION}/root/usr/bin:/opt/app-root/src/bin:/opt/rh/devtoolset-${DTS_VERSION}/root/usr/bin/:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
#COPY scripts/common/install_sonar.sh \
# scripts/common/install_ccache.sh \
# /tmp/
COPY --from=ci-package-clang /. /usr/local/
COPY --from=ci-package-ninja /. /usr/local/
#COPY scripts/common/setup_aswfuser.sh /tmp
#RUN /tmp/setup_aswfuser.sh
COPY scripts/base/install_cmake.sh \
/tmp/
RUN export DOWNLOADS_DIR=/tmp/downloads && \
mkdir /tmp/downloads && \
# source /tmp/versions_base.sh && \
/tmp/install_cmake.sh && \
# /tmp/patchup.sh && \
rm -rf /tmp/downloads
+37
View File
@@ -0,0 +1,37 @@
# Copyright (C) 2020 Olive Team
# SPDX-License-Identifier: GPL-3.0-or-later
# Build image (default):
# docker build -t olivevideoeditor/ci-package-crashpad -f ci-crashpad/Dockerfile .
ARG OLIVE_ORG=olivevideoeditor
ARG CI_COMMON_VERSION=2
FROM ${OLIVE_ORG}/ci-common:${CI_COMMON_VERSION} as ci-crashpad
ARG OLIVE_ORG
ARG CI_COMMON_VERSION
LABEL maintainer="olivevideoeditor@gmail.com"
LABEL org.opencontainers.image.name="$OLIVE_ORG/ci-crashpad"
LABEL org.opencontainers.image.description="CentOS Crashpad Build Image"
LABEL org.opencontainers.image.url="http://olivevideoeditor.org"
LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive"
LABEL org.opencontainers.image.vendor="Olive Team"
LABEL org.opencontainers.image.version="1.0"
COPY scripts/build_crashpad.sh \
/tmp/
ENV OLIVE_ORG=${OLIVE_ORG} \
CI_COMMON_VERSION=${CI_COMMON_VERSION} \
OLIVE_INSTALL_PREFIX=/usr/local
RUN /tmp/before_build.sh && \
/tmp/build_crashpad.sh && \
/tmp/copy_new_files.sh
FROM scratch as ci-package-crashpad
COPY --from=ci-crashpad /package /
+57
View File
@@ -0,0 +1,57 @@
# Copyright (C) 2020 Olive Team
# SPDX-License-Identifier: GPL-3.0-or-later
# Build image (default):
# docker build -t olivevideoeditor/ci-package-ffmpeg:4.2.4 -f ci-ffmpeg/Dockerfile .
ARG OLIVE_ORG=olivevideoeditor
ARG CI_COMMON_VERSION=2
ARG FFMPEG_VERSION=4.2.4
ARG NASM_VERSION=2.15.03
ARG YASM_VERSION=1.3.0
ARG LAME_VERSION=3.100
ARG OPUS_VERSION=1.3.1
# TODO: Make version of x264, x265 and libvpx selectable?
ARG NUM_JOBS=2
FROM ${OLIVE_ORG}/ci-common:${CI_COMMON_VERSION} as ci-ffmpeg
ARG OLIVE_ORG
ARG CI_COMMON_VERSION
ARG FFMPEG_VERSION
ARG NASM_VERSION
ARG YASM_VERSION
ARG LAME_VERSION
ARG OPUS_VERSION
# TODO: Make version of x264, x265 and libvpx selectable?
ARG NUM_JOBS=2
LABEL maintainer="olivevideoeditor@gmail.com"
LABEL org.opencontainers.image.name="$OLIVE_ORG/ci-ffmpeg"
LABEL org.opencontainers.image.description="CentOS FFmpeg Build Image"
LABEL org.opencontainers.image.url="http://olivevideoeditor.org"
LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive"
LABEL org.opencontainers.image.vendor="Olive Team"
LABEL org.opencontainers.image.version="1.0"
COPY scripts/build_ffmpeg.sh \
/tmp/
ENV OLIVE_ORG=${OLIVE_ORG} \
CI_COMMON_VERSION=${CI_COMMON_VERSION} \
FFMPEG_VERSION=${FFMPEG_VERSION} \
NASM_VERSION=${NASM_VERSION} \
YASM_VERSION=${YASM_VERSION} \
LAME_VERSION=${LAME_VERSION} \
OPUS_VERSION=${OPUS_VERSION} \
NUM_JOBS=${NUM_JOBS} \
OLIVE_INSTALL_PREFIX=/usr/local
RUN /tmp/before_build.sh && \
/tmp/build_ffmpeg.sh && \
/tmp/copy_new_files.sh
FROM scratch as ci-package-ffmpeg
COPY --from=ci-ffmpeg /package/. /
+52
View File
@@ -0,0 +1,52 @@
# Copyright (C) 2020 Olive Team
# SPDX-License-Identifier: GPL-3.0-or-later
# Build image (default):
# docker build -t olivevideoeditor/ci-olive:2021.2 -f ci-olive/Dockerfile .
ARG OLIVE_ORG=olivevideoeditor
ARG ASWF_PKG_ORG=aswftesting
ARG CI_COMMON_VERSION=2
ARG VFXPLATFORM_VERSION=2021
ARG FFMPEG_VERSION=4.2.4
FROM ${ASWF_PKG_ORG}/ci-package-qt:${VFXPLATFORM_VERSION} as ci-package-qt
FROM ${ASWF_PKG_ORG}/ci-package-python:${VFXPLATFORM_VERSION} as ci-package-python
FROM ${ASWF_PKG_ORG}/ci-package-boost:${VFXPLATFORM_VERSION} as ci-package-boost
FROM ${ASWF_PKG_ORG}/ci-package-openexr:${VFXPLATFORM_VERSION} as ci-package-openexr
FROM ${ASWF_PKG_ORG}/ci-package-oiio:${VFXPLATFORM_VERSION} as ci-package-oiio
FROM ${ASWF_PKG_ORG}/ci-package-ocio:${VFXPLATFORM_VERSION} as ci-package-ocio
FROM ${OLIVE_ORG}/ci-package-ffmpeg:${FFMPEG_VERSION} as ci-package-ffmpeg
FROM ${OLIVE_ORG}/ci-package-crashpad:latest as ci-package-crashpad
FROM ${OLIVE_ORG}/ci-common:${CI_COMMON_VERSION} as ci-olive
ARG OLIVE_ORG
ARG VFXPLATFORM_VERSION
ARG PYTHON_VERSION=3.7
LABEL maintainer="olivevideoeditor@gmail.com"
LABEL org.opencontainers.image.name="olivevideoeditor/ci-olive"
LABEL org.opencontainers.image.description="CentOS CI Olive Build Image"
LABEL org.opencontainers.image.url="http://olivevideoeditor.org"
LABEL org.opencontainers.image.source="https://github.com/olive-editor/olive"
LABEL org.opencontainers.image.vendor="Olive Team"
LABEL org.opencontainers.image.version="1.0"
ENV PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH} \
CRASHPAD_LOCATION=/usr/local/crashpad \
VFXPLATFORM_VERSION=${VFXPLATFORM_VERSION}
COPY --from=ci-package-qt /. /usr/local/
COPY --from=ci-package-python /. /usr/local/
COPY --from=ci-package-boost /. /usr/local/
COPY --from=ci-package-openexr /. /usr/local/
COPY --from=ci-package-oiio /. /usr/local/
COPY --from=ci-package-ocio /. /usr/local/
COPY --from=ci-package-ffmpeg /. /usr/local/
COPY --from=ci-package-crashpad /. /usr/local/
RUN curl --location "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" \
-o "/usr/local/linuxdeployqt-x86_64.AppImage" && \
chmod a+x "/usr/local/linuxdeployqt-x86_64.AppImage"
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Copyright (c) Contributors to the aswf-docker Project. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -ex
export DTS_VERSION=9
export CLANG_VERSION=10.0.0
export NINJA_VERSION=1.10.0
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Copyright (c) Contributors to the aswf-docker Project. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -ex
export BOOST_VERSION=1.70.0
export CMAKE_VERSION=3.17.3
export NUMPY_VERSION=1.16
export PYSIDE_VERSION=5.12.6
export PYTHON_VERSION_FULL=3.7.3
export PYTHON_VERSION=3.7
export QT_VERSION=5.12.8
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Copyright (c) Contributors to the aswf-docker Project. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -ex
if [ ! -f "$DOWNLOADS_DIR/cmake-${CMAKE_VERSION}-Linux-x86_64.sh" ]; then
curl --location "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh" -o "$DOWNLOADS_DIR/cmake-${CMAKE_VERSION}-Linux-x86_64.sh"
fi
sh "$DOWNLOADS_DIR/cmake-${CMAKE_VERSION}-Linux-x86_64.sh" --skip-license --prefix=/usr/local --exclude-subdir
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env bash
# Copyright (C) 2020 Olive Team
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
# Get Google's build tools
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
# HACK: Compile our own gn. The one included in depot_tools requires GLIBC_2.18,
# but CentOS 7 only ships with GLIBC_2.17.
git clone https://gn.googlesource.com/gn
# NOTE: Don't clone with --depth 1, this will make build/gen.py fail!
cd gn
python build/gen.py
ninja -C out
cd ..
# Put the path to our own gn build first
PATH="$(pwd)/gn/out:$(pwd)/depot_tools:$PATH"
export PATH
# Build Crashpad with Clang (default)
# Toolchain can be controlled with env vars CC, CXX and AR
mkdir crashpad
cd crashpad
fetch crashpad
cd crashpad
# TODO: Do we want to set any special args here? For example:
# gn gen --args="target_cpu=\"x64\" is_debug=true" out/Default
gn gen out/Default
ninja -C out/Default
# Include list
echo 'out/Default/crashpad_handler' > /tmp/crashpad_include_list.txt
find . \( -type f -o -type l \) \
-name "*.h" -o \
-name "*.o" -o \
-name "*.a" | cut -c3- >> /tmp/crashpad_include_list.txt
# Exclude list
echo '**/.git/**
compat/android/**
compat/ios/**
compat/mac/**
compat/non_elf/**
compat/win/**
handler/mac/**
handler/win/**
infra/**
minidump/test/**
out/Default/**_test*
snapshot/fuchsia/**
snapshot/ios/**
snapshot/mac/**
snapshot/win/**
test/**
third_party/fuchsia/**
third_party/gyp/gyp/test/**
third_party/mini_chromium/mini_chromium/base/fuchsia/**
third_party/mini_chromium/mini_chromium/testing/**
tools/mac/**
util/fuchsia/**
util/ios/**
util/mac/**
util/win/**' > /tmp/crashpad_exclude_list.txt
rsync -av \
--files-from=/tmp/crashpad_include_list.txt \
--exclude-from=/tmp/crashpad_exclude_list.txt \
--prune-empty-dirs \
. "${OLIVE_INSTALL_PREFIX}/crashpad"
cd ../..
# Build Breakpad for minidump_stackwalk
mkdir breakpad
cd breakpad
fetch breakpad
cd src
./configure --prefix="${OLIVE_INSTALL_PREFIX}/breakpad"
make
make install -j$(nproc)
+158
View File
@@ -0,0 +1,158 @@
#!/usr/bin/env bash
# Copyright (C) 2020 Olive Team
# SPDX-License-Identifier: GPL-3.0-or-later
# Largely copied from https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
#
# Uses { command } & pattern for parallelism https://gist.github.com/thenadz/6c0584d42fb007582fbc
#
# TOOD: Use advanced options such as LTO? e.g. https://code.videolan.org/videolan/x264/-/blob/master/configure
# TODO: Enable debug symbols? (Or is it opt-out?)
# TODO: Add more ffmpeg libraries? See https://raw.githubusercontent.com/jrottenberg/ffmpeg/master/docker-images/4.2/centos7/Dockerfile
set -ex
# Set up recent NASM
{
curl -fLsS -o nasm.tar.xz "https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.xz"
tar xf nasm.tar.xz
rm -f nasm.tar.xz
cd nasm*
./autogen.sh
./configure \
--prefix="${OLIVE_INSTALL_PREFIX}"
make -j${NUM_JOBS}
make install
cd ..
rm -rf nasm*
} &
# Set up recent YASM
{
curl -fLsS -o yasm.tar.gz "http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz"
tar xf yasm.tar.gz
rm -f yasm.tar.gz
cd yasm*
./configure \
--prefix="${OLIVE_INSTALL_PREFIX}"
make -j${NUM_JOBS}
make install
cd ..
rm -rf yasm*
} &
# join jobs, some libs depend on NASM/YASM
wait
# Set up libx264
{
git clone --depth 1 "https://code.videolan.org/videolan/x264.git"
cd x264
./configure \
--prefix="${OLIVE_INSTALL_PREFIX}" \
--enable-shared \
--enable-pic \
--disable-cli
make -j${NUM_JOBS}
make install
cd ..
rm -rf x264
} &
# Set up libx265
{
# BitBucket dropped support for Mercurial repos
#hg clone https://bitbucket.org/multicoreware/x265
git clone --depth 1 "https://bitbucket.org/multicoreware/x265_git.git" x265
cd x265/build/linux
cmake \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX="${OLIVE_INSTALL_PREFIX}" \
../../source
make -j${NUM_JOBS}
make install
cd ../../..
rm -rf x265
} &
# Set up libmp3lame
{
curl -fLsS -o lame.tar.gz "https://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz"
tar xf lame.tar.gz
rm -f lame.tar.gz
cd lame*
./configure \
--prefix="${OLIVE_INSTALL_PREFIX}" \
--enable-shared \
--enable-nasm \
--disable-frontend
make -j${NUM_JOBS}
make install
cd ..
rm -rf lame*
} &
# Set up libopus
{
curl -fLsS -o opus.tar.gz "https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz"
tar xf opus.tar.gz
rm -f opus.tar.gz
cd opus*
./configure \
--prefix="${OLIVE_INSTALL_PREFIX}" \
--enable-shared
make -j${NUM_JOBS}
make install
cd ..
rm -rf opus*
} &
# Set up libvpx
{
git clone --depth 1 "https://chromium.googlesource.com/webm/libvpx.git"
cd libvpx
./configure \
--prefix="${OLIVE_INSTALL_PREFIX}" \
--enable-shared \
--enable-pic \
--enable-vp9-highbitdepth \
--as=yasm \
--disable-examples \
--disable-unit-tests \
--disable-docs \
--disable-install-bins
make -j${NUM_JOBS}
make install
cd ..
rm -rf libvpx
} &
# join all jobs
wait
curl -fLsS -o ffmpeg.tar.xz "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz"
tar xf ffmpeg.tar.xz
cd ffmpeg*
# TODO: --enable-debug?
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" ./configure \
--disable-doc \
--disable-ffplay \
--enable-gpl \
--enable-version3 \
--enable-shared \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--prefix="${OLIVE_INSTALL_PREFIX}" \
--extra-libs=-lpthread \
--extra-libs=-lm \
--extra-cflags="-I${OLIVE_INSTALL_PREFIX}/include" \
--extra-ldflags="-L${OLIVE_INSTALL_PREFIX}/lib"
make -j${NUM_JOBS}
make install
cd ..
rm -rf ffmpeg*
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Copyright (c) Contributors to the aswf-docker Project. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -ex
rm -rf /package
cd "${OLIVE_INSTALL_PREFIX}"
find . -type f -o -type l | cut -c3- > /tmp/previous-prefix-files.txt
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Copyright (c) Contributors to the aswf-docker Project. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -ex
mkdir -p /package
cd "${OLIVE_INSTALL_PREFIX}"
find . -type l -o -type f | cut -c3- > /tmp/new-prefix-files.txt
rsync -av --files-from=/tmp/new-prefix-files.txt --exclude-from=/tmp/previous-prefix-files.txt . /package/
@@ -0,0 +1,74 @@
#!/usr/bin/env bash
# Copyright (C) 2019 Olive Team
# Copyright (c) Contributors to the aswf-docker Project. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
set -ex
# TODO: Check if this causes any problems. ASWF doesn't run a yum update.
yum update -y
# TODO: Add deps of deps which are explicitly listed in aswf-docker?
yum install --setopt=tsflags=nodocs -y \
bzip2-devel \
cups-libs \
freetype-devel \
giflib-devel \
gstreamer1 gstreamer1-devel \
gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel \
libicu-devel \
libmng-devel \
LibRaw-devel \
libwebp-devel \
libXcomposite libXcomposite-devel \
libXcursor libXcursor-devel \
libxkbcommon libxkbcommon-devel \
libxkbcommon-x11-devel \
libXScrnSaver libXScrnSaver-devel \
mesa-libGL-devel \
openjpeg2-devel \
pciutils-devel \
pulseaudio-libs pulseaudio-libs-devel \
python3-tkinter \
zlib-devel
# This is needed for Xvfb to function properly.
dbus-uuidgen > /etc/machine-id
yum -y groupinstall "Development Tools"
# TODO: Below code installs the obsolete devtoolset-6.
# Unclear which devtoolset it will be for VFX platform CY2021:
# https://groups.google.com/forum/#!topic/vfx-platform-discuss/_-_CPw1fD3c
yum install -y --setopt=tsflags=nodocs centos-release-scl-rh yum-utils
if [[ $DTS_VERSION == 6 ]]; then
# Use the centos vault as the original devtoolset-6 is not part of CentOS-7 anymore
sed -i 's/7/7.6.1810/g; s|^#\s*\(baseurl=http://\)mirror|\1vault|g; /mirrorlist/d' /etc/yum.repos.d/CentOS-SCLo-*.repo
fi
yum install -y --setopt=tsflags=nodocs \
"devtoolset-$DTS_VERSION-toolchain"
yum install -y epel-release
# Additional package that are not found initially
yum install -y \
rh-git218 \
# lame-devel
# libcaca-devel \
# libdb4-devel \
# libdc1394-devel \
# p7zip \
# yasm-devel \
# zvbi-devel
# TODO: Does clearing the cache have any negative side effects?
yum clean all
# HACK: Qt5GuiConfigExtras.cmake expects libGL.so in /usr/local/lib64 but it gets installed to /usr/lib64
ln -s /usr/lib64/libGL.so /usr/local/lib64/
# Alternatively, we could edit /usr/local/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake
# - _qt5gui_find_extra_libs(OPENGL "/usr/local/lib64/libGL.so" "" "")
# + _qt5gui_find_extra_libs(OPENGL "/usr/lib64/libGL.so" "" "")