From d69e478a62d6f020c2300a257ed123ca5b1aff6b Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 23 Sep 2020 01:44:11 +1000 Subject: [PATCH 01/14] paramview: ensure item time target is set upon creation Fixes #1213 --- app/widget/nodeparamview/nodeparamview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/widget/nodeparamview/nodeparamview.cpp b/app/widget/nodeparamview/nodeparamview.cpp index 51b332fe6..34fea246d 100644 --- a/app/widget/nodeparamview/nodeparamview.cpp +++ b/app/widget/nodeparamview/nodeparamview.cpp @@ -136,6 +136,9 @@ void NodeParamView::SelectNodes(const QList &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); } From 76d73b17aa47175cf25ba3c118dcd4867125c0c5 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 23 Sep 2020 02:29:38 +1000 Subject: [PATCH 02/14] block: made speed a percentage --- app/node/block/block.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/app/node/block/block.cpp b/app/node/block/block.cpp index 86daeca9d..85df9aa3b 100644 --- a/app/node/block/block.cpp +++ b/app/node/block/block.cpp @@ -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 From d196689c2d42882a41ae92304fe27720a78cff81 Mon Sep 17 00:00:00 2001 From: Simran Date: Tue, 22 Sep 2020 23:58:44 +0200 Subject: [PATCH 03/14] Improve cmake crashpad/breakpad discovery, compilation & installation under Unix (#1184) * Clean up Crashpad library discovery code * Find and install Breakpad binary * Copy crashpad_handler and minidum_stackwalk POST_BUILD (macOS only) * Install crashpad_handler and minidum_stackwalk for AppImage --- app/CMakeLists.txt | 15 ++++-- cmake/FindGoogleCrashpad.cmake | 98 ++++++++++++++++++++-------------- 2 files changed, 69 insertions(+), 44 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index b0bfd881f..1e35af257 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -176,13 +176,13 @@ if (GoogleCrashpad_FOUND) ${OLIVE_TARGET} PRIVATE ${CRASHPAD_INCLUDE_DIRS} - ) + ) target_link_libraries( ${OLIVE_TARGET} PRIVATE ${CRASHPAD_LIBRARIES} - ) + ) set(OLIVE_CRASH_TARGET "olive-crashhandler") @@ -221,14 +221,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} $ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OLIVE_CRASH_TARGET} $ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CRASHPAD_LIBRARY_DIRS}/${CRASHPAD_HANDLER} $ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BREAKPAD_BIN_DIR}/${MINIDUMP_STACKWALK} $ ) endif() endif() diff --git a/cmake/FindGoogleCrashpad.cmake b/cmake/FindGoogleCrashpad.cmake index 17474a407..0e56c35ec 100644 --- a/cmake/FindGoogleCrashpad.cmake +++ b/cmake/FindGoogleCrashpad.cmake @@ -18,73 +18,91 @@ include(FindPackageHandleStandardArgs) # Try to find include files find_path(CRASHPAD_CLIENT_INCLUDE_DIR - client/crashpad_client.h - HINTS - "${CRASHPAD_LOCATION}" - "$ENV{CRASHPAD_LOCATION}" - "${CRASHPAD_BASE_DIR}" + client/crashpad_client.h + HINTS + "${CRASHPAD_LOCATION}" + "$ENV{CRASHPAD_LOCATION}" + "${CRASHPAD_BASE_DIR}" ) list(APPEND CRASHPAD_INCLUDE_DIRS ${CRASHPAD_CLIENT_INCLUDE_DIR}) find_path(CRASHPAD_BASE_INCLUDE_DIR - base/files/file_path.h - HINTS - "${CRASHPAD_LOCATION}" - "$ENV{CRASHPAD_LOCATION}" - "${CRASHPAD_BASE_DIR}" - PATH_SUFFIXES - "third_party/mini_chromium/mini_chromium" + base/files/file_path.h + HINTS + "${CRASHPAD_LOCATION}" + "$ENV{CRASHPAD_LOCATION}" + "${CRASHPAD_BASE_DIR}" + PATH_SUFFIXES + "third_party/mini_chromium/mini_chromium" ) list(APPEND CRASHPAD_INCLUDE_DIRS ${CRASHPAD_BASE_INCLUDE_DIR}) # Try to find build files if (WIN32) find_path(CRASHPAD_LIBRARY_DIRS - obj/client/client.lib - HINTS - "${CRASHPAD_LOCATION}" - "$ENV{CRASHPAD_LOCATION}" - "${CRASHPAD_BASE_DIR}" - PATH_SUFFIXES - "out/Default" + obj/client/client.lib + HINTS + "${CRASHPAD_LOCATION}" + "$ENV{CRASHPAD_LOCATION}" + "${CRASHPAD_BASE_DIR}" + PATH_SUFFIXES + "out/Default" ) elseif(UNIX) # Assuming macOS works this way, don't actually know find_path(CRASHPAD_LIBRARY_DIRS - obj/client/libclient.a - HINTS - "${CRASHPAD_LOCATION}" - "$ENV{CRASHPAD_LOCATION}" - "${CRASHPAD_BASE_DIR}" - PATH_SUFFIXES - "out/Default" + obj/client/libclient.a + HINTS + "${CRASHPAD_LOCATION}" + "$ENV{CRASHPAD_LOCATION}" + "${CRASHPAD_BASE_DIR}" + PATH_SUFFIXES + "out/Default" ) 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 - ${SHORT_COMPONENT} - HINTS "${CRASHPAD_LIBRARY_DIRS}/obj/${SUBDIR}" + find_library(CRASHPAD_${UPPER_COMPONENT}_LIB + ${SHORT_COMPONENT} + 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 +if (UNIX) + find_path(BREAKPAD_BIN_DIR + minidump_stackwalk + HINTS + "${BREAKPAD_LOCATION}" + "$ENV{BREAKPAD_LOCATION}" + "${BREAKPAD_BASE_DIR}" + PATH_SUFFIXES + breakpad/bin + ) endif() find_package_handle_standard_args(GoogleCrashpad - REQUIRED_VARS - CRASHPAD_LIBRARIES - CRASHPAD_INCLUDE_DIRS + REQUIRED_VARS + CRASHPAD_LIBRARIES + CRASHPAD_INCLUDE_DIRS + BREAKPAD_BIN_DIR ) From 65be374a7007a5383abb13e98aa09e1c05b47aef Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 00:34:26 +0200 Subject: [PATCH 04/14] Split Windows and macOS into separate jobs --- .github/workflows/ci.yml | 299 +++++++++++++++++++++++++-------------- 1 file changed, 195 insertions(+), 104 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4756b7f3..0205a0c79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: branches: - master +env: + DOWNLOAD_TOOL: curl -fLOSs --retry 3 + jobs: windows: strategy: @@ -20,24 +23,12 @@ jobs: 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 name: | ${{ matrix.os-name }} <${{ matrix.compiler-name }}, ${{ matrix.build-type }}> runs-on: ${{ matrix.os }} - env: - DOWNLOAD_TOOL: curl -fLOSs --retry 3 - steps: - name: Checkout Source Code uses: actions/checkout@v2 @@ -56,7 +47,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 @@ -132,111 +122,65 @@ 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 - cp app/olive-editor.pdb olive-editor - windeployqt olive-editor/olive-crashhandler.exe - 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 + mkdir olive-editor + cp app/olive-editor.exe olive-editor + cp app/olive-crashhandler.exe olive-editor + cp app/olive-editor.pdb olive-editor + windeployqt olive-editor/olive-crashhandler.exe + 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 - 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 - cp $(cygpath $GITHUB_WORKSPACE)/app/packaging/windows/nsis/* . - cp $(cygpath $GITHUB_WORKSPACE)/LICENSE . - makensis -V4 -DX64 "-XOutFile $PKGNAME.exe" olive.nsi + # Create Installer Executable + $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 - # 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 + # Create Portable ZIP + echo -n > olive-editor/portable + 7z a $PKGNAME.zip olive-editor + + - 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" \ - -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 + curl -X POST \ + -F file=@$PKGNAME.exe \ + -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 - 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 - 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' + 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 - name: Export Crashpad Symbols and Upload To Server working-directory: ${{ runner.workspace }}/build @@ -250,4 +194,151 @@ 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 + dep-suffix: mac.zip + extract-tool: sudo unzip -d /usr/local -o + name: | + ${{ matrix.os-name }} + <${{ matrix.compiler-name }}, + ${{ matrix.build-type }}> + 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 + 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 + + - 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 + + - 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 + + - 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 + + - 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 + + - 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" + + - 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 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 + + - name: Upload Artifact to GitHub + uses: actions/upload-artifact@v2 + with: + name: ${{ env.PKGNAME }}.zip + path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.zip From 68f40101f5f5e3bf32e08e5f69c254c13bb09c1b Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 00:47:13 +0200 Subject: [PATCH 05/14] No need for DEP_SUFFIX, EXTRACT_TOOL & CMAKE_GEN env vars --- .github/workflows/ci.yml | 96 ++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 64 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0205a0c79..5aed075ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,13 @@ jobs: os-arch: x86_64 os: windows-latest cmake-gen: Ninja - dep-suffix: win.7z - extract-tool: 7z x + 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 }} steps: @@ -39,7 +40,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: | @@ -55,57 +56,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 @@ -207,12 +191,13 @@ jobs: 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: sudo unzip -d /usr/local -o name: | ${{ matrix.os-name }} <${{ matrix.compiler-name }}, - ${{ matrix.build-type }}> + ${{ matrix.build-type }}, + ${{ matrix.cmake-gen }}> runs-on: ${{ matrix.os }} steps: @@ -225,7 +210,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: | @@ -238,57 +223,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-mac.zip + $EXTRACT_TOOL ffmpeg-mac.zip - 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-mac.zip + $EXTRACT_TOOL ocio-mac.zip - 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-mac.zip + $EXTRACT_TOOL openexr-mac.zip - 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-mac.zip + $EXTRACT_TOOL oiio-mac.zip - 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-mac.zip + $EXTRACT_TOOL crashpad-mac.zip - 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 From 31674e0a3160a6f934b677eb1cea860ee09494ca Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 00:47:34 +0200 Subject: [PATCH 06/14] Fix indention --- .github/workflows/ci.yml | 254 +++++++++++++++++++-------------------- 1 file changed, 127 insertions(+), 127 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5aed075ca..4ab6ce30f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,153 +31,153 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Checkout Source Code - uses: actions/checkout@v2 + - 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: 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: Create Build Folder + run: | + cmake -E make_directory ${{ runner.workspace }}/build - - name: Enable Developer Command Prompt (Windows) - uses: ilammy/msvc-dev-cmd@v1.3.0 + - name: Enable Developer Command Prompt (Windows) + uses: ilammy/msvc-dev-cmd@v1.3.0 - - name: Acquire Qt - uses: jurplel/install-qt-action@v2.8.0 - with: - version: 5.15.1 + - 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-win.7z - $EXTRACT_TOOL ffmpeg-win.7z + - name: Acquire FFmpeg + shell: bash + run: | + $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ffmpeg-win.7z + $EXTRACT_TOOL ffmpeg-win.7z - - name: Acquire OpenColorIO - shell: bash - run: | - $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ocio-win.7z - $EXTRACT_TOOL ocio-win.7z + - name: Acquire OpenColorIO + shell: bash + run: | + $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/ocio-win.7z + $EXTRACT_TOOL ocio-win.7z - - name: Acquire OpenEXR - shell: bash - run: | - $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/openexr-win.7z - $EXTRACT_TOOL openexr-win.7z + - name: Acquire OpenEXR + shell: bash + run: | + $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/openexr-win.7z + $EXTRACT_TOOL openexr-win.7z - - name: Acquire OpenImageIO - shell: bash - run: | - $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/oiio-win.7z - $EXTRACT_TOOL oiio-win.7z + - name: Acquire OpenImageIO + shell: bash + run: | + $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/oiio-win.7z + $EXTRACT_TOOL oiio-win.7z - - name: Acquire Crashpad - shell: bash - run: | - $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/crashpad-win.7z - $EXTRACT_TOOL crashpad-win.7z + - name: Acquire Crashpad + shell: bash + run: | + $DOWNLOAD_TOOL http://olivevideoeditor.org/deps/crashpad-win.7z + $EXTRACT_TOOL crashpad-win.7z - - 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: 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: 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: 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: | - mkdir olive-editor - cp app/olive-editor.exe olive-editor - cp app/olive-crashhandler.exe olive-editor - cp app/olive-editor.pdb olive-editor - windeployqt olive-editor/olive-crashhandler.exe - 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 + - name: Create Package + working-directory: ${{ runner.workspace }}/build + shell: bash + run: | + mkdir olive-editor + cp app/olive-editor.exe olive-editor + cp app/olive-crashhandler.exe olive-editor + cp app/olive-editor.pdb olive-editor + windeployqt olive-editor/olive-crashhandler.exe + 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 - - name: Deploy Packages - working-directory: ${{ runner.workspace }}/build - shell: bash - run: | - # Create Installer Executable - $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 + - name: Deploy Packages + working-directory: ${{ runner.workspace }}/build + shell: bash + run: | + # Create Installer Executable + $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 - # Create Portable ZIP - echo -n > olive-editor/portable - 7z a $PKGNAME.zip olive-editor + # Create Portable ZIP + echo -n > olive-editor/portable + 7z a $PKGNAME.zip olive-editor - - 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 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 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 }} - if: github.event_name == 'push' - run: | - curl -X POST \ - -F file=@$PKGNAME.exe \ - -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 + - 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.exe \ + -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 - 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 + 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 - - name: Export Crashpad Symbols and Upload To Server - working-directory: ${{ runner.workspace }}/build - shell: bash - env: - GH_AUTH_KEY: ${{ secrets.GH_AUTH_KEY }} - run: | - curl -fLSs --retry 3 https://github.com/google/breakpad/blob/master/src/tools/windows/binaries/dump_syms.exe?raw=true > dump_syms.exe - ./dump_syms app/olive-editor.pdb > olive-editor.sym - curl -X POST \ - -F symfile=@olive-editor.sym \ - -F key="$GH_AUTH_KEY" \ - https://olivevideoeditor.org/crashpad/symbols.php + - name: Export Crashpad Symbols and Upload To Server + working-directory: ${{ runner.workspace }}/build + shell: bash + env: + GH_AUTH_KEY: ${{ secrets.GH_AUTH_KEY }} + run: | + curl -fLSs --retry 3 https://github.com/google/breakpad/blob/master/src/tools/windows/binaries/dump_syms.exe?raw=true > dump_syms.exe + ./dump_syms app/olive-editor.pdb > olive-editor.sym + curl -X POST \ + -F symfile=@olive-editor.sym \ + -F key="$GH_AUTH_KEY" \ + https://olivevideoeditor.org/crashpad/symbols.php macos: strategy: From 5614c293f394535ccc7885cf8b10b1283816672b Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 00:53:53 +0200 Subject: [PATCH 07/14] Add Docker-based Linux (CentOS 7) CI --- .github/workflows/ci.yml | 80 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ab6ce30f..3a31ffbe3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,86 @@ 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: + - uses: actions/checkout@v2 + with: + repository: olive-editor/olive + + - name: Configure + 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: Install + working-directory: build + run: | + cmake --install app --prefix appdir/usr + + - name: Bundle + id: bundle + working-directory: build + env: + ARCH: x86_64 + run: | + export VERSION=${GITHUB_SHA::8} + /usr/local/linuxdeployqt-x86_64.AppImage \ + appdir/usr/share/applications/org.olivevideoeditor.Olive.desktop \ + -appimage \ + --appimage-extract-and-run + filename=$(echo Olive*.AppImage) + mv "${filename}" "${filename/x86_64/Linux-x86_64}" + echo "::set-output name=artifact::${filename/x86_64/Linux-x86_64-${{ matrix.cc-compiler }}}" + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.bundle.outputs.artifact }} + path: build/Olive*.AppImage + windows: strategy: matrix: From 5b6e6e70ee1bba92aad390eab9c6ebcc26a54925 Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 00:55:31 +0200 Subject: [PATCH 08/14] Upload to GitHub first in case remote server not reachable --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a31ffbe3..e55a9cdf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -370,6 +370,12 @@ jobs: 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 @@ -384,9 +390,3 @@ 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 - - - name: Upload Artifact to GitHub - uses: actions/upload-artifact@v2 - with: - name: ${{ env.PKGNAME }}.zip - path: ${{ runner.workspace }}/build/${{ env.PKGNAME }}.zip From b1cfe5789472bed99ea9459d04bbbb8b76cc91dc Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 01:19:52 +0200 Subject: [PATCH 09/14] Unify step names, add ctest --- .github/workflows/ci.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e55a9cdf5..0f3ff881d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,11 +45,10 @@ jobs: image: olivevideoeditor/ci-olive:${{ matrix.vfx-cy }}.${{ matrix.ci-common-version }} steps: - - uses: actions/checkout@v2 - with: - repository: olive-editor/olive + - name: Checkout Source Code + uses: actions/checkout@v2 - - name: Configure + - name: Configure CMake run: | mkdir build cd build @@ -63,30 +62,34 @@ jobs: run: | cmake --build . - - name: Install + - name: Test working-directory: build run: | - cmake --install app --prefix appdir/usr + ctest -C ${{ matrix.build-type }} - - name: Bundle - id: bundle + - name: Create Package + id: package working-directory: build env: ARCH: x86_64 run: | - export VERSION=${GITHUB_SHA::8} + 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) - mv "${filename}" "${filename/x86_64/Linux-x86_64}" + 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 + - name: Upload Artifact to GitHub uses: actions/upload-artifact@v2 with: - name: ${{ steps.bundle.outputs.artifact }} + name: ${{ steps.package.outputs.artifact }} path: build/Olive*.AppImage windows: From 341278f3d7e34220bb4410f8f95a3faa4a83f3af Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 01:26:39 +0200 Subject: [PATCH 10/14] Add nightly upload for Linux (GCC build only) --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f3ff881d..0041f5fd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,21 @@ jobs: 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: From f0019be680e22f15ad71e3082c089596c19f3a59 Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 01:26:59 +0200 Subject: [PATCH 11/14] Force LF line endings for .sh and .desktop --- .gitattributes | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 73d0f2945..70661ac67 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,5 +2,7 @@ * text=auto # Enforce LF line endings on source files -*.h text eol=lf -*.cpp text eol=lf +*.h text eol=lf +*.cpp text eol=lf +*.sh text eol=lf +*.desktop text eol=lf From 9fadd9905f081a5b378e039fc6400f60a123b39a Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 23 Sep 2020 01:55:47 +0200 Subject: [PATCH 12/14] Add Linux Docker image source files --- docker/ci-common/Dockerfile | 71 +++++++++ docker/ci-crashpad/Dockerfile | 37 +++++ docker/ci-ffmpeg/Dockerfile | 57 +++++++ docker/ci-olive/Dockerfile | 52 ++++++ docker/scripts/2/versions_common.sh | 9 ++ docker/scripts/2021/versions_base.sh | 13 ++ docker/scripts/base/install_cmake.sh | 11 ++ docker/scripts/build_crashpad.sh | 82 ++++++++++ docker/scripts/build_ffmpeg.sh | 158 +++++++++++++++++++ docker/scripts/common/before_build.sh | 10 ++ docker/scripts/common/copy_new_files.sh | 11 ++ docker/scripts/common/install_yumpackages.sh | 74 +++++++++ 12 files changed, 585 insertions(+) create mode 100644 docker/ci-common/Dockerfile create mode 100644 docker/ci-crashpad/Dockerfile create mode 100644 docker/ci-ffmpeg/Dockerfile create mode 100644 docker/ci-olive/Dockerfile create mode 100644 docker/scripts/2/versions_common.sh create mode 100644 docker/scripts/2021/versions_base.sh create mode 100644 docker/scripts/base/install_cmake.sh create mode 100644 docker/scripts/build_crashpad.sh create mode 100644 docker/scripts/build_ffmpeg.sh create mode 100644 docker/scripts/common/before_build.sh create mode 100644 docker/scripts/common/copy_new_files.sh create mode 100644 docker/scripts/common/install_yumpackages.sh diff --git a/docker/ci-common/Dockerfile b/docker/ci-common/Dockerfile new file mode 100644 index 000000000..ce97cc8c6 --- /dev/null +++ b/docker/ci-common/Dockerfile @@ -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 diff --git a/docker/ci-crashpad/Dockerfile b/docker/ci-crashpad/Dockerfile new file mode 100644 index 000000000..ad7edbe24 --- /dev/null +++ b/docker/ci-crashpad/Dockerfile @@ -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 / diff --git a/docker/ci-ffmpeg/Dockerfile b/docker/ci-ffmpeg/Dockerfile new file mode 100644 index 000000000..6333ba164 --- /dev/null +++ b/docker/ci-ffmpeg/Dockerfile @@ -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/. / diff --git a/docker/ci-olive/Dockerfile b/docker/ci-olive/Dockerfile new file mode 100644 index 000000000..386aa98f8 --- /dev/null +++ b/docker/ci-olive/Dockerfile @@ -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" diff --git a/docker/scripts/2/versions_common.sh b/docker/scripts/2/versions_common.sh new file mode 100644 index 000000000..834ac6960 --- /dev/null +++ b/docker/scripts/2/versions_common.sh @@ -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 diff --git a/docker/scripts/2021/versions_base.sh b/docker/scripts/2021/versions_base.sh new file mode 100644 index 000000000..a56e53747 --- /dev/null +++ b/docker/scripts/2021/versions_base.sh @@ -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 diff --git a/docker/scripts/base/install_cmake.sh b/docker/scripts/base/install_cmake.sh new file mode 100644 index 000000000..2aeeb9f0e --- /dev/null +++ b/docker/scripts/base/install_cmake.sh @@ -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 diff --git a/docker/scripts/build_crashpad.sh b/docker/scripts/build_crashpad.sh new file mode 100644 index 000000000..eece43c00 --- /dev/null +++ b/docker/scripts/build_crashpad.sh @@ -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) diff --git a/docker/scripts/build_ffmpeg.sh b/docker/scripts/build_ffmpeg.sh new file mode 100644 index 000000000..1f2c36a91 --- /dev/null +++ b/docker/scripts/build_ffmpeg.sh @@ -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* diff --git a/docker/scripts/common/before_build.sh b/docker/scripts/common/before_build.sh new file mode 100644 index 000000000..fb7383c89 --- /dev/null +++ b/docker/scripts/common/before_build.sh @@ -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 diff --git a/docker/scripts/common/copy_new_files.sh b/docker/scripts/common/copy_new_files.sh new file mode 100644 index 000000000..8c1009b4d --- /dev/null +++ b/docker/scripts/common/copy_new_files.sh @@ -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/ diff --git a/docker/scripts/common/install_yumpackages.sh b/docker/scripts/common/install_yumpackages.sh new file mode 100644 index 000000000..f5003675c --- /dev/null +++ b/docker/scripts/common/install_yumpackages.sh @@ -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" "" "") From 921be8f08d82e2fd626e3afa5d454f096401b720 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 23 Sep 2020 11:38:36 +1000 Subject: [PATCH 13/14] ci: updated windows breakpad path --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0041f5fd0..8d3e873c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -213,7 +213,7 @@ 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 + cp $(cygpath $GITHUB_WORKSPACE)/breakpad/bin/* olive-editor - name: Deploy Packages working-directory: ${{ runner.workspace }}/build From c0a874d43cf71df95066e6c1839e60f3dbdddefc Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 23 Sep 2020 11:48:37 +1000 Subject: [PATCH 14/14] cmake: fixed breakpad detection on windows --- cmake/FindGoogleCrashpad.cmake | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/cmake/FindGoogleCrashpad.cmake b/cmake/FindGoogleCrashpad.cmake index 0e56c35ec..2e6677549 100644 --- a/cmake/FindGoogleCrashpad.cmake +++ b/cmake/FindGoogleCrashpad.cmake @@ -88,17 +88,15 @@ if (UNIX AND NOT APPLE) endif() # Find Breakpad's minidump_stackwalk -if (UNIX) - find_path(BREAKPAD_BIN_DIR - minidump_stackwalk - HINTS - "${BREAKPAD_LOCATION}" - "$ENV{BREAKPAD_LOCATION}" - "${BREAKPAD_BASE_DIR}" - PATH_SUFFIXES - breakpad/bin - ) -endif() +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