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-04-30 14:57:01 +00:00
|
|
|
- 'changelog.txt'
|
|
|
|
- 'LEGAL'
|
|
|
|
- 'LICENSE'
|
|
|
|
- '.github/**'
|
|
|
|
- '!.github/workflows/linux.yml'
|
|
|
|
- 'snap/**'
|
|
|
|
- 'Telegram/build/**'
|
|
|
|
- '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-04-30 14:57:01 +00:00
|
|
|
- 'changelog.txt'
|
|
|
|
- 'LEGAL'
|
|
|
|
- 'LICENSE'
|
|
|
|
- '.github/**'
|
|
|
|
- '!.github/workflows/linux.yml'
|
|
|
|
- 'snap/**'
|
|
|
|
- 'Telegram/build/**'
|
|
|
|
- '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:
|
2023-06-05 05:24:29 +00:00
|
|
|
name: Rocky Linux 8
|
2020-01-24 13:35:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
defines:
|
|
|
|
- ""
|
2021-02-22 22:20:18 +00:00
|
|
|
- "DESKTOP_APP_DISABLE_X11_INTEGRATION"
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
env:
|
2024-04-03 15:09:00 +00:00
|
|
|
UPLOAD_ARTIFACT: "true"
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
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-03-20 16:32:06 +00:00
|
|
|
- name: Clone.
|
2022-11-07 12:32:59 +00:00
|
|
|
uses: actions/checkout@v3.1.0
|
2020-03-20 16:32:06 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
path: ${{ env.REPO_NAME }}
|
|
|
|
|
|
|
|
- name: First set up.
|
|
|
|
run: |
|
2023-12-15 01:15:41 +00:00
|
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
|
|
|
|
docker pull ghcr.io/$GITHUB_REPOSITORY/centos_env
|
|
|
|
docker tag ghcr.io/$GITHUB_REPOSITORY/centos_env tdesktop:centos_env
|
2020-08-14 06:45:41 +00:00
|
|
|
|
2020-01-24 13:35:42 +00:00
|
|
|
- name: Telegram Desktop build.
|
|
|
|
run: |
|
2023-12-15 01:15:41 +00:00
|
|
|
cd $REPO_NAME
|
2020-01-24 13:35:42 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-12-15 01:15:41 +00:00
|
|
|
docker run --rm \
|
|
|
|
-v $PWD:/usr/src/tdesktop \
|
2024-02-06 15:12:38 +00:00
|
|
|
-e CONFIG=Debug \
|
2023-12-15 01:15:41 +00:00
|
|
|
tdesktop:centos_env \
|
|
|
|
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
|
2022-11-28 07:45:46 +00:00
|
|
|
-D CMAKE_C_FLAGS_DEBUG="" \
|
|
|
|
-D CMAKE_CXX_FLAGS_DEBUG="" \
|
2020-11-18 00:55:38 +00:00
|
|
|
-D CMAKE_C_FLAGS="-Werror" \
|
|
|
|
-D CMAKE_CXX_FLAGS="-Werror" \
|
|
|
|
-D CMAKE_EXE_LINKER_FLAGS="-s" \
|
2020-03-19 11:07:29 +00:00
|
|
|
-D TDESKTOP_API_TEST=ON \
|
2023-12-31 09:29:54 +00:00
|
|
|
-D DESKTOP_APP_DISABLE_AUTOUPDATE=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
|
|
|
|
|
|
|
- name: Check.
|
|
|
|
run: |
|
2021-12-11 03:12:43 +00:00
|
|
|
filePath="$REPO_NAME/out/Debug/Telegram"
|
2020-01-24 13:35:42 +00:00
|
|
|
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: |
|
2021-12-11 03:12:43 +00:00
|
|
|
cd $REPO_NAME/out/Debug
|
2024-04-03 18:04:18 +00:00
|
|
|
sudo mkdir artifact
|
|
|
|
sudo mv {Telegram,Updater} artifact/
|
2020-01-24 13:35:42 +00:00
|
|
|
- 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 }}
|
2021-12-11 03:12:43 +00:00
|
|
|
path: ${{ env.REPO_NAME }}/out/Debug/artifact/
|