Skip to content

Nightly Linux PKG

Nightly Linux PKG #745

Workflow file for this run

name: Nightly Linux PKG
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
Win64:
if: github.repository == 'aurelienpierreeng/ansel' || github.event_name == 'workflow_dispatch'
name: Nightly Ansel Linux build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
btype:
- Release
compiler:
- { compiler: GNU12, CC: gcc-12, CXX: g++-12, packages: gcc-12 g++-12 }
eco: [-DBINARY_PACKAGE_BUILD=ON -DUSE_XMLLINT=OFF]
target:
- skiptest
generator:
- Ninja
branch:
- { code: "${{ github.ref_name }}", label: stable }
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
INSTALL_PREFIX: ${{ github.workspace }}/AppDir/usr
ECO: ${{ matrix.eco }}
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
GENERATOR: ${{ matrix.generator }}
TARGET: ${{ matrix.target }}
DARKTABLE_CLI: ${{ github.workspace }}/AppDir/usr/bin/ansel-cli
BRANCH: ${{ matrix.branch.code }}
BUILD_NAME: ${{ matrix.branch.label }}
steps:
- name: Install compiler ${{ matrix.compiler.compiler }}
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install \
${{ matrix.compiler.packages }}
- name: Install Base Dependencies
run: |
sudo apt-get -y install \
build-essential \
appstream-util \
desktop-file-utils \
gettext \
git \
gdb \
intltool \
libatk1.0-dev \
libavifile-0.7-dev \
libcairo2-dev \
libcolord-dev \
libcolord-gtk-dev \
libcmocka-dev \
libcups2-dev \
libcurl4-gnutls-dev \
libde265-dev \
libimage-exiftool-perl \
libinih-dev \
libgdk-pixbuf2.0-dev \
libglib2.0-dev \
libgraphicsmagick1-dev \
libgtk-3-dev \
libjpeg-dev \
libjson-glib-dev \
liblcms2-dev \
liblensfun-dev \
liblensfun-bin \
liblensfun-data-v1 \
liblensfun1 \
liblua5.3-dev \
libgmic-dev \
libopenexr-dev \
libopenjp2-7-dev \
libosmgpsmap-1.0-dev \
libpango1.0-dev \
libpng-dev \
libportmidi-dev \
libpugixml-dev \
librsvg2-dev \
libsaxon-java \
libsecret-1-dev \
libsoup2.4-dev \
libsqlite3-dev \
libtiff5-dev \
libwebp-dev \
libx11-dev \
libx265-dev \
libxml2-dev \
libxml2-utils \
ninja-build \
perl \
po4a \
python3-jsonschema \
xsltproc \
zlib1g-dev \
squashfs-tools \
libfuse2 \
gstreamer1.0-tools \
debianutils;
# squashfs, libfuse2, gstreamer are deps of AppImage builder, not Ansel
- name: Checkout ansel source
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}
fetch-depth: 2000
fetch-tags: true
submodules: true
path: src
# We manually build those dependencies because they are critical, so we
# could control the version we bundled
- name: Checkout exiv2 source
uses: actions/checkout@v4
with:
repository: 'Exiv2/exiv2'
ref: 'v0.28.1'
path: 'exiv2-src'
fetch-depth: 1
# Install manually compiled dependencies into system, so ansel will link
# against it and AppImage will grab it.
#
# Exiv2 uses `CURL_LIBRARIES` which is only set by `FindCURL.cmake` module
# so we fix compatibility with `CURLConfig.cmake`.
- name: Manually build and install exiv2
run: |
cd exiv2-src
sed -i 's/find_package(CURL REQUIRED)/find_package(CURL REQUIRED)\nif(TARGET CURL::libcurl)\nset(CURL_LIBRARIES CURL::libcurl)\nendif()/g' cmake/findDependencies.cmake
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DEXIV2_ENABLE_VIDEO=OFF \
-DEXIV2_ENABLE_NLS=ON \
-DEXIV2_ENABLE_XMP=ON \
-DEXIV2_ENABLE_CURL=ON \
-DEXIV2_ENABLE_WEBREADY=ON \
-DEXIV2_ENABLE_BMFF=ON
ninja -C build
sudo ninja -C build install
cd ..
# This is needed for libavif and libheif.
# aom is not on GitHub so cannot use the action.
- name: Manually build and install OAM AVI codec for libavif and libheif
run: |
git clone --branch v3.7.1 --depth 1 https://aomedia.googlesource.com/aom aom-src
cd aom-src
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBINARY_PACKAGE_BUILD=1 \
-DBUILD_SHARED_LIBS=ON \
-DAOM_TARGET_CPU=generic \
-DENABLE_DOCS=OFF \
-DENABLE_EXAMPLES=OFF \
-DENABLE_TESTS=OFF
ninja -C build
sudo ninja -C build install
cd ..
# This is needed on Ubuntu 20.04, which has no libavif-dev package.
- name: Checkout libavif source
uses: actions/checkout@v4
with:
repository: 'AOMediaCodec/libavif'
ref: 'v0.11.1'
path: 'libavif-src'
fetch-depth: 1
- name: Manually build and install libavif
run: |
cd libavif-src
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBINARY_PACKAGE_BUILD=1 \
-DAVIF_CODEC_AOM=ON
ninja -C build
sudo ninja -C build install
cd ..
- name: Checkout libheif source
uses: actions/checkout@v4
with:
repository: 'strukturag/libheif'
ref: 'v1.17.5'
path: 'libheif-src'
fetch-depth: 1
# We only needs libheif to handle HEIC and AVIF, so keep minimal
# dependencies for it, which are libde265 and x265 for HEIC and aom for
# AVIF.
- name: Manually build and install libheif
run: |
cd libheif-src
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_LIBDE265=ON \
-DWITH_X265=ON \
-DWITH_AOM_ENCODER=ON \
-DWITH_AOM_DECODER=ON
ninja -C build
sudo ninja -C build install
cd ..
- name: Update lensfun data for root
if: ${{ success() }}
run: |
sudo lensfun-update-data
- name: Build and Install
run: |
cd src
sh .ci/ci-script-appimage.sh
- name: Package upload
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: ansel.${{ env.BUILD_NAME }}.AppImage
path: ${{ env.SRC_DIR }}/build/Ansel-*-x86_64.AppImage*
retention-days: 90
upload_to_release:
runs-on: ubuntu-latest
env:
REPO: "https:/aurelienpierreeng/ansel"
ROOM: "!SgRYbzspwqwwUgSQHC:matrix.org"
TAG: "v0.0.0"
needs: Win64
steps:
- name: Checkout ansel source
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ansel.stable.AppImage
- name: Update nightly release
uses: aurelienpierreeng/tip@master
with:
tag: ${{ env.TAG }}
rm: false
token: ${{ secrets.GITHUB_TOKEN }}
files: Ansel-*.AppImage*
- name: Install dependencies
run: |
python -m pip install simplematrixbotlib
- name: Notify Matrix
if: ${{ success() }}
run: |
FILENAME=$(find . -type f -iname "Ansel-*.AppImage")
MESSAGE="New AppImage [${FILENAME}](${{ env.REPO }}/releases/download/${{ env.TAG }}/${FILENAME}) built"
python .ci/matrix.py \
-m "$MESSAGE" \
-s ${{ secrets.MATRIX_SERVER }} \
-u ${{ secrets.MATRIX_USER }} \
-t ${{ secrets.MATRIX_ACCESS }} \
-r ${{ env.ROOM }}