Skip to content

Commit

Permalink
Merge branch 'RB-2.5' into RB-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Sep 12, 2023
2 parents b9a9b81 + fc5bc40 commit f5922bc
Show file tree
Hide file tree
Showing 125 changed files with 3,362 additions and 2,041 deletions.
152 changes: 152 additions & 0 deletions .github/workflows/build_installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: Build Installer

on:
workflow_dispatch: {}
push:

jobs:
win-installer:
name: Windows Installer
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
env:
CI: 'True'

steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Windows system packages
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: git mingw-w64-x86_64-wget unzip

- name: Install Natron pacman repository
run: |
mkdir ${GITHUB_WORKSPACE}/natron_pacman_repo
cd ${GITHUB_WORKSPACE}/natron_pacman_repo
wget https://github.com/NatronGitHub/Natron/releases/download/windows-mingw-package-repo/natron_package_repo.zip
unzip natron_package_repo.zip
NATRON_REPO_PATH=`cygpath -u $GITHUB_WORKSPACE`
echo -e "#NATRON_REPO_START\n[natron]\nSigLevel = Optional TrustAll\nServer = file://${NATRON_REPO_PATH}/natron_pacman_repo/\n#NATRON_REPO_END" >> /etc/pacman.conf
pacman -Syl natron
pacman -S --needed --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
- name: Build
id: build
run: |
NATRON_BUILD_WORKSPACE=${GITHUB_WORKSPACE}/natron_build
NATRON_BUILD_WORKSPACE_UNIX=$(cygpath -u ${NATRON_BUILD_WORKSPACE})
mkdir ${NATRON_BUILD_WORKSPACE_UNIX}
cd tools/jenkins
WORKSPACE=${NATRON_BUILD_WORKSPACE_UNIX} BUILD_NAME=natron BUILD_NUMBER=1 BITS=64 NATRON_LICENSE=GPL GIT_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git GIT_URL_IS_NATRON=1 SNAPSHOT_BRANCH=${GITHUB_REF_NAME} QT_VERSION_MAJOR=5 DISABLE_BREAKPAD=1 NOUPDATE=1 MKJOBS=$(nproc) MINIMIZE_DISK_USAGE=1 ./launchBuildMain.sh
ARCHIVE_DIR=${NATRON_BUILD_WORKSPACE_UNIX}/builds_archive/natron/1
INSTALLER_ZIP_UNIX=$(ls ${ARCHIVE_DIR}/Natron*Windows-x86_64.zip)
set -x
# Unzip installer zip for artifact upload so we don't get a zipped zip file.
cd ${ARCHIVE_DIR}
INSTALLER_DIR="${ARCHIVE_DIR}/i"
INSTALLER_NAME=$(basename ${INSTALLER_ZIP_UNIX} .zip)
mkdir -p ${INSTALLER_DIR}
cd ${INSTALLER_DIR}
unzip ${INSTALLER_ZIP_UNIX}
echo "INSTALLER_NAME=${INSTALLER_NAME}" >> $GITHUB_OUTPUT
echo "INSTALLER_DIR=$(cygpath -m ${INSTALLER_DIR})" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build.outputs.INSTALLER_NAME }}
path: ${{ steps.build.outputs.INSTALLER_DIR }}

win-installer-breakpad:
name: Windows Installer (with Breakpad crash reporting)
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
env:
CI: 'True'

steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Windows system packages
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: git mingw-w64-x86_64-wget unzip

