diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 947fc9178805e..7a65b483fb3f2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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 @@ -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 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4961c68f3e991..5ded5a0400b18 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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: @@ -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 @@ -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" \ @@ -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" diff --git a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp index b42fca336b793..ecd2884dff922 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp @@ -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; diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile index a87d857df2f41..fbe9e0d162ef3 100644 --- a/Telegram/build/docker/centos_env/Dockerfile +++ b/Telegram/build/docker/centos_env/Dockerfile @@ -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 }} @@ -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 \ @@ -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 \ @@ -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" ] diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 81b19266901eb..16e8914b638a2 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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