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
acolwell committed Mar 18, 2024
2 parents f5922bc + 3a0271d commit 5d6e711
Show file tree
Hide file tree
Showing 147 changed files with 1,991 additions and 1,482 deletions.
68 changes: 43 additions & 25 deletions .github/workflows/build_installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ on:
workflow_dispatch: {}
push:

env:
NATRON_BUILD_WORKSPACE: 'D:/nbw'
CI: 'True'

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
uses: actions/checkout@v4.1.1
with:
submodules: recursive

Expand All @@ -29,19 +31,12 @@ jobs:

- 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
${GITHUB_WORKSPACE}/.github/workflows/install_natron_pacman_repo.sh ${GITHUB_WORKSPACE} ${GITHUB_WORKSPACE}/natron_pacman_repo
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}
Expand All @@ -64,8 +59,24 @@ jobs:
echo "INSTALLER_NAME=${INSTALLER_NAME}" >> $GITHUB_OUTPUT
echo "INSTALLER_DIR=$(cygpath -m ${INSTALLER_DIR})" >> $GITHUB_OUTPUT
- name: Build verify_plugin_loads binary
run: |
g++ -DWINDOWS -o verify_plugin_loads .github/workflows/verify_plugin_loads.cpp libs/OpenFX/HostSupport/src/ofxhBinary.cpp libs/OpenFX/HostSupport/src/ofxhUtilities.cpp -I libs/OpenFX/HostSupport/include/ -I libs/OpenFX/include/
- name: Uninstall Natron dependencies
run: |
pacman -Rs --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
- name: Verify plugin loading
run: |
INSTALLER_DIR=$(cygpath -u '${{ steps.build.outputs.INSTALLER_DIR }}')/${{ steps.build.outputs.INSTALLER_NAME }}
for x in $(find ${INSTALLER_DIR}/Plugins -name *.ofx); do
echo "Testing $(basename ${x}) ..."
PATH=${INSTALLER_DIR}/bin ./verify_plugin_loads.exe "${x}"
done
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.1
with:
name: ${{ steps.build.outputs.INSTALLER_NAME }}
path: ${{ steps.build.outputs.INSTALLER_DIR }}
Expand All @@ -76,12 +87,10 @@ jobs:
defaults:
run:
shell: msys2 {0}
env:
CI: 'True'

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

Expand All @@ -94,19 +103,12 @@ jobs:

- 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
${GITHUB_WORKSPACE}/.github/workflows/install_natron_pacman_repo.sh ${GITHUB_WORKSPACE} ${GITHUB_WORKSPACE}/natron_pacman_repo
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}
Expand Down Expand Up @@ -139,14 +141,30 @@ jobs:
echo "SYMBOLS_NAME=${SYMBOLS_NAME}" >> $GITHUB_OUTPUT
echo "SYMBOLS_DIR=$(cygpath -m ${SYMBOLS_DIR})" >> $GITHUB_OUTPUT
- name: Build verify_plugin_loads binary
run: |
g++ -DWINDOWS -o verify_plugin_loads .github/workflows/verify_plugin_loads.cpp libs/OpenFX/HostSupport/src/ofxhBinary.cpp libs/OpenFX/HostSupport/src/ofxhUtilities.cpp -I libs/OpenFX/HostSupport/include/ -I libs/OpenFX/include/
- name: Uninstall Natron dependencies
run: |
pacman -Rs --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
- name: Verify plugin loading
run: |
INSTALLER_DIR=$(cygpath -u '${{ steps.build.outputs.INSTALLER_DIR }}')/${{ steps.build.outputs.INSTALLER_NAME }}
for x in $(find ${INSTALLER_DIR}/Plugins -name *.ofx); do
echo "Testing $(basename ${x}) ..."
PATH=${INSTALLER_DIR}/bin ./verify_plugin_loads.exe "${x}"
done
- name: Upload installer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.1
with:
name: ${{ steps.build.outputs.INSTALLER_NAME }}
path: ${{ steps.build.outputs.INSTALLER_DIR }}

