Skip to content

Commit

Permalink
Merge branch 'telegramdesktop:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
SwitchAlpha authored Feb 28, 2024
2 parents f2be0b3 + ec427ad commit 6f178f2
Show file tree
Hide file tree
Showing 1,268 changed files with 82,043 additions and 15,151 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ jobs:
run: |
sudo apt update
curl -sSL https://install.python-poetry.org | python3 -
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Free up some disk space.
uses: jlumbroso/free-disk-space@76866dbe54312617f00798d1762df7f43def6e5c
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8

- name: Docker image build.
run: |
Expand All @@ -40,6 +41,4 @@ jobs:
- name: Push the Docker image.
if: ${{ github.ref_name == github.event.repository.default_branch }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
docker push $IMAGE_TAG
run: docker push $IMAGE_TAG
29 changes: 12 additions & 17 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,8 @@ on:
jobs:

linux:
name: CentOS 7
name: Rocky Linux 8
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}/centos_env
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

defaults:
run:
shell: scl enable rh-python38 -- scl enable llvm-toolset-7.0 -- scl enable devtoolset-10 -- bash --noprofile --norc -eo pipefail {0}

strategy:
matrix:
Expand All @@ -75,12 +66,13 @@ jobs:

- name: First set up.
run: |
gcc --version
ln -s /usr/src/Libraries
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
- name: Telegram Desktop build.
run: |
cd $REPO_NAME/Telegram
cd $REPO_NAME
DEFINE=""
if [ -n "${{ matrix.defines }}" ]; then
Expand All @@ -91,18 +83,21 @@ jobs:
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
fi
./configure.sh \
docker run --rm \
-v $PWD:/usr/src/tdesktop \
-e CONFIG=Debug \
tdesktop:centos_env \
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
-D CMAKE_C_FLAGS_DEBUG="" \
-D CMAKE_CXX_FLAGS_DEBUG="" \
-D CMAKE_C_FLAGS="-Werror" \
-D CMAKE_CXX_FLAGS="-Werror" \
-D CMAKE_EXE_LINKER_FLAGS="-s" \
-D TDESKTOP_API_TEST=ON \
-D DESKTOP_APP_DISABLE_AUTOUPDATE=OFF \
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \
$DEFINE
cmake --build ../out --config Debug --parallel
- name: Check.
run: |
filePath="$REPO_NAME/out/Debug/Telegram"
Expand All @@ -121,7 +116,7 @@ jobs:
run: |
cd $REPO_NAME/out/Debug
mkdir artifact
mv Telegram artifact/
mv {Telegram,Updater} artifact/
- uses: actions/upload-artifact@master
if: env.UPLOAD_ARTIFACT == 'true'
name: Upload artifact.
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

macos:
name: MacOS
runs-on: macos-12
runs-on: macos-13

strategy:
matrix:
Expand Down Expand Up @@ -115,6 +115,7 @@ jobs:
-D CMAKE_CXX_FLAGS="-Werror" \
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO \
-D TDESKTOP_API_TEST=ON \
-D DESKTOP_APP_DISABLE_AUTOUPDATE=OFF \
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \
$DEFINE
Expand Down
161 changes: 161 additions & 0 deletions .github/workflows/mac_packaged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: MacOS Packaged.

on:
push:
paths-ignore:
- 'docs/**'
- '**.md'
- 'changelog.txt'
- 'LEGAL'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/mac_packaged.yml'
- 'lib/xdg/**'
- 'snap/**'
- 'Telegram/build/**'
- 'Telegram/Resources/uwp/**'
- 'Telegram/Resources/winrc/**'
- 'Telegram/SourceFiles/platform/win/**'
- 'Telegram/SourceFiles/platform/linux/**'
- 'Telegram/configure.bat'
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
- 'changelog.txt'
- 'LEGAL'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/mac_packaged.yml'
- 'lib/xdg/**'
- 'snap/**'
- 'Telegram/build/**'
- 'Telegram/Resources/uwp/**'
- 'Telegram/Resources/winrc/**'
- 'Telegram/SourceFiles/platform/win/**'
- 'Telegram/SourceFiles/platform/linux/**'
- 'Telegram/configure.bat'

jobs:

macos:
name: MacOS
runs-on: macos-13

strategy:
matrix:
defines:
- ""

env:
GIT: "https://github.com"
OPENALDIR: "/usr/local/opt/openal-soft"
UPLOAD_ARTIFACT: "false"
ONLY_CACHE: "false"
MANUAL_CACHING: "1"
AUTO_CACHING: "1"