- name: Install Natron pacman repository
run: |
mkdir ${GITHUB_WORKSPACE}/natron_pacman_repo
cd ${GITHUB_WORKSPACE}/natron_pacman_repo
wget https://github.com/NatronGitHub/Natron/releases/download/windows-mingw-package-repo/natron_package_repo.zip
unzip natron_package_repo.zip
NATRON_REPO_PATH=`cygpath -u $GITHUB_WORKSPACE`
echo -e "#NATRON_REPO_START\n[natron]\nSigLevel = Optional TrustAll\nServer = file://${NATRON_REPO_PATH}/natron_pacman_repo/\n#NATRON_REPO_END" >> /etc/pacman.conf
pacman -Syl natron
pacman -S --needed --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
- name: Build
id: build
run: |
NATRON_BUILD_WORKSPACE=${GITHUB_WORKSPACE}/natron_build
NATRON_BUILD_WORKSPACE_UNIX=$(cygpath -u ${NATRON_BUILD_WORKSPACE})
mkdir ${NATRON_BUILD_WORKSPACE_UNIX}
cd tools/jenkins
WORKSPACE=${NATRON_BUILD_WORKSPACE_UNIX} BUILD_NAME=natron BUILD_NUMBER=1 BITS=64 NATRON_LICENSE=GPL GIT_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git GIT_URL_IS_NATRON=1 SNAPSHOT_BRANCH=${GITHUB_REF_NAME} QT_VERSION_MAJOR=5 NOUPDATE=1 MKJOBS=$(nproc) MINIMIZE_DISK_USAGE=1 ./launchBuildMain.sh
ARCHIVE_DIR=${NATRON_BUILD_WORKSPACE_UNIX}/builds_archive/natron/1
INSTALLER_ZIP_UNIX=$(ls ${ARCHIVE_DIR}/Natron*-breakpad.zip)
set -x
# Unzip installer zip for artifact upload so we don't get a zipped zip file.
cd ${ARCHIVE_DIR}
INSTALLER_DIR="${ARCHIVE_DIR}/i"
INSTALLER_NAME=$(basename ${INSTALLER_ZIP_UNIX} .zip)
mkdir -p ${INSTALLER_DIR}
cd ${INSTALLER_DIR}
unzip ${INSTALLER_ZIP_UNIX}
echo "INSTALLER_NAME=${INSTALLER_NAME}" >> $GITHUB_OUTPUT
echo "INSTALLER_DIR=$(cygpath -m ${INSTALLER_DIR})" >> $GITHUB_OUTPUT
SYMBOLS_NAME="${INSTALLER_NAME}-symbols"
SYMBOLS_DIR="${ARCHIVE_DIR}/s"
cd ${ARCHIVE_DIR}
mv symbols ${SYMBOLS_NAME}
mkdir ${SYMBOLS_DIR}
mv ${SYMBOLS_NAME} ${SYMBOLS_DIR}
echo "SYMBOLS_NAME=${SYMBOLS_NAME}" >> $GITHUB_OUTPUT
echo "SYMBOLS_DIR=$(cygpath -m ${SYMBOLS_DIR})" >> $GITHUB_OUTPUT
- name: Upload installer
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build.outputs.INSTALLER_NAME }}
path: ${{ steps.build.outputs.INSTALLER_DIR }}

- name: Upload symbols
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build.outputs.SYMBOLS_NAME }}
path: ${{ steps.build.outputs.SYMBOLS_DIR }}
7 changes: 4 additions & 3 deletions .github/workflows/build_pacman_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: Build pacman repo

on:
workflow_dispatch: {}
pull_request:
paths:
- 'tools/MINGW-packages/**'
- '.github/workflows/build_pacman_repo.yml'
push:
branches:
- 'main'
- 'build_natron_packages'
paths:
- 'tools/MINGW-packages/**'
- '.github/workflows/build_pacman_repo.yml'
Expand Down
161 changes: 123 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Tests

on:
workflow_dispatch: {}
push:
branches:
- RB-2.5
- RB-2.6
- fix-ci # For testing. Remove before commit.
paths-ignore:
- Documentation
pull_request:
branches:
- RB-2.5
- RB-2.6
paths-ignore:
- Documentation

