Nightly Linux PKG #362
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
btype: | |
- Release | |
compiler: | |
- { compiler: GNU10, CC: gcc-10, CXX: g++-10, packages: gcc-10 g++-10 } | |
eco: [-DBINARY_PACKAGE_BUILD=ON] | |
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 \ | |
libimage-exiftool-perl \ | |
libgdk-pixbuf2.0-dev \ | |
libglib2.0-dev \ | |
libgraphicsmagick1-dev \ | |
libgtk-3-dev \ | |
libheif-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 \ | |
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@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
fetch-depth: 500 | |
submodules: true | |
path: src | |
# Fetch exiv2 source, because the version in Ubuntu 20.04 is tooooooo old. | |
- name: Checkout exiv2 source | |
uses: actions/checkout@v3 | |
with: | |
repository: 'Exiv2/exiv2' | |
# Exiv2 replaces AutoPtr with UniquePtr, before we update the base | |
# curve tool, stick to 0.27 branch. | |
ref: '0.27-maintenance' | |
path: 'exiv2-src' | |
fetch-depth: 1 | |
# Install manually compiled dependencies into system, so ansel will link | |
# against it and AppImage will grab it. | |
- name: Manually build exiv2 dependency | |
run: | | |
cd exiv2-src | |
cmake -B build -G Ninja \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-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 the next step | |
- name: Install OAM AVI codec for libavif | |
run: | | |
git clone --depth 1 https://aomedia.googlesource.com/aom | |
cd aom | |
cmake -B build -G Ninja \ | |
-DENABLE_DOCS=OFF \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DENABLE_EXAMPLES=OFF \ | |
-DENABLE_TESTS=OFF \ | |
-DAOM_TARGET_CPU=generic \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DBINARY_PACKAGE_BUILD=1 \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
sudo ninja -C build install | |
cd .. | |
# This is needed on Ubuntu 20.04, which has no libavif-dev package | |
- name: Install libavif from source | |
run: | | |
git clone --branch v0.11.1 --depth 1 https://github.com/AOMediaCodec/libavif.git | |
cd libavif | |
cmake -B build -G Ninja \ | |
-DAVIF_CODEC_AOM=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DBINARY_PACKAGE_BUILD=1 \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
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://github.com/aurelienpierreeng/ansel" | |
ROOM: "!SgRYbzspwqwwUgSQHC:matrix.org" | |
TAG: "v0.0.0" | |
needs: Win64 | |
steps: | |
- name: Checkout ansel source | |
uses: actions/checkout@v3 | |
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 }} |