Skip to content

Commit

Permalink
Merge pull request #687 from telegramdesktop/dev
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio authored Dec 19, 2023
2 parents bacfa4a + 3adbfb1 commit 2c19109
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 36 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ 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@f68fdb76e2ea636224182cfb7377ff9a1708f9b8
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
24 changes: 9 additions & 15 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ jobs:
linux:
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 gcc-toolset-12 -- 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,7 +83,11 @@ jobs:
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
fi
./configure.sh \
docker run --rm \
-v $PWD:/usr/src/tdesktop \
-e DEBUG=1 \
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" \
Expand All @@ -101,8 +97,6 @@ jobs:
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \
$DEFINE
cmake --build ../out --config Debug --parallel
- name: Check.
run: |
filePath="$REPO_NAME/out/Debug/Telegram"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,7 @@ QSize WebPage::countCurrentSize(int newWidth) {
_pixh = (asSponsored ? kSponsoredUserpicLines : linesMax) * lineHeight;
do {
_pixw = asSponsored ? _pixh : articleThumbWidth(_data->photo, _pixh);
auto wleft = asSponsored
? innerWidth - st::webPagePhotoDelta - qMax(_pixw, lineHeight)
: innerWidth;
auto wleft = innerWidth - st::webPagePhotoDelta - qMax(_pixw, lineHeight);

newHeight = siteNameHeight;

Expand Down
22 changes: 7 additions & 15 deletions Telegram/build/docker/centos_env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ RUN dnf -y install epel-release \
&& dnf -y install autoconf automake libtool pkgconfig make patch git \
python3.11-pip python3.11-devel gperf flex bison clang lld yasm \
file which perl-open perl-XML-Parser xorg-x11-util-macros \
gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils \
gcc-toolset-13-gcc gcc-toolset-13-gcc-c++ gcc-toolset-13-binutils \
libffi-devel fontconfig-devel freetype-devel libX11-devel \
alsa-lib-devel pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel \
mesa-libgbm-devel libdrm-devel vulkan-devel libva-devel libvdpau-devel \
glib2-devel at-spi2-core-devel gtk3-devel boost1.78-devel fmt-devel \
&& dnf clean all

SHELL [ "bash", "-c", ". /opt/rh/gcc-toolset-12/enable; exec bash -c \"$@\"", "-s"]
SHELL [ "bash", "-c", ". /opt/rh/gcc-toolset-13/enable; exec bash -c \"$@\"", "-s"]

WORKDIR {{ LibrariesPath }}

Expand Down Expand Up @@ -729,6 +729,7 @@ RUN git clone -b 2.78.0 --depth=1 {{ GIT }}/GNOME/glibmm.git \
-Dbuild-examples=false \
-Dsigc++-3.0:build-documentation=false \
-Dsigc++-3.0:build-examples=false \
-Dsigc++-3.0:build-tests=false \
-Dsigc++-3.0:validation=false \
-Dmm-common:use-network=true \
&& meson compile -C build \
Expand Down Expand Up @@ -796,19 +797,10 @@ RUN git clone -b {{ QT_TAG }} --depth=1 {{ GIT }}/qt/qt5.git qt_{{ QT }} \
&& cd .. \
&& rm -rf qt_{{ QT }}

FROM patches AS breakpad
RUN git init breakpad \
FROM builder AS breakpad
RUN git clone -b v2023.01.27 --depth=1 https://chromium.googlesource.com/breakpad/breakpad.git \
&& cd breakpad \
&& git remote add origin https://chromium.googlesource.com/breakpad/breakpad.git \
&& git fetch --depth=1 origin dfcb7b6799b7c1e2c8d65e857d8afede185471d8 \
&& git reset --hard FETCH_HEAD \
&& git apply ../patches/breakpad.diff \
&& git init src/third_party/lss \
&& cd src/third_party/lss \
&& git remote add origin https://chromium.googlesource.com/linux-syscall-support.git \
&& git fetch --depth=1 origin e1e7b0ad8ee99a875b272c8e33e308472e897660 \
&& git reset --hard FETCH_HEAD \
&& cd ../../.. \
&& git clone -b v2022.10.12 --depth=1 https://chromium.googlesource.com/linux-syscall-support.git src/third_party/lss \
&& env -u CFLAGS -u CXXFLAGS ./configure \
&& make -j$(nproc) \
&& make DESTDIR="{{ LibrariesPath }}/breakpad-cache" install \
Expand Down Expand Up @@ -914,5 +906,5 @@ ENV BOOST_INCLUDEDIR /usr/include/boost1.78
ENV BOOST_LIBRARYDIR /usr/lib64/boost1.78

VOLUME [ "/usr/src/tdesktop" ]
ENTRYPOINT [ "scl", "enable", "gcc-toolset-12", "--" ]
ENTRYPOINT [ "scl", "enable", "gcc-toolset-13", "--" ]
CMD [ "/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh" ]
1 change: 1 addition & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ parts:
- -Dbuild-examples=false
- -Dsigc++-3.0:build-documentation=false
- -Dsigc++-3.0:build-examples=false
- -Dsigc++-3.0:build-tests=false
- -Dsigc++-3.0:validation=false
prime:
- -./usr/include
Expand Down

0 comments on commit 2c19109

Please sign in to comment.