jobs:
test:
unix_test:
name: Test ${{ matrix.os }} Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
Expand All @@ -22,60 +26,141 @@ jobs:
env:
CI: 'True'
PYTHON_VERSION: ${{ matrix.python-version }}
# PYSIDE2_VERSION: ${{ matrix.pyside2-version }}
# PYSIDE2_QT_VERSION: ${{ matrix.pyside2-qt-version }}
OCIO_CONFIG_VERSION: 2.5
MATRIX_OS: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04] # macos-latest, windows-latest
python-version: ['2.7'] # '3.6', '3.9'
os: [ubuntu-latest] #macos-latest
python-version: ['3.10']
include:
- os: ubuntu-18.04
- os: ubuntu-latest
special-invocation: 'xvfb-run --auto-servernum '
python-version: '2.7'
# python-version: '3.6'
# pyside2-version: 5.12.0 # 5.12.1-5.12.6 fails on collection/segfaults on patch test
# - os: windows-latest
# python-version: '3.9'
# pyside2-version: 5.15 # No 5.12 wheel on Windows and Python 3.9
# - os: macos-latest
# python-version: '2.7'
# python-version: '3.6'
python-version: '3.10'
steps:
- name: Checkout branch
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Linux system packages
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
sudo apt update
sudo apt install libpulse-dev libegl1-mesa libopengl0 gcc-8 g++-8 libqt4-dev libqt4-opengl-dev libglew-dev libexpat1-dev \
gdb libcairo2-dev python-dev python-pyside libpyside-dev libshiboken-dev libtinyxml-dev liblcms2-dev libyaml-cpp-dev \
libopenjp2-7-dev libtiff-dev libjpeg-dev libpng-dev libwebp-dev libraw-dev libfreetype6-dev libssl-dev libboost-all-dev \
python-qtpy
sudo apt install build-essential libboost-serialization-dev libboost-system-dev libexpat1-dev libcairo2-dev \
qt5-qmake qtbase5-dev qtdeclarative5-dev \
python3-dev libshiboken2-dev libpyside2-dev python3-pyside2.qtwidgets python3-qtpy \
libwayland-dev libwayland-client0 libwayland-egl1 \
extra-cmake-modules clang
- name: Install Macos system packages
if: contains(matrix.os, 'macos')
shell: bash
run: |
brew install xctool python@2 boost giflib jpeg libpng libtiff libxml2 openssl pcre readline sqlite expat cairo \
gnu-sed glew openssl ilmbase openexr freetype fontconfig ffmpeg openjpeg libraw libheif openvdb
- name: Build
if: always() && !contains(github.ref, 'coverity_scan')
- name: Download OpenColorIO-Configs
run: |
./.github/workflows/gen_config.sh
./tools/travis/build.sh
- name: Upload coverage data to coveralls.io
if: contains(matrix.os, 'ubuntu') && contains(github.ref, 'coverity_scan')
shell: bash
env:
COVERALLS_FLAG_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
wget https://github.com/NatronGitHub/OpenColorIO-Configs/archive/Natron-v${OCIO_CONFIG_VERSION}.tar.gz
tar xzf Natron-v${OCIO_CONFIG_VERSION}.tar.gz
mv OpenColorIO-Configs-Natron-v${OCIO_CONFIG_VERSION} OpenColorIO-Configs
- name: Build Unix
run: |
ln -s Tests/google-mock Tests/google-test .
pushd Tests
gcov -lp *.gcno > /dev/null
popd ..
python -m pip install --upgrade cpp-coveralls
python -b -X dev -m cpp-coveralls -n --exclude /usr/include --exclude 'Tests/google-test' --exclude 'Tests/google-mock' \
--exclude 'google-test' --exclude 'google-mock' --exclude 'libs/OpenFX' --exclude-pattern '.*/moc_.*\.cpp' \
--exclude-pattern='.*/Tests/.*\.cpp' --exclude-pattern='.*/Tests/.*\.h'
mkdir build && cd build
cmake ../
make -j2
- name: Run Unix Tests
id: run-unix-tests
# Allow continuing after error so logs can be uploaded.
continue-on-error: true
run: |
cd build
mkdir Plugins && cd Plugins
wget https://github.com/NatronGitHub/openfx-io/releases/download/natron_testing/openfx-io-build-ubuntu_22-testing.zip
unzip openfx-io-build-ubuntu_22-testing.zip
cd ..
OFX_PLUGIN_PATH=$PWD/Plugins OCIO=$PWD/../OpenColorIO-Configs/blender/config.ocio ctest -V
- name: Upload ${{ matrix.os }} Test Log artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }} Test Logs
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log

- name: Check for test failures
if: steps.run-unix-tests.outcome == 'failure'
run: exit 1

win-test:
name: Test ${{ matrix.os }} Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: msys2 {0}
env:
CI: 'True'
PYTHON_VERSION: ${{ matrix.python-version }}
OCIO_CONFIG_VERSION: 2.5
MATRIX_OS: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ windows-latest]
python-version: ['3.10']
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Windows system packages
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: git base-devel mingw-w64-x86_64-cc mingw-w64-x86_64-qt5-base mingw-w64-x86_64-pyside2
mingw-w64-x86_64-shiboken2 mingw-w64-x86_64-python-qtpy mingw-w64-x86_64-ninja
mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-cairo mingw-w64-x86_64-expat
mingw-w64-x86_64-wget unzip

- name: Download OpenColorIO-Configs
run: |
wget https://github.com/NatronGitHub/OpenColorIO-Configs/archive/Natron-v${OCIO_CONFIG_VERSION}.tar.gz
tar xzf Natron-v${OCIO_CONFIG_VERSION}.tar.gz
mv OpenColorIO-Configs-Natron-v${OCIO_CONFIG_VERSION} OpenColorIO-Configs
- name: Build Windows
run: |
mkdir build && cd build
cmake ../
ninja
- name: Run Windows Tests
id: run-windows-tests
# Allow continuing after error so logs can be uploaded.
continue-on-error: true
run: |
cd build
mkdir Plugins && cd Plugins
wget https://github.com/NatronGitHub/openfx-io/releases/download/natron_testing/openfx-io-build-windows_latest-testing.zip
unzip openfx-io-build-windows_latest-testing.zip
cd ..
PYTHONHOME=/mingw64 OFX_PLUGIN_PATH=$PWD/Plugins OCIO=$PWD/../OpenColorIO-Configs/blender/config.ocio ctest -V
- name: Upload ${{ matrix.os }} Test Log artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }} Test Logs
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log

- name: Check for test failures
if: steps.run-windows-tests.outcome == 'failure'
run: exit 1
Loading

0 comments on commit f5922bc

Please sign in to comment.