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:
|
2020-11-12 09:24:13 +00:00
|
|
|
name: CentOS 7
|
2020-01-24 13:35:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-11-12 09:24:13 +00:00
|
|
|
container:
|
|
|
|
image: docker.pkg.github.com/telegramdesktop/tdesktop/centos_env
|
|
|
|
credentials:
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: scl enable devtoolset-8 -- bash --noprofile --norc -eo pipefail {0}
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
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:
|
|
|
|
UPLOAD_ARTIFACT: "false"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Get repository name.
|
2020-10-25 01:46:27 +00:00
|
|
|
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
2020-01-24 13:35:42 +00:00
|
|
|
|
2020-11-12 09:24:13 +00:00
|
|
|
- name: Yum install.
|
2020-01-24 13:35:42 +00:00
|
|
|
run: |
|
2020-11-12 09:24:13 +00:00
|
|
|
yum -y autoremove git
|
|
|
|
yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
|
|
|
|
yum -y install git
|
2020-01-24 13:35:42 +00:00
|
|
|
|
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.
|
|
|
|
run: |
|
2020-01-24 13:35:42 +00:00
|
|
|
gcc --version
|
2020-11-12 09:24:13 +00:00
|
|
|
ln -s $LibrariesPath Libraries
|
2020-08-14 06:45:41 +00:00
|
|
|
|
2020-01-24 13:35:42 +00:00
|
|
|
- name: Telegram Desktop build.
|
|
|
|
run: |
|
|
|
|
cd $REPO_NAME/Telegram
|
|
|
|
|
|
|
|
DEFINE=""
|
|
|
|
if [ -n "${{ matrix.defines }}" ]; then
|
|
|
|
DEFINE="-D ${{ matrix.defines }}=ON"
|
|
|
|
echo Define from matrix: $DEFINE
|
2020-10-25 01:46:27 +00:00
|
|
|
echo "ARTIFACT_NAME=Telegram_${{ matrix.defines }}" >> $GITHUB_ENV
|
2020-04-12 19:04:47 +00:00
|
|
|
else
|
2020-10-25 01:46:27 +00:00
|
|
|
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
|
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.
|
|
|
|
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/
|