steps:
- name: Get repository name.
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Clone.
uses: actions/[email protected]
with:
submodules: recursive
path: ${{ env.REPO_NAME }}

- name: First set up.
run: |
brew update
brew upgrade || true
brew install autoconf automake boost cmake ffmpeg openal-soft openssl opus ninja pkg-config python qt yasm xz
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcodebuild -version > CACHE_KEY.txt
brew list --versions >> CACHE_KEY.txt
echo $MANUAL_CACHING >> CACHE_KEY.txt
echo "$GITHUB_WORKSPACE" >> CACHE_KEY.txt
if [ "$AUTO_CACHING" = "1" ]; then
thisFile=$REPO_NAME/.github/workflows/mac_packaged.yml
echo `md5 -q $thisFile` >> CACHE_KEY.txt
fi
echo "CACHE_KEY=`md5 -q CACHE_KEY.txt`" >> $GITHUB_ENV
echo "LibrariesPath=`pwd`" >> $GITHUB_ENV
curl -o tg_owt-version.json https://api.github.com/repos/desktop-app/tg_owt/git/refs/heads/master
- name: RNNoise.
run: |
cd $LibrariesPath
git clone --depth=1 https://gitlab.xiph.org/xiph/rnnoise.git
cd rnnoise
./autogen.sh
./configure --disable-examples --disable-doc
make -j$(sysctl -n hw.logicalcpu)
make install
- name: WebRTC cache.
id: cache-webrtc
uses: actions/[email protected]
with:
path: ${{ env.LibrariesPath }}/tg_owt
key: ${{ runner.OS }}-webrtc-${{ env.CACHE_KEY }}-${{ hashFiles('**/tg_owt-version.json') }}
- name: WebRTC.
if: steps.cache-webrtc.outputs.cache-hit != 'true'
run: |
cd $LibrariesPath
git clone --recursive --depth=1 $GIT/desktop-app/tg_owt.git
cd tg_owt
cmake -B build . -GNinja -DCMAKE_BUILD_TYPE=Debug
cmake --build build --parallel
- name: Telegram Desktop build.
if: env.ONLY_CACHE == 'false'
env:
tg_owt_DIR: ${{ env.LibrariesPath }}/tg_owt/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
cmake -Bbuild -GNinja . \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DTDESKTOP_API_TEST=ON \
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
$DEFINE
cmake --build build --parallel
cd build
macdeployqt Telegram.app
codesign --remove-signature Telegram.app
mkdir dmgsrc
mv Telegram.app dmgsrc
hdiutil create -volname Telegram -srcfolder dmgsrc -ov -format UDZO Telegram.dmg
- name: Move artifact.
if: env.UPLOAD_ARTIFACT == 'true'
run: |
cd $REPO_NAME/build
mkdir artifact
mv Telegram.dmg artifact/
- uses: actions/upload-artifact@master
if: env.UPLOAD_ARTIFACT == 'true'
name: Upload artifact.
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.REPO_NAME }}/build/artifact/
4 changes: 3 additions & 1 deletion .github/workflows/master_updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
SKIP: "0"
to_branch: "master"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
fetch-depth: 0
if: env.SKIP == '0'
- name: Push the code to the master branch.
if: env.SKIP == '0'
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,38 @@ on:
- cron: '0 0 * * *'

jobs:
noResponse:
waiting-for-answer:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/[email protected]
with:
token: ${{ github.token }}
# Label requiring a response
responseRequiredLabel: waiting for answer

needs-user-action:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/[email protected]
with:
token: ${{ github.token }}
responseRequiredLabel: needs user action

cant-reproduce:
if: github.event_name != 'issue_comment'
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/[email protected]
with:
token: ${{ github.token }}
responseRequiredLabel: cant reproduce
closeComment: >
This issue has been automatically closed because no developer succeeded to
reproduce the issue with the given reproduction steps. With only the
information that is currently in the issue, we don't have enough
information to take action. Please reach out if you find what's missing to
reproduce the issue so that we can investigate further.
Note that GitHub is a developer communication platform. If you're an ordinary
user seeking for help, get to support crew via `Settings -> Ask question` in
the application.
2 changes: 1 addition & 1 deletion .github/workflows/snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
sudo snap run lxd waitready
- name: Free up some disk space.
uses: jlumbroso/free-disk-space@76866dbe54312617f00798d1762df7f43def6e5c
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8

- name: Telegram Desktop snap build.
run: sg lxd -c 'snap run snapcraft -v'
Expand Down
Loading

0 comments on commit 6f178f2

Please sign in to comment.