Skip to content

Commit

Permalink
Merge branch 'synfig:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedAdhamc authored Oct 23, 2024
2 parents a218038 + 4fadf28 commit 8455a38
Show file tree
Hide file tree
Showing 161 changed files with 5,258 additions and 15,045 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/conventional-commits-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
name: Conventional commits style check

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install conventional commits linter
run: npm install --save-dev @commitlint/config-conventional @commitlint/cli

- name: Configure commitlint
run: |
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
echo "module.exports = {extends: ['@commitlint/config-conventional'], rules: {'subject-case': [0, 'never']}}" > commitlint.config.js
- name: Lint current pull request title
run: jq --raw-output ".pull_request.title" "$GITHUB_EVENT_PATH" | npx commitlint --verbose
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/synfig-ci-self-hosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This is a basic workflow to help you get started with Actions

name: Synfig CI (Self-Hosted)

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-osx:
runs-on: osx-10.9
continue-on-error: false
name: "Synfig Studio (OSX package)"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: "Synfig Studio (OSX package)"
run: |
../../../morevna-builds.osx/build-synfig.sh https://github.com/$GITHUB_REPOSITORY $GITHUB_REF
build-source-tarballs:
runs-on: Linux
continue-on-error: false
name: "Synfig Studio (source tarballs)"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- name: "Synfig Studio (source tarballs)"
run: |
./autobuild/synfigstudio-release.sh
33 changes: 19 additions & 14 deletions .github/workflows/synfig-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
include:
# includes a new variable of npm with a value of 2
# for the matrix leg matching the os and version
- os: macos-12
name: macOS 12 Monterey (Autotools)
- os: macos-13
name: macOS 13 Ventura (Autotools)
toolchain: autotools
allow_failures: false

- os: macos-12
name: macOS 12 Monterey (CMake+Ninja)
- os: macos-13
name: macOS 13 Ventura (CMake+Ninja)
toolchain: cmake-ninja
allow_failures: true

Expand All @@ -47,27 +47,23 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Prepare ccache timestamp
id: ccache_timestamp
run: echo "::set-output name=timestamp::`date "+%Y%m%d-%H%M%S"`"
- uses: actions/checkout@v4

- name: Download ccache archive
id: ccache-archive
uses: actions/cache@v3
id: ccache-archive-restore
uses: actions/cache/restore@v4
with:
path: .ccache
key: ${{ matrix.os }}-ccache-${{ matrix.toolchain }}-${{ steps.ccache_timestamp.outputs.timestamp }}
key: synfig-ccache-${{ matrix.os }}-${{ matrix.toolchain }}
restore-keys:
${{ matrix.os }}-ccache-${{ matrix.toolchain }}-
synfig-ccache-${{ matrix.os }}-${{ matrix.toolchain }}

- name: Install dependencies (Brew)
if: runner.os == 'macOS'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_ANALYTICS: 1
run: ./1-setup-osx-brew.sh
run: ./1-setup-osx-brew.sh && brew update && brew reinstall libtool

- name: Install dependencies (apt)
if: runner.os == 'Linux'
Expand Down Expand Up @@ -105,3 +101,12 @@ jobs:

- name: ccache statistics
run: ccache --show-stats

- name: Save cache (only for master branch)
id: ccache-archive-save
if: github.ref_name == 'master'
uses: actions/cache/save@v4
with:
path: .ccache
key: synfig-ccache-${{ matrix.os }}-${{ matrix.toolchain }}

23 changes: 14 additions & 9 deletions .github/workflows/synfig-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,16 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Prepare ccache timestamp
id: ccache_timestamp
run: echo "::set-output name=timestamp::`date "+%Y%m%d-%H%M%S"`"
- uses: actions/checkout@v4

- name: Download ccache archive
id: ccache-archive
uses: actions/cache@v3
id: ccache-archive-restore
uses: actions/cache/restore@v4
with:
path: .ccache
key: ${{ matrix.os }}-ccache-${{ matrix.toolchain }}-${{ steps.ccache_timestamp.outputs.timestamp }}
key: synfig-ccache-${{ matrix.os }}-${{ matrix.toolchain }}
restore-keys:
${{ matrix.os }}-ccache-${{ matrix.toolchain }}-
synfig-ccache-${{ matrix.os }}-${{ matrix.toolchain }}

- name: Install dependencies (Brew)
if: runner.os == 'macOS'
Expand Down Expand Up @@ -78,3 +74,12 @@ jobs:
- name: ccache statistics
run: ccache --show-stats

- name: Save cache (only for master branch)
id: ccache-archive-save
if: github.ref_name == 'master'
uses: actions/cache/save@v4
with:
path: .ccache
key: synfig-ccache-${{ matrix.os }}-${{ matrix.toolchain }}

