2020-01-24 13:35:42 +00:00
|
|
|
name: Linux.
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2020-04-12 05:17:44 +00:00
|
|
|
- '**.md'
|
2020-05-02 14:53:16 +00:00
|
|
|
- '!docs/building-cmake.md'
|
2020-04-30 14:57:01 +00:00
|
|
|
- 'changelog.txt'
|
|
|
|
- 'LEGAL'
|
|
|
|
- 'LICENSE'
|
|
|
|
- '.github/**'
|
|
|
|
- '!.github/workflows/linux.yml'
|
|
|
|
- 'snap/**'
|
|
|
|
- 'Telegram/build/**'
|
|
|
|
- 'Telegram/Patches/**'
|
|
|
|
- 'Telegram/Resources/uwp/**'
|
|
|
|
- 'Telegram/Resources/winrc/**'
|
|
|
|
- 'Telegram/SourceFiles/platform/win/**'
|
|
|
|
- 'Telegram/SourceFiles/platform/mac/**'
|
|
|
|
- 'Telegram/Telegram/**'
|
|
|
|
- 'Telegram/configure.bat'
|
|
|
|
- 'Telegram/Telegram.plist'
|
2020-01-24 13:35:42 +00:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2020-04-12 05:17:44 +00:00
|
|
|
- '**.md'
|
2020-05-02 14:53:16 +00:00
|
|
|
- '!docs/building-cmake.md'
|
2020-04-30 14:57:01 +00:00
|
|
|
- 'changelog.txt'
|
|
|
|
- 'LEGAL'
|
|
|
|
- 'LICENSE'
|
|
|
|
- '.github/**'
|
|
|
|
- '!.github/workflows/linux.yml'
|
|
|
|
- 'snap/**'
|
|
|
|
- 'Telegram/build/**'
|
|
|
|
- 'Telegram/Patches/**'
|
|
|
|
- 'Telegram/Resources/uwp/**'
|
|
|
|
- 'Telegram/Resources/winrc/**'
|
|
|
|
- 'Telegram/SourceFiles/platform/win/**'
|
|
|
|
- 'Telegram/SourceFiles/platform/mac/**'
|
|
|
|
- 'Telegram/Telegram/**'
|
|
|
|
- 'Telegram/configure.bat'
|
|
|
|
- 'Telegram/Telegram.plist'
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
linux:
|
|
|
|
name: Ubuntu 14.04
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: ubuntu:trusty
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
defines:
|
|
|
|
- ""
|
2020-03-14 12:23:14 +00:00
|
|
|
- "DESKTOP_APP_DISABLE_DBUS_INTEGRATION"
|
2020-08-04 15:47:01 +00:00
|
|
|
- "TDESKTOP_DISABLE_GTK_INTEGRATION"
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
GIT: "https://github.com"
|
2020-03-01 11:38:25 +00:00
|
|
|
QT: "5_12_8"
|
|
|
|
QT_PREFIX: "/usr/local/desktop-app/Qt-5.12.8"
|
2020-01-24 13:35:42 +00:00
|
|
|
OPENSSL_VER: "1_1_1"
|
|
|
|
OPENSSL_PREFIX: "/usr/local/desktop-app/openssl-1.1.1"
|
2020-03-19 11:07:29 +00:00
|
|
|
CMAKE_VER: "3.17.0"
|
2020-01-24 13:35:42 +00:00
|
|
|
UPLOAD_ARTIFACT: "false"
|
|
|
|
ONLY_CACHE: "false"
|
2020-02-11 15:10:07 +00:00
|
|
|
MANUAL_CACHING: "6"
|
2020-01-24 13:35:42 +00:00
|
|
|
DOC_PATH: "docs/building-cmake.md"
|
2020-02-24 13:51:53 +00:00
|
|
|
AUTO_CACHING: "1"
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Get repository name.
|
|
|
|
run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}
|
|
|
|
|
2020-02-24 13:48:02 +00:00
|
|
|
- name: Disable man for further package installs.
|
|
|
|
run: |
|
|
|
|
cfgFile="/etc/dpkg/dpkg.cfg.d/no_man"
|
|
|
|
sudo touch $cfgFile
|
|
|
|
p() {
|
|
|
|
sudo echo "path-exclude=/usr/share/$1/*" >> $cfgFile
|
|
|
|
}
|
|
|
|
|
|
|
|
p man
|
|
|
|
p locale
|
|
|
|
p doc
|
|
|
|
|
2020-03-20 16:32:06 +00:00
|
|
|
- name: Apt install.
|
2020-02-24 13:51:53 +00:00
|
|
|
shell: bash
|
2020-01-24 13:35:42 +00:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install software-properties-common -y && \
|
2020-03-20 16:32:06 +00:00
|
|
|
sudo add-apt-repository ppa:git-core/ppa -y && \
|
|
|
|
sudo apt-get update && \
|
2020-01-24 13:35:42 +00:00
|
|
|
sudo apt-get install git libexif-dev liblzma-dev libz-dev libssl-dev \
|
2020-01-31 06:34:37 +00:00
|
|
|
libgtk2.0-dev libice-dev libsm-dev libicu-dev libdrm-dev dh-autoreconf \
|
2020-02-11 15:10:07 +00:00
|
|
|
autoconf automake build-essential libxml2-dev libass-dev libfreetype6-dev \
|
2020-01-24 13:35:42 +00:00
|
|
|
libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev \
|
2020-08-14 06:45:41 +00:00
|
|
|
libvorbis-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev \
|
2020-08-20 19:19:53 +00:00
|
|
|
libxcb-screensaver0-dev libjpeg-dev ninja-build \
|
2020-01-24 13:35:42 +00:00
|
|
|
libxcb-xfixes0-dev libxcb-keysyms1-dev libxcb-icccm4-dev libatspi2.0-dev \
|
|
|
|
libxcb-render-util0-dev libxcb-util0-dev libxcb-xkb-dev libxrender-dev \
|
2020-02-11 15:10:07 +00:00
|
|
|
libasound-dev libpulse-dev libxcb-sync0-dev libxcb-randr0-dev libegl1-mesa-dev \
|
|
|
|
libx11-xcb-dev libffi-dev libncurses5-dev pkg-config texi2html bison yasm \
|
2020-01-24 13:35:42 +00:00
|
|
|
zlib1g-dev xutils-dev python-xcbgen chrpath gperf wget -y --force-yes && \
|
|
|
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
|
|
|
|
sudo apt-get update && \
|
|
|
|
sudo apt-get install gcc-8 g++-8 -y && \
|
|
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 && \
|
|
|
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 && \
|
|
|
|
sudo update-alternatives --config gcc && \
|
|
|
|
sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test -y
|
|
|
|
|
2020-03-20 16:32:06 +00:00
|
|
|
- name: Clone.
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
path: ${{ env.REPO_NAME }}
|
|
|
|
|
|
|
|
- name: First set up.
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-01-24 13:35:42 +00:00
|
|
|
gcc --version
|
|
|
|
|
|
|
|
gcc --version > CACHE_KEY.txt
|
|
|
|
echo $MANUAL_CACHING >> CACHE_KEY.txt
|
2020-02-24 13:51:53 +00:00
|
|
|
if [ "$AUTO_CACHING" == "1" ]; then
|
|
|
|
thisFile=$REPO_NAME/.github/workflows/linux.yml
|
|
|
|
echo `md5sum $thisFile | cut -c -32` >> CACHE_KEY.txt
|
|
|
|
fi
|
2020-01-24 13:35:42 +00:00
|
|
|
md5cache=$(md5sum CACHE_KEY.txt | cut -c -32)
|
|
|
|
echo ::set-env name=CACHE_KEY::$md5cache
|
|
|
|
|
|
|
|
mkdir -p Libraries
|
|
|
|
cd Libraries
|
|
|
|
echo ::set-env name=LibrariesPath::`pwd`
|
|
|
|
|
|
|
|
- name: Patches.
|
|
|
|
run: |
|
|
|
|
echo "Find necessary commit from doc."
|
|
|
|
checkoutCommit=$(grep -A 1 "cd patches" $REPO_NAME/$DOC_PATH | sed -n 2p)
|
|
|
|
cd $LibrariesPath
|
|
|
|
git clone $GIT/desktop-app/patches.git
|
|
|
|
cd patches
|
|
|
|
eval $checkoutCommit
|
|
|
|
|
|
|
|
- name: CMake.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
|
|
|
file=cmake-$CMAKE_VER-Linux-x86_64.sh
|
|
|
|
wget $GIT/Kitware/CMake/releases/download/v$CMAKE_VER/$file
|
|
|
|
sudo mkdir /opt/cmake
|
|
|
|
sudo sh $file --prefix=/opt/cmake --skip-license
|
|
|
|
sudo ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
|
2020-03-19 11:07:29 +00:00
|
|
|
rm $file
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
cmake --version
|
|
|
|
|
|
|
|
- name: Opus cache.
|
|
|
|
id: cache-opus
|
2020-06-30 08:37:15 +00:00
|
|
|
uses: actions/cache@v2
|
2020-01-24 13:35:42 +00:00
|
|
|
with:
|
|
|
|
path: ${{ env.LibrariesPath }}/opus
|
|
|
|
key: ${{ runner.OS }}-opus-${{ env.CACHE_KEY }}
|
|
|
|
- name: Opus.
|
|
|
|
if: steps.cache-opus.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
2020-02-22 05:45:09 +00:00
|
|
|
git clone -b v1.3 --depth=1 $GIT/xiph/opus
|
2020-01-24 13:35:42 +00:00
|
|
|
cd opus
|
|
|
|
./autogen.sh
|
|
|
|
./configure
|
|
|
|
make -j$(nproc)
|
|
|
|
- name: Opus install.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath/opus
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
- name: Libva.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
|
|
|
git clone $GIT/01org/libva.git
|
|
|
|
cd libva
|
|
|
|
./autogen.sh --enable-static
|
|
|
|
make -j$(nproc)
|
|
|
|
sudo make install
|
2020-02-22 05:45:09 +00:00
|
|
|
cd ..
|
|
|
|
rm -rf libva
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
- name: Libvdpau.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
2020-02-22 05:45:09 +00:00
|
|
|
git clone -b libvdpau-1.2 --depth=1 https://gitlab.freedesktop.org/vdpau/libvdpau.git
|
2020-01-24 13:35:42 +00:00
|
|
|
cd libvdpau
|
|
|
|
./autogen.sh --enable-static
|
|
|
|
make -j$(nproc)
|
|
|
|
sudo make install
|
2020-02-22 05:45:09 +00:00
|
|
|
cd ..
|
|
|
|
rm -rf libvdpau
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
- name: FFmpeg cache.
|
|
|
|
id: cache-ffmpeg
|
2020-06-30 08:37:15 +00:00
|
|
|
uses: actions/cache@v2
|
2020-01-24 13:35:42 +00:00
|
|
|
with:
|
|
|
|
path: ${{ env.LibrariesPath }}/ffmpeg-cache
|
|
|
|
key: ${{ runner.OS }}-ffmpeg-${{ env.CACHE_KEY }}
|
|
|
|
- name: FFmpeg build.
|
|
|
|
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
|
|
|
git clone --branch release/3.4 $GIT/FFmpeg/FFmpeg ffmpeg
|
|
|
|
cd ffmpeg
|
2020-04-12 03:29:24 +00:00
|
|
|
./configure \
|
|
|
|
--disable-debug \
|
2020-01-24 13:35:42 +00:00
|
|
|
--disable-programs \
|
|
|
|
--disable-doc \
|
|
|
|
--disable-network \
|
2020-04-12 03:29:24 +00:00
|
|
|
--disable-autodetect \
|
2020-01-24 13:35:42 +00:00
|
|
|
--disable-everything \
|
2020-05-25 02:42:14 +00:00
|
|
|
--disable-alsa \
|
2020-04-12 03:29:24 +00:00
|
|
|
--disable-iconv \
|
|
|
|
--enable-libopus \
|
|
|
|
--enable-vaapi \
|
|
|
|
--enable-vdpau \
|
|
|
|
--enable-protocol=file \
|
2020-01-24 13:35:42 +00:00
|
|
|
--enable-hwaccel=h264_vaapi \
|
|
|
|
--enable-hwaccel=h264_vdpau \
|
|
|
|
--enable-hwaccel=mpeg4_vaapi \
|
|
|
|
--enable-hwaccel=mpeg4_vdpau \
|
|
|
|
--enable-decoder=aac \
|
|
|
|
--enable-decoder=aac_fixed \
|
|
|
|
--enable-decoder=aac_latm \
|
|
|
|
--enable-decoder=aasc \
|
|
|
|
--enable-decoder=alac \
|
|
|
|
--enable-decoder=flac \
|
|
|
|
--enable-decoder=gif \
|
|
|
|
--enable-decoder=h264 \
|
|
|
|
--enable-decoder=h264_vdpau \
|
|
|
|
--enable-decoder=hevc \
|
|
|
|
--enable-decoder=mp1 \
|
|
|
|
--enable-decoder=mp1float \
|
|
|
|
--enable-decoder=mp2 \
|
|
|
|
--enable-decoder=mp2float \
|
|
|
|
--enable-decoder=mp3 \
|
|
|
|
--enable-decoder=mp3adu \
|
|
|
|
--enable-decoder=mp3adufloat \
|
|
|
|
--enable-decoder=mp3float \
|
|
|
|
--enable-decoder=mp3on4 \
|
|
|
|
--enable-decoder=mp3on4float \
|
|
|
|
--enable-decoder=mpeg4 \
|
|
|
|
--enable-decoder=mpeg4_vdpau \
|
|
|
|
--enable-decoder=msmpeg4v2 \
|
|
|
|
--enable-decoder=msmpeg4v3 \
|
|
|
|
--enable-decoder=opus \
|
|
|
|
--enable-decoder=pcm_alaw \
|
|
|
|
--enable-decoder=pcm_f32be \
|
|
|
|
--enable-decoder=pcm_f32le \
|
|
|
|
--enable-decoder=pcm_f64be \
|
|
|
|
--enable-decoder=pcm_f64le \
|
|
|
|
--enable-decoder=pcm_lxf \
|
|
|
|
--enable-decoder=pcm_mulaw \
|
|
|
|
--enable-decoder=pcm_s16be \
|
|
|
|
--enable-decoder=pcm_s16be_planar \
|
|
|
|
--enable-decoder=pcm_s16le \
|
|
|
|
--enable-decoder=pcm_s16le_planar \
|
|
|
|
--enable-decoder=pcm_s24be \
|
|
|
|
--enable-decoder=pcm_s24daud \
|
|
|
|
--enable-decoder=pcm_s24le \
|
|
|
|
--enable-decoder=pcm_s24le_planar \
|
|
|
|
--enable-decoder=pcm_s32be \
|
|
|
|
--enable-decoder=pcm_s32le \
|
|
|
|
--enable-decoder=pcm_s32le_planar \
|
|
|
|
--enable-decoder=pcm_s64be \
|
|
|
|
--enable-decoder=pcm_s64le \
|
|
|
|
--enable-decoder=pcm_s8 \
|
|
|
|
--enable-decoder=pcm_s8_planar \
|
|
|
|
--enable-decoder=pcm_u16be \
|
|
|
|
--enable-decoder=pcm_u16le \
|
|
|
|
--enable-decoder=pcm_u24be \
|
|
|
|
--enable-decoder=pcm_u24le \
|
|
|
|
--enable-decoder=pcm_u32be \
|
|
|
|
--enable-decoder=pcm_u32le \
|
|
|
|
--enable-decoder=pcm_u8 \
|
|
|
|
--enable-decoder=pcm_zork \
|
|
|
|
--enable-decoder=vorbis \
|
|
|
|
--enable-decoder=wavpack \
|
|
|
|
--enable-decoder=wmalossless \
|
|
|
|
--enable-decoder=wmapro \
|
|
|
|
--enable-decoder=wmav1 \
|
|
|
|
--enable-decoder=wmav2 \
|
|
|
|
--enable-decoder=wmavoice \
|
|
|
|
--enable-encoder=libopus \
|
|
|
|
--enable-parser=aac \
|
|
|
|
--enable-parser=aac_latm \
|
|
|
|
--enable-parser=flac \
|
|
|
|
--enable-parser=h264 \
|
|
|
|
--enable-parser=hevc \
|
|
|
|
--enable-parser=mpeg4video \
|
|
|
|
--enable-parser=mpegaudio \
|
|
|
|
--enable-parser=opus \
|
|
|
|
--enable-parser=vorbis \
|
|
|
|
--enable-demuxer=aac \
|
|
|
|
--enable-demuxer=flac \
|
|
|
|
--enable-demuxer=gif \
|
|
|
|
--enable-demuxer=h264 \
|
|
|
|
--enable-demuxer=hevc \
|
|
|
|
--enable-demuxer=m4v \
|
|
|
|
--enable-demuxer=mov \
|
|
|
|
--enable-demuxer=mp3 \
|
|
|
|
--enable-demuxer=ogg \
|
|
|
|
--enable-demuxer=wav \
|
|
|
|
--enable-muxer=ogg \
|
|
|
|
--enable-muxer=opus
|
|
|
|
|
|
|
|
make -j$(nproc)
|
2020-04-12 03:29:24 +00:00
|
|
|
sudo make DESTDIR="$LibrariesPath/ffmpeg-cache" install
|
2020-02-22 05:45:09 +00:00
|
|
|
cd ..
|
|
|
|
rm -rf ffmpeg
|
2020-01-24 13:35:42 +00:00
|
|
|
- name: FFmpeg install.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
#List of files from cmake/external/ffmpeg/CMakeLists.txt.
|
|
|
|
copyLib() {
|
|
|
|
mkdir -p ffmpeg/$1
|
2020-04-12 03:29:24 +00:00
|
|
|
yes | cp -i ffmpeg-cache/usr/local/lib/$1.a ffmpeg/$1/$1.a
|
2020-01-24 13:35:42 +00:00
|
|
|
}
|
|
|
|
copyLib libavformat
|
|
|
|
copyLib libavcodec
|
|
|
|
copyLib libswresample
|
|
|
|
copyLib libswscale
|
|
|
|
copyLib libavutil
|
|
|
|
|
2020-04-12 03:29:24 +00:00
|
|
|
sudo cp -R ffmpeg-cache/. /
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
- name: OpenAL Soft.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
2020-03-02 07:31:04 +00:00
|
|
|
git clone -b openal-soft-1.20.1 --depth=1 $GIT/kcat/openal-soft.git
|
2020-02-22 05:45:09 +00:00
|
|
|
cd openal-soft/build
|
2020-04-12 03:29:24 +00:00
|
|
|
cmake .. \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DLIBTYPE:STRING=STATIC \
|
|
|
|
-DALSOFT_EXAMPLES=OFF \
|
|
|
|
-DALSOFT_TESTS=OFF \
|
|
|
|
-DALSOFT_UTILS=OFF \
|
|
|
|
-DALSOFT_CONFIG=OFF
|
2020-01-24 13:35:42 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
sudo make install
|
2020-02-22 05:45:09 +00:00
|
|
|
cd -
|
|
|
|
rm -rf openal-soft
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
- name: OpenSSL cache.
|
|
|
|
id: cache-openssl
|
2020-06-30 08:37:15 +00:00
|
|
|
uses: actions/cache@v2
|
2020-01-24 13:35:42 +00:00
|
|
|
with:
|
|
|
|
path: ${{ env.LibrariesPath }}/openssl-cache
|
|
|
|
key: ${{ runner.OS }}-${{ env.OPENSSL_VER }}-${{ env.CACHE_KEY }}
|
|
|
|
- name: OpenSSL build.
|
|
|
|
if: steps.cache-openssl.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
2020-02-25 13:56:11 +00:00
|
|
|
opensslDir=openssl_${OPENSSL_VER}
|
2020-02-22 05:45:09 +00:00
|
|
|
git clone -b OpenSSL_${OPENSSL_VER}-stable --depth=1 \
|
2020-02-25 13:56:11 +00:00
|
|
|
$GIT/openssl/openssl $opensslDir
|
|
|
|
cd $opensslDir
|
2020-07-12 19:35:19 +00:00
|
|
|
./config --prefix="$OPENSSL_PREFIX" no-tests
|
2020-01-24 13:35:42 +00:00
|
|
|
make -j$(nproc)
|
2020-04-12 03:29:24 +00:00
|
|
|
sudo make DESTDIR="$LibrariesPath/openssl-cache" install_sw
|
2020-02-22 05:45:09 +00:00
|
|
|
cd ..
|
2020-08-14 06:45:41 +00:00
|
|
|
# rm -rf $opensslDir # Keep this folder for WebRTC.
|
2020-01-24 13:35:42 +00:00
|
|
|
- name: OpenSSL install.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
2020-04-12 03:29:24 +00:00
|
|
|
sudo cp -R openssl-cache/. /
|
2020-01-24 13:35:42 +00:00
|
|
|
|
2020-05-25 02:40:47 +00:00
|
|
|
- name: Libwayland.
|
2020-01-24 13:35:42 +00:00
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
2020-06-05 19:38:18 +00:00
|
|
|
git clone -b 1.18.0 https://gitlab.freedesktop.org/wayland/wayland
|
2020-05-25 02:40:47 +00:00
|
|
|
cd wayland
|
|
|
|
./autogen.sh \
|
|
|
|
--enable-static \
|
|
|
|
--disable-documentation \
|
|
|
|
--disable-dtd-validation
|
2020-01-24 13:35:42 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
sudo make install
|
2020-02-22 05:45:09 +00:00
|
|
|
cd ..
|
2020-05-25 02:40:47 +00:00
|
|
|
rm -rf wayland
|
2020-01-24 13:35:42 +00:00
|
|
|
|
2020-05-25 02:40:47 +00:00
|
|
|
- name: Libxkbcommon.
|
2020-02-11 15:10:07 +00:00
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
2020-05-25 02:40:47 +00:00
|
|
|
git clone -b xkbcommon-0.8.4 --depth=1 $GIT/xkbcommon/libxkbcommon.git
|
|
|
|
cd libxkbcommon
|
|
|
|
./autogen.sh \
|
|
|
|
--disable-docs \
|
|
|
|
--disable-wayland \
|
|
|
|
--with-xkb-config-root=/usr/share/X11/xkb \
|
|
|
|
--with-x-locale-root=/usr/share/X11/locale
|
2020-02-11 15:10:07 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
sudo make install
|
|
|
|
cd ..
|
2020-05-25 02:40:47 +00:00
|
|
|
rm -rf libxkbcommon
|
2020-02-11 15:10:07 +00:00
|
|
|
|
2020-03-01 11:38:25 +00:00
|
|
|
- name: Qt 5.12.8 cache.
|
2020-01-24 13:35:42 +00:00
|
|
|
id: cache-qt
|
2020-06-30 08:37:15 +00:00
|
|
|
uses: actions/cache@v2
|
2020-01-24 13:35:42 +00:00
|
|
|
with:
|
|
|
|
path: ${{ env.LibrariesPath }}/qt-cache
|
2020-06-02 10:14:51 +00:00
|
|
|
key: ${{ runner.OS }}-qt-${{ env.CACHE_KEY }}-${{ hashFiles('**/qt*_5_12_8/*') }}
|
2020-03-01 11:38:25 +00:00
|
|
|
- name: Qt 5.12.8 build.
|
2020-01-24 13:35:42 +00:00
|
|
|
if: steps.cache-qt.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
2020-03-01 11:38:25 +00:00
|
|
|
git clone -b v5.12.8 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT}
|
2020-02-22 05:45:09 +00:00
|
|
|
cd qt_${QT}
|
2020-08-01 13:09:56 +00:00
|
|
|
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg
|
|
|
|
git submodule update qtbase qtwayland qtimageformats qtsvg
|
2020-01-24 13:35:42 +00:00
|
|
|
cd qtbase
|
2020-06-02 10:14:51 +00:00
|
|
|
find ../../patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
2020-05-31 05:48:04 +00:00
|
|
|
cd ..
|
|
|
|
cd qtwayland
|
2020-06-02 10:14:51 +00:00
|
|
|
find ../../patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
2020-05-31 05:48:04 +00:00
|
|
|
cd ..
|
2020-01-24 13:35:42 +00:00
|
|
|
|
2020-04-12 03:29:24 +00:00
|
|
|
./configure -prefix "$QT_PREFIX" \
|
2020-01-24 13:35:42 +00:00
|
|
|
-release \
|
|
|
|
-opensource \
|
|
|
|
-confirm-license \
|
|
|
|
-qt-zlib \
|
|
|
|
-qt-libpng \
|
|
|
|
-qt-libjpeg \
|
|
|
|
-qt-harfbuzz \
|
|
|
|
-qt-pcre \
|
|
|
|
-qt-xcb \
|
|
|
|
-no-gtk \
|
|
|
|
-static \
|
2020-02-16 09:25:26 +00:00
|
|
|
-dbus-runtime \
|
2020-01-24 13:35:42 +00:00
|
|
|
-openssl-linked \
|
|
|
|
-I "$OPENSSL_PREFIX/include" OPENSSL_LIBS="$OPENSSL_PREFIX/lib/libssl.a $OPENSSL_PREFIX/lib/libcrypto.a -ldl -lpthread" \
|
|
|
|
-nomake examples \
|
|
|
|
-nomake tests
|
|
|
|
|
|
|
|
make -j$(nproc)
|
2020-04-12 03:29:24 +00:00
|
|
|
sudo make INSTALL_ROOT="$LibrariesPath/qt-cache" install
|
2020-02-22 05:45:09 +00:00
|
|
|
cd ..
|
|
|
|
rm -rf qt_${QT}
|
2020-03-01 11:38:25 +00:00
|
|
|
- name: Qt 5.12.8 install.
|
2020-01-24 13:35:42 +00:00
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
2020-04-12 03:29:24 +00:00
|
|
|
sudo cp -R qt-cache/. /
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
- name: Breakpad cache.
|
|
|
|
id: cache-breakpad
|
2020-06-30 08:37:15 +00:00
|
|
|
uses: actions/cache@v2
|
2020-01-24 13:35:42 +00:00
|
|
|
with:
|
|
|
|
path: ${{ env.LibrariesPath }}/breakpad-cache
|
|
|
|
key: ${{ runner.OS }}-breakpad-${{ env.CACHE_KEY }}
|
|
|
|
- name: Breakpad clone.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
|
|
|
git clone https://chromium.googlesource.com/breakpad/breakpad
|
|
|
|
cd breakpad
|
|
|
|
git checkout bc8fb886
|
|
|
|
git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss
|
|
|
|
cd src/third_party/lss
|
|
|
|
git checkout a91633d1
|
|
|
|
- name: Breakpad build.
|
|
|
|
if: steps.cache-breakpad.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
|
|
|
BreakpadCache=$LibrariesPath/breakpad-cache
|
|
|
|
|
|
|
|
git clone https://chromium.googlesource.com/external/gyp
|
|
|
|
cd gyp
|
|
|
|
git checkout 9f2a7bb1
|
|
|
|
git apply ../patches/gyp.diff
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
cd breakpad
|
2020-04-12 03:29:24 +00:00
|
|
|
./configure
|
2020-01-24 13:35:42 +00:00
|
|
|
make -j$(nproc)
|
2020-04-12 03:29:24 +00:00
|
|
|
sudo make DESTDIR="$BreakpadCache" install
|
2020-01-24 13:35:42 +00:00
|
|
|
cd src
|
|
|
|
rm -r testing
|
|
|
|
git clone $GIT/google/googletest testing
|
|
|
|
cd tools
|
|
|
|
sed -i 's/minidump_upload.m/minidump_upload.cc/' linux/tools_linux.gypi
|
|
|
|
../../../gyp/gyp --depth=. --generator-output=.. -Goutput_dir=../out tools.gyp --format=cmake
|
|
|
|
cd ../../out/Default
|
|
|
|
cmake .
|
|
|
|
make -j$(nproc) dump_syms
|
|
|
|
|
|
|
|
mv dump_syms $BreakpadCache/
|
2020-02-22 05:45:09 +00:00
|
|
|
cd ..
|
|
|
|
rm -rf gyp breakpad
|
2020-01-24 13:35:42 +00:00
|
|
|
- name: Breakpad install.
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
2020-04-12 03:29:24 +00:00
|
|
|
sudo cp -R breakpad-cache/. /
|
2020-01-24 13:35:42 +00:00
|
|
|
mkdir -p breakpad/out/Default/
|
|
|
|
cp breakpad-cache/dump_syms breakpad/out/Default/dump_syms
|
|
|
|
|
2020-08-14 06:45:41 +00:00
|
|
|
- name: WebRTC cache.
|
|
|
|
id: cache-webrtc
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-08-20 19:19:53 +00:00
|
|
|
path: ${{ env.LibrariesPath }}/tg_owt
|
|
|
|
key: ${{ runner.OS }}-webrtc-${{ env.CACHE_KEY }}
|
2020-08-14 06:45:41 +00:00
|
|
|
- name: WebRTC.
|
|
|
|
if: steps.cache-webrtc.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
cd $LibrariesPath
|
|
|
|
|
2020-08-20 19:19:53 +00:00
|
|
|
git clone $GIT/desktop-app/tg_owt.git
|
|
|
|
mkdir -p tg_owt/out/Debug
|
|
|
|
cd tg_owt/out/Debug
|
|
|
|
cmake -G Ninja \
|
|
|
|
-DCMAKE_BUILD_TYPE=Debug \
|
|
|
|
-DTG_OWT_SPECIAL_TARGET=linux \
|
|
|
|
-DTG_OWT_LIBJPEG_INCLUDE_PATH=`pwd`/../../../qt_$QT/qtbase/src/3rdparty/libjpeg \
|
|
|
|
-DTG_OWT_OPENSSL_INCLUDE_PATH=$OPENSSL_PREFIX/include \
|
|
|
|
-DTG_OWT_OPUS_INCLUDE_PATH=/usr/local/include/opus \
|
|
|
|
-DTG_OWT_FFMPEG_INCLUDE_PATH=/usr/local/include \
|
|
|
|
../..
|
|
|
|
ninja
|
2020-08-14 06:45:41 +00:00
|
|
|
|
|
|
|
# Cleanup.
|
2020-08-20 19:19:53 +00:00
|
|
|
cd $LibrariesPath/tg_owt
|
|
|
|
mv out/Debug/libtg_owt.a libtg_owt.a
|
|
|
|
rm -rf out
|
|
|
|
mkdir -p out/Debug
|
|
|
|
mv libtg_owt.a out/Debug/libtg_owt.a
|
|
|
|
|
2020-08-14 06:45:41 +00:00
|
|
|
rm -rf $LibrariesPath/openssl_${OPENSSL_VER}
|
|
|
|
|
2020-01-24 13:35:42 +00:00
|
|
|
- name: Telegram Desktop build.
|
|
|
|
if: env.ONLY_CACHE == 'false'
|
|
|
|
run: |
|
|
|
|
cd $REPO_NAME/Telegram
|
|
|
|
|
|
|
|
DEFINE=""
|
|
|
|
if [ -n "${{ matrix.defines }}" ]; then
|
|
|
|
DEFINE="-D ${{ matrix.defines }}=ON"
|
|
|
|
echo Define from matrix: $DEFINE
|
2020-04-12 19:04:47 +00:00
|
|
|
echo ::set-env name=ARTIFACT_NAME::Telegram_${{ matrix.defines }}
|
|
|
|
else
|
|
|
|
echo ::set-env name=ARTIFACT_NAME::Telegram
|
2020-01-24 13:35:42 +00:00
|
|
|
fi
|
|
|
|
|
2020-03-19 11:07:29 +00:00
|
|
|
./configure.sh \
|
|
|
|
-D CMAKE_CXX_FLAGS="-s" \
|
|
|
|
-D TDESKTOP_API_TEST=ON \
|
|
|
|
-D DESKTOP_APP_USE_PACKAGED=OFF \
|
2020-08-10 14:10:42 +00:00
|
|
|
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \
|
2020-03-19 11:07:29 +00:00
|
|
|
$DEFINE
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
cd ../out/Debug
|
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
- name: Check.
|
|
|
|
if: env.ONLY_CACHE == 'false'
|
|
|
|
run: |
|
|
|
|
filePath="$REPO_NAME/out/Debug/bin/Telegram"
|
|
|
|
if test -f "$filePath"; then
|
|
|
|
echo "Build successfully done! :)"
|
|
|
|
|
|
|
|
size=$(stat -c %s "$filePath")
|
|
|
|
echo "File size of ${filePath}: ${size} Bytes."
|
|
|
|
else
|
|
|
|
echo "Build error, output file does not exist."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Move artifact.
|
|
|
|
if: env.UPLOAD_ARTIFACT == 'true'
|
|
|
|
run: |
|
|
|
|
cd $REPO_NAME/out/Debug/bin
|
|
|
|
mkdir artifact
|
|
|
|
mv Telegram artifact/
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
if: env.UPLOAD_ARTIFACT == 'true'
|
|
|
|
name: Upload artifact.
|
|
|
|
with:
|
2020-04-12 19:04:47 +00:00
|
|
|
name: ${{ env.ARTIFACT_NAME }}
|
2020-01-24 13:35:42 +00:00
|
|
|
path: ${{ env.REPO_NAME }}/out/Debug/bin/artifact/
|