Updated to 5.6.4. #812
Workflow file for this run
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: Linux. | |
on: | |
release: | |
types: [published] | |
repository_dispatch: | |
types: ["Restart linux workflow."] | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- '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' | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- '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' | |
jobs: | |
linux: | |
name: Rocky Linux 8 | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/telegramdesktop/tdesktop/centos_env | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
defaults: | |
run: | |
shell: scl enable gcc-toolset-12 -- bash --noprofile --norc -eo pipefail {0} | |
strategy: | |
matrix: | |
defines: | |
- "" | |
env: | |
UPLOAD_ARTIFACT: "true" | |
steps: | |
- name: Get repository name. | |
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | |
- name: Free some space. | |
run: | | |
echo "Free some space." | |
rm -rfv /__t/go | |
rm -rfv /__t/CodeQL | |
rm -rfv $LibrariesPath/tg_owt/out/Debug | |
- name: Clone. | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
path: ${{ env.REPO_NAME }} | |
- name: First set up. | |
run: | | |
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 | |
yum -y install epel-release | |
yum -y install wget p7zip | |
cd $REPO_NAME | |
cd .. | |
mkdir DesktopPrivate | |
cd DesktopPrivate | |
echo "#pragma once" > alpha_private.h | |
echo "#pragma once" > packer_private.h | |
echo '${{ secrets.ALPHA_PRIVATE }}' >> alpha_private.h | |
echo '${{ secrets.PACKER_PRIVATE }}' >> packer_private.h | |
cd .. | |
wget ${{ secrets.PACK_FILE }} -O p.7z | |
7za x p.7z -p${{ secrets.PACK_FILE_PASSWORD }} | |
- name: Telegram Desktop build. | |
run: | | |
cd $REPO_NAME | |
DEFINE="" | |
if [ -n "${{ matrix.defines }}" ]; then | |
DEFINE="-D ${{ matrix.defines }}=ON" | |
echo Define from matrix: $DEFINE | |
echo "ARTIFACT_NAME=Telegram_${{ matrix.defines }}" >> $GITHUB_ENV | |
else | |
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV | |
fi | |
./configure.sh \ | |
-D CMAKE_EXE_LINKER_FLAGS="-s" \ | |
-D TDESKTOP_API_ID=${{ secrets.API_ID }} \ | |
-D TDESKTOP_API_HASH=${{ secrets.API_HASH }} \ | |
-D DESKTOP_APP_SPECIAL_TARGET=linux \ | |
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \ | |
$DEFINE | |
cmake --build ../out --config Release --parallel | |
- name: Check. | |
run: | | |
filePath="$REPO_NAME/out/Release/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: Compress. | |
if: (github.event_name == 'release') | |
run: | | |
filePath="$REPO_NAME/out/Release/Telegram" | |
cp $filePath . | |
tar -cJvf Telegram.tar.xz Telegram | |
- name: Deploy. | |
if: (github.event_name == 'release') | |
run: | | |
bash ci_start.sh &> /dev/null | |
- name: Upload. | |
if: (github.event_name == 'release') | |
uses: svenstaro/upload-release-action@2.3.0 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./Telegram.tar.xz | |
tag: ${{ github.event.release.tag_name }} | |
asset_name: Telegram.tar.xz |