2 changes: 1 addition & 1 deletion .github/workflows/synfig-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Synfig Studio (Check appdata.xml)"
run: |
Expand Down
4 changes: 2 additions & 2 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[main]
host = https://www.transifex.com

[synfig.synfig-core]
[o:morevnaproject:p:synfig:r:synfig-core]
file_filter = synfig-core/po/<lang>.po
source_file = synfig-core/po/synfig.pot
source_lang = en
type = PO

[synfig.synfig-studio]
[o:morevnaproject:p:synfig:r:synfig-studio]
file_filter = synfig-studio/po/<lang>.po
source_file = synfig-studio/po/synfigstudio.pot
source_lang = en
Expand Down
2 changes: 1 addition & 1 deletion 1-install-vcpkg.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
set VCPKG_DEFAULT_TRIPLET=x64-windows
.\vcpkg.exe install fftw3 freetype gettext glibmm gtkmm libjpeg-turbo libpng libxmlpp libsigcpp pango sdl2-mixer zlib
.\vcpkg.exe install fftw3 freetype gettext glibmm gtkmm libjpeg-turbo libpng libxmlpp libsigcpp pango zlib
22 changes: 16 additions & 6 deletions 1-setup-linux-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# cairo fftw pango (image transformation and rendering functions)
# gtkmm3 (Synfig Studio GUI)
# libsig++ (GUI signals and events)
# sdl2 sdl2_mixer jack (audio output and synchronization)
# sdl2 jack (audio output and synchronization)
#
# 3. Runtime dependencies:
# adwaita-icon-theme (used to render GUI icons and styles)
Expand Down Expand Up @@ -65,6 +65,9 @@ echo "Checking dependencies..."
if ([ "$ID_LIKE" == "fedora" ] && [ "$VERSION_ID" > 22 ]); then
PKG_LIST="git \
intltool \
cmake \
ninja-build \
ccache \
libpng-devel \
libjpeg-devel \
fftw-devel \
Expand Down Expand Up @@ -93,7 +96,6 @@ if ([ "$ID_LIKE" == "fedora" ] && [ "$VERSION_ID" > 22 ]); then
gtkmm30-devel \
glibmm24-devel \
SDL2-devel \
SDL2_mixer-devel \
libxslt-devel python-devel python3-lxml"
# Fedora 34 and onward uses pipewire
if dnf -C list installed pipewire-jack-audio-connection-kit &> /dev/null; then
Expand All @@ -110,6 +112,9 @@ if ([ "$ID_LIKE" == "fedora" ] && [ "$VERSION_ID" > 22 ]); then
elif ( [ "$ID_LIKE" == "fedora" ] && [ "$VERSION_ID" <= 22 ] ) || ( [ "$ID_LIKE" == "rhel centos fedora" ] ); then
PKG_LIST="git \
intltool \
cmake \
ninja-build \
ccache \
libpng-devel \
libjpeg-devel \
fftw-devel \
Expand Down Expand Up @@ -139,7 +144,6 @@ elif ( [ "$ID_LIKE" == "fedora" ] && [ "$VERSION_ID" <= 22 ] ) || ( [ "$ID_LIKE"
gtkmm30-devel \
glibmm24-devel \
SDL2-devel \
SDL2_mixer-devel \
libxslt-devel python-devel python3-lxml"

if ! ( rpm -qv $PKG_LIST ); then
Expand All @@ -148,7 +152,7 @@ elif ( [ "$ID_LIKE" == "fedora" ] && [ "$VERSION_ID" <= 22 ] ) || ( [ "$ID_LIKE"
fi

elif [ "$ID_LIKE" == "suse opensuse" ]; then
PKG_LIST="git libpng-devel libjpeg-devel freetype-devel fontconfig-devel atk-devel pango-devel cairo-devel gtk3-devel gettext-devel libxml2-devel libxml++-devel gcc-c++ autoconf automake libtool libtool-ltdl-devel shared-mime-info"
PKG_LIST="git cmake ninja ccache libpng-devel libjpeg-devel freetype-devel fontconfig-devel atk-devel pango-devel cairo-devel gtk3-devel gettext-devel libxml2-devel libxml++-devel gcc-c++ autoconf automake libtool libtool-ltdl-devel shared-mime-info"
PKG_LIST="${PKG_LIST} OpenEXR-devel libmng-devel ImageMagick-c++-devel gtkmm3-devel glibmm2-devel"

if ! ( rpm -qv $PKG_LIST ); then
Expand Down Expand Up @@ -187,7 +191,8 @@ elif [ "$ID_LIKE" == "arch" ]; then
mlt \
openexr \
shared-mime-info \
cmake make \
cmake make ninja \
ccache \
python-lxml"
echo "Running pacman (root privileges are needed)..."
echo
Expand All @@ -198,6 +203,9 @@ elif [ -f /etc/altlinux-release ]; then
gcc-c++ \
git-core \
shared-mime-info \
cmake \
ninja-build \
ccache \
intltool \
gettext \
libjpeg-devel \
Expand Down Expand Up @@ -241,6 +249,9 @@ elif [ "$ID_LIKE" == "debian" ] || [ "$ID_LIKE" == "ubuntu" ] || [ "$ID_LIKE" ==
# Debian / Ubuntu
PKG_LIST=" \
build-essential \
cmake \
ninja-build \
ccache \
autoconf automake autopoint \
shared-mime-info \
libltdl3-dev \
Expand All @@ -259,7 +270,6 @@ elif [ "$ID_LIKE" == "debian" ] || [ "$ID_LIKE" == "ubuntu" ] || [ "$ID_LIKE" ==
libgl1-mesa-dev \
imagemagick \
libsdl2-dev \
libsdl2-mixer-dev \
bzip2 \
git-core \
libmng-dev \
Expand Down
3 changes: 1 addition & 2 deletions 1-setup-osx-brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ mlt \
ninja \
pkg-config \
python \
sdl2 \
sdl2_mixer"
sdl2"

export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ANALYTICS=1
Expand Down
85 changes: 31 additions & 54 deletions 2-build-cmake.sh
Original file line number Diff line number Diff line change
@@ -1,59 +1,36 @@
#!/usr/bin/env bash
#
# = Usage: =
# ./2-build-cmake.sh [OPTIONS]
#
# OPTIONS
# -d = Debug build (standard)
# -r = Release build
# -n = Don't write the run-portable.sh to the out dir
# -j NUMBER = Set parallel make jobs (1 <= NUMBER <= 999) (standard is 1)
# -i = Enable incremental build (disables the clean_build_dir, gen_dir_structure and the build_images steps). Before using this option, you will have to build Synfig Studio on time without this option on the selected build mode (or use the --rerender option)
# --rerender = Rerender the images (even if incremental build is activated)
# -p = Only print out the current active build settings and exit
# --data-prefix = The installed Synfig Studio looks for it's data (icons, sounds, etc) in [DATA_PREFIX]/share/. This option sets a custom DATA_PREFIX. (Standard is the out directory)
#
# = Examples =
# Make a debug build
# ./build-cmake -d
#
# Make a release build
# ./build-cmake -r
#
# Make a release build with two parallel make jobs
# ./build-cmake -r -j 2

#Define dir paths
pwd_dir="$PWD"
absolute_script_path="$(readlink -f "$0")"
absolute_base_dir="$(dirname "$absolute_script_path")"

cd ${absolute_base_dir}

# Include build folder names and build functions
source ./autobuild/build-cmake-common.sh

if [ $? -ne 0 ]
then
echo "Failed to include: ./autobuild/build-cmake-common.sh"
cd "$pwd_dir"
exit
fi

# Parse build options
parse_build_arguments "$@"
set -e

WORKDIR=$(dirname "$0")
cd "${WORKDIR}"
WORKDIR=$(pwd)

BUILDDIR=cmake-build

# Print build settings
print_build_settings
if [[ "$(uname -s)" =~ ^MSYS_NT.* ]] || [[ "$(uname -s)" =~ Msys$ ]]
then
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/opt/mlt-7.28.0/lib/pkgconfig"
fi

mkdir -p "${BUILDDIR}" && cd "${BUILDDIR}"

# Exec build steps
clean_build_dir
gen_dir_structure
build_etl
build_synfig_core
build_synfig_studio
write_portable_run_code
mode="Release"
if [[ -n $1 ]]
then
mode=$1
fi

# Print success, restore the current directory and exit
echo "Build successful to: ${absolute_base_dir}/${cmake_build_dir}/${out_dir}"
cd "$pwd_dir"
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_BUILD_TYPE="${mode}" ..
cmake --build .
cmake --install . >/dev/null
ctest --output-on-failure

echo
echo
echo "Done. Please check your Synfig installation in"
echo " ${WORKDIR}/${BUILDDIR}/output/$mode/"
echo
echo "You can start Synfig by executing"
echo " ${WORKDIR}/${BUILDDIR}/output/$mode/bin/synfigstudio"
echo
13 changes: 0 additions & 13 deletions 2-build-msys-cmake.sh

This file was deleted.

Loading

0 comments on commit 8455a38

Please sign in to comment.