- name: Upload symbols
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.1
with:
name: ${{ steps.build.outputs.SYMBOLS_NAME }}
path: ${{ steps.build.outputs.SYMBOLS_DIR }}
29 changes: 17 additions & 12 deletions .github/workflows/build_pacman_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
shell: msys2 {0}
steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
submodules: recursive
- name: Setup MinGW environment
Expand All @@ -39,32 +39,37 @@ jobs:
- name: Install Inno Setup
run: choco install innosetup
shell: pwsh
- name: Prep MinGW package version list
run: |
pacman -Sl mingw64 msys > mingw-package-version-list.txt
- name: Restore natron repo directory from cache
id: restore-natron-repo-cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4.0.0
with:
path: tools/MINGW-packages/natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('tools/MINGW-packages/**/PKGBUILD') }}
path: natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('mingw-package-version-list.txt', 'tools/MINGW-packages/**/PKGBUILD') }}
- name: Build natron package repo
id: build-package-repo
# Allow continuing after error so cache gets updated and makes reruns faster.
continue-on-error: true
run: |
cd tools/MINGW-packages
./build_natron_package_repo.sh natron_repo
tools/MINGW-packages/build_natron_package_repo.sh natron_repo
REPO_VERSION=`cat ${GITHUB_WORKSPACE}/tools/MINGW-packages/windows_pacman_repo_version.txt`
echo "REPO_VERSION=${REPO_VERSION}" >> "$GITHUB_OUTPUT"
- name: Save natron repo directory to cache
id: save-natron-repo-cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4.0.0
# save even if build fails.
if: always()
with:
path: tools/MINGW-packages/natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('tools/MINGW-packages/**/PKGBUILD') }}
path: natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('mingw-package-version-list.txt', 'tools/MINGW-packages/**/PKGBUILD') }}
- name: Upload natron_package_repo artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.1
with:
name: natron_package_repo
path: tools/MINGW-packages/natron_repo
name: natron_package_repo-${{ steps.build-package-repo.outputs.REPO_VERSION }}
path: natron_repo
- name: Check on failures
if: steps.build-package-repo.outcome != 'success'
run: exit 1
60 changes: 38 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- RB-2.5
- RB-2.6
- fix-ci # For testing. Remove before commit.
paths-ignore:
- Documentation
pull_request:
Expand Down Expand Up @@ -40,7 +39,7 @@ jobs:
python-version: '3.10'
steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
submodules: recursive
- name: Install Linux system packages
Expand All @@ -66,34 +65,49 @@ jobs:
tar xzf Natron-v${OCIO_CONFIG_VERSION}.tar.gz
mv OpenColorIO-Configs-Natron-v${OCIO_CONFIG_VERSION} OpenColorIO-Configs
- name: Build Unix
- name: Download Plugins
run: |
mkdir build && cd build
cmake ../
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 ..
- name: Build Unix (debug)
run: |
mkdir debug && cd debug
cmake -DCMAKE_BUILD_TYPE=Debug ../
make -j2
- name: Run Unix Tests
id: run-unix-tests
- name: Run Unix Tests (debug)
id: run-unix-tests-debug
# Allow continuing after error so logs can be uploaded.
continue-on-error: true
run: |
cd build
cd debug
OFX_PLUGIN_PATH=$PWD/../Plugins OCIO=$PWD/../OpenColorIO-Configs/blender/config.ocio ctest -V
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 ..
- name: Build Unix (release)
run: |
mkdir release && cd release
cmake ../
make -j2
OFX_PLUGIN_PATH=$PWD/Plugins OCIO=$PWD/../OpenColorIO-Configs/blender/config.ocio ctest -V
- name: Run Unix Tests (release)
id: run-unix-tests-release
# Allow continuing after error so logs can be uploaded.
continue-on-error: true
run: |
cd release
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
uses: actions/upload-artifact@v4.3.1
with:
name: ${{ matrix.os }} Test Logs
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
path: ${{ github.workspace }}/release/Testing/Temporary/LastTest.log

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

win-test:
Expand All @@ -115,7 +129,7 @@ jobs:
python-version: ['3.10']
steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
submodules: recursive

Expand All @@ -124,10 +138,12 @@ jobs:
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
install: git mingw-w64-x86_64-wget unzip mingw-w64-x86_64-ninja mingw-w64-x86_64-cmake

- name: Install Natron pacman repository
run: |
${GITHUB_WORKSPACE}/.github/workflows/install_natron_pacman_repo.sh ${GITHUB_WORKSPACE} ${GITHUB_WORKSPACE}/natron_pacman_repo
pacman -S --needed --noconfirm mingw-w64-x86_64-natron-build-deps-qt5
- name: Download OpenColorIO-Configs
run: |
Expand Down Expand Up @@ -156,7 +172,7 @@ jobs:
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
uses: actions/upload-artifact@v4.3.1
with:
name: ${{ matrix.os }} Test Logs
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/install_natron_pacman_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

NATRON_DIR=
NATRON_REPO_DIR=
if [[ -z $1 || -z $2 ]]; then
echo "Usage: $(basename $0) <natron_directory> <natron_repo_directory>"
exit 1
else
NATRON_DIR=$(realpath $1)
NATRON_REPO_DIR=$(realpath $2)
fi

source ${NATRON_DIR}/tools/MINGW-packages/natron_repo_common.sh

if [[ ! -d ${NATRON_REPO_DIR} ]]; then
mkdir ${NATRON_REPO_DIR}
fi

cd ${NATRON_REPO_DIR}

WINDOWS_PACMAN_REPO_VERSION=`cat ${NATRON_DIR}/tools/MINGW-packages/windows_pacman_repo_version.txt`
ZIP_FILENAME="natron_package_repo-${WINDOWS_PACMAN_REPO_VERSION}.zip"
wget https://github.com/NatronGitHub/Natron/releases/download/windows-mingw-package-repo/${ZIP_FILENAME}

if [[ -e ${ZIP_FILENAME} ]]; then
unzip ${ZIP_FILENAME}
else
echo "Failed to fetch ${ZIP_FILENAME}"

echo "Building pacman repo locally."

# install necessary dependencies for building pacman repo.
pacman -S --needed --noconfirm git base-devel

${NATRON_DIR}/tools/MINGW-packages/build_natron_package_repo.sh ${NATRON_REPO_DIR}
fi

UNIX_NATRON_REPO_DIR=`cygpath -u ${NATRON_REPO_DIR}`
natron_repo_init ${UNIX_NATRON_REPO_DIR}
Loading

0 comments on commit 5d6e711

Please sign in to comment.