* Improve Itcwb with non-raw files
* Change pre-dev builds wbrefinement
* Change template in pre-dev
* Improvment improccordinator.cc
* Forgotten observer convert
* Reenable wbauto autogrey as 5.8
* Remove wrong code
* Missing getrgbloc references
* Fixed bug due to bias in queu with temperaure correlation issue 6911
* Simpleprocess queue compatibility tif-jpg
* Preserve AWB edits from 5.9
In 5.9 for non-raw files,
1. RGB grey uses the unit multipliers with temperature bias applied.
2. Temperature correlation uses the equivalent of temperature 5000,
green 1, and red/blue equalizer 1.
* Refactor temperature correlation AWB code
* Fix inaccurate RGB grey WB preview after using ITC
The RGB grey automatic white balance algorithm caches the multipliers.
Temperature correlation automatic white balance also caches results to
the same location, but never uses it. This causes the RGB grey method to
produce incorrect results in the editor. Removing the temperature
correlation cache fixes the issue and does not have side-effects.
---------
Co-authored-by: U-PCSPECIALIST01\jdesm <jdesmis@gmail.com>
224 lines
8.1 KiB
YAML
224 lines
8.1 KiB
YAML
name: AppImage Build
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- releases
|
|
- 'release-[0-9]+.*'
|
|
tags:
|
|
- '[0-9]+.*'
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
- releases
|
|
- 'release-[0-9]+.*'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
publish_pre_dev_labels: '["Beep6581:wbrefinement"]'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build_type: [release, debug]
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
echo "Running apt update."
|
|
sudo apt update
|
|
echo "Installing dependencies with apt."
|
|
DEBIAN_FRONTEND=noninteractive sudo apt install -y cmake libgtk-3-dev libgtkmm-3.0-dev liblensfun-dev librsvg2-dev liblcms2-dev libfftw3-dev libiptcdata0-dev libtiff5-dev libcanberra-gtk3-dev liblensfun-bin libexpat1-dev libbrotli-dev zlib1g-dev libinih-dev
|
|
|
|
- name: Install Exiv2
|
|
run: |
|
|
EXIV2_VERSION='v0.28.1'
|
|
echo "Cloning Exiv2 $EXIV2_VERSION."
|
|
git clone --depth 1 --branch "$EXIV2_VERSION" https://github.com/Exiv2/exiv2.git ext/exiv2
|
|
|
|
echo "Configuring build."
|
|
mkdir ext/exiv2/build
|
|
cd ext/exiv2/build
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_BMFF=ON ..
|
|
|
|
echo "Building and installing."
|
|
sudo make -j$(nproc) install
|
|
|
|
- name: Configure build
|
|
run: |
|
|
export REF_NAME_FILTERED="$(echo '${{github.ref_name}}' | sed 's/[^A-z0-9_.-]//g')"
|
|
|
|
echo "Setting cache suffix."
|
|
if [ '${{github.ref_type}}' == 'tag' ]; then
|
|
export CACHE_SUFFIX=""
|
|
else
|
|
export CACHE_SUFFIX="5-$REF_NAME_FILTERED"
|
|
fi
|
|
export CACHE_SUFFIX="$CACHE_SUFFIX-AppImage"
|
|
echo "Cache suffix is '$CACHE_SUFFIX'."
|
|
|
|
echo "Making build directory."
|
|
mkdir build
|
|
echo "Changing working directory to the build directory."
|
|
cd build
|
|
|
|
echo "Running CMake configure."
|
|
cmake \
|
|
-DCMAKE_BUILD_TYPE='${{matrix.build_type}}' \
|
|
-DCACHE_NAME_SUFFIX="$CACHE_SUFFIX" \
|
|
-DPROC_TARGET_NUMBER="1" \
|
|
-DBUILD_BUNDLE="ON" \
|
|
-DBUNDLE_BASE_INSTALL_DIR="/" \
|
|
-DOPTION_OMP="ON" \
|
|
-DWITH_LTO="OFF" \
|
|
-DWITH_PROF="OFF" \
|
|
-DWITH_SAN="OFF" \
|
|
-DWITH_SYSTEM_KLT="OFF" \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DLENSFUNDBDIR="../share/lensfun/version_1" \
|
|
..
|
|
|
|
echo "Recording filtered ref name."
|
|
echo "REF_NAME_FILTERED=$REF_NAME_FILTERED" >> $GITHUB_ENV
|
|
|
|
- name: Build RawTherapee
|
|
working-directory: ./build
|
|
run: |
|
|
echo "Running make install."
|
|
make -j$(nproc) install DESTDIR=AppDir/usr/bin
|
|
echo "Moving usr/bin/share to usr/share."
|
|
mv AppDir/usr/bin/share AppDir/usr/
|
|
|
|
- name: Include Lensfun
|
|
run: |
|
|
echo "Patching lensfun-update-data script."
|
|
sudo sed -i 's/HTTPError\(, ValueError\)/URLError\1/' $(which lensfun-update-data)
|
|
echo "Updating Lensfun database."
|
|
lensfun-update-data
|
|
echo "Creating Lensfun directory in the build directory."
|
|
mkdir -p build/AppDir/usr/share/lensfun
|
|
echo "Copying Lensfun database to the build directory."
|
|
cp -R ~/.local/share/lensfun/updates/* build/AppDir/usr/share/lensfun/
|
|
|
|
- name: Restore AppImage tools from cache
|
|
id: appimage-tools-cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
key: appimage-tools-1
|
|
path: |
|
|
./build/linuxdeploy-x86_64.AppImage
|
|
./build/linuxdeploy-plugin-gtk.sh
|
|
|
|
- name: Download AppImage tools
|
|
if: ${{steps.appimage-tools-cache.outputs.cache-hit != 'true'}}
|
|
working-directory: ./build
|
|
run: |
|
|
echo "Downloading linuxdeploy."
|
|
curl --location 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' > linuxdeploy-x86_64.AppImage
|
|
echo "Downloading GTK plugin for linuxdeploy."
|
|
curl --location 'https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh' \
|
|
| sed 's/^\(export GTK_THEME\)/#\1/' \
|
|
> linuxdeploy-plugin-gtk.sh
|
|
echo "Setting execute bit on all AppImage tools."
|
|
chmod u+x linuxdeploy-*
|
|
|
|
- name: Package AppImage
|
|
working-directory: ./build
|
|
run: |
|
|
echo "LD_LIBRARY_PATH is '$LD_LIBRARY_PATH'. Adding /usr/local/lib."
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
|
|
|
echo "Creating artifact name."
|
|
if [ '${{github.ref_type}}' == 'tag' ]; then
|
|
ARTIFACT_NAME="RawTherapee_${REF_NAME_FILTERED}_${{matrix.build_type}}"
|
|
else
|
|
echo "Getting RawTherapee version."
|
|
export VERSION="$(grep -m 1 '^Version: .*$' 'AboutThisBuild.txt' | sed 's/^Version: \(.\+\)$/\1/')"
|
|
echo "Version is '$VERSION'."
|
|
FILTERED_VERSION="$(echo "$VERSION" | sed 's/[^A-z0-9_.-]//g')"
|
|
ARTIFACT_NAME="RawTherapee_${REF_NAME_FILTERED}_${FILTERED_VERSION}_${{matrix.build_type}}"
|
|
fi
|
|
echo "Artifact name is '$ARTIFACT_NAME'."
|
|
|
|
echo "Generating AppImage file name."
|
|
export OUTPUT="$ARTIFACT_NAME.AppImage"
|
|
echo "AppImage file name will be '$OUTPUT'."
|
|
|
|
echo "Packaging AppImage."
|
|
./linuxdeploy-x86_64.AppImage \
|
|
--appimage-extract-and-run \
|
|
--appdir AppDir \
|
|
--plugin gtk \
|
|
--output appimage
|
|
|
|
echo "Recording artifact name."
|
|
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{env.ARTIFACT_NAME}}.AppImage
|
|
path: ${{github.workspace}}/build/${{env.ARTIFACT_NAME}}.AppImage
|
|
|
|
- name: Prepare for publishing
|
|
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
|
|
run: |
|
|
echo "Setting publish name."
|
|
PUBLISH_NAME="RawTherapee_${REF_NAME_FILTERED}_${{matrix.build_type}}"
|
|
echo "Publish name is '$PUBLISH_NAME'."
|
|
|
|
echo "Renaming AppImage."
|
|
cp "build/$ARTIFACT_NAME.AppImage" "$PUBLISH_NAME.AppImage"
|
|
|
|
echo "Creating version file."
|
|
cp "build/AboutThisBuild.txt" "$PUBLISH_NAME-AboutThisBuild.txt"
|
|
|
|
echo "Recording publish name."
|
|
echo "PUBLISH_NAME=$PUBLISH_NAME" >> $GITHUB_ENV
|
|
|
|
- name: Publish artifacts
|
|
uses: softprops/action-gh-release@v1
|
|
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
|
|
with:
|
|
tag_name: nightly-github-actions
|
|
files: |
|
|
${{env.PUBLISH_NAME}}.AppImage
|
|
${{env.PUBLISH_NAME}}-AboutThisBuild.txt
|
|
|
|
- name: Prepare for publishing pre-dev
|
|
id: prepare-publish-pre-dev
|
|
if: ${{github.event_name == 'pull_request' && contains(fromJSON(env.publish_pre_dev_labels), github.event.pull_request.head.label)}}
|
|
run: |
|
|
echo "Making ref name."
|
|
REF_NAME_FILTERED="$(echo '${{github.event.pull_request.head.label}}' | tr ':' '_' | sed 's/[^A-z0-9_.-]//g')"
|
|
echo "Ref name is '$REF_NAME_FILTERED'."
|
|
|
|
echo "Setting publish name."
|
|
PUBLISH_NAME="RawTherapee_${REF_NAME_FILTERED}_${{matrix.build_type}}"
|
|
echo "Publish name is '$PUBLISH_NAME'."
|
|
|
|
echo "Renaming AppImage."
|
|
cp "build/$ARTIFACT_NAME.AppImage" "$PUBLISH_NAME.AppImage"
|
|
|
|
echo "Creating version file."
|
|
cp "build/AboutThisBuild.txt" "$PUBLISH_NAME-AppImage-AboutThisBuild.txt"
|
|
|
|
echo "Recording publish name."
|
|
echo "PUBLISH_NAME=$PUBLISH_NAME" >> $GITHUB_ENV
|
|
|
|
- name: Publish pre-dev artifacts
|
|
uses: softprops/action-gh-release@v1
|
|
if: ${{steps.prepare-publish-pre-dev.outcome == 'success'}}
|
|
with:
|
|
tag_name: pre-dev-github-actions
|
|
files: |
|
|
${{env.PUBLISH_NAME}}.AppImage
|
|
${{env.PUBLISH_NAME}}-AppImage-AboutThisBuild.txt
|