From 8773d0332cdd0dbe570526ff72a755c8a9016d57 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 9 Dec 2021 10:49:22 +0400 Subject: [PATCH] Update Linux action Qt 6 is not used yet since Kvantum is not ported to Qt 6 yet --- .github/workflows/linux-kotato.yml | 209 +++++------------------------ 1 file changed, 35 insertions(+), 174 deletions(-) diff --git a/.github/workflows/linux-kotato.yml b/.github/workflows/linux-kotato.yml index f7be42c27..bbcb58202 100644 --- a/.github/workflows/linux-kotato.yml +++ b/.github/workflows/linux-kotato.yml @@ -47,7 +47,7 @@ on: jobs: linux: - name: Ubuntu 16.04 + name: Ubuntu 18.04 if: > !(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]')) @@ -55,7 +55,7 @@ jobs: && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) runs-on: ubuntu-latest container: - image: ubuntu:xenial + image: ubuntu:bionic options: --privileged --device /dev/fuse strategy: @@ -69,12 +69,10 @@ jobs: env: GIT: "https://github.com" QT: "5_15_2" - OPENSSL_VER: "1_1_1" - CMAKE_VER: "3.17.0" + CMAKE_VER: "3.21.3" UPLOAD_ARTIFACT: "true" ONLY_CACHE: "false" MANUAL_CACHING: "1" - DOC_PATH: "docs/building-cmake.md" AUTO_CACHING: "1" CXX: "g++ -static-libstdc++" @@ -101,22 +99,21 @@ jobs: apt-get install software-properties-common -y && \ add-apt-repository ppa:git-core/ppa -y && \ apt-get update && \ - apt-get install clang libglib2.0-dev libicu-dev liblzma-dev zlib1g-dev libudev-dev \ - git wget autoconf automake build-essential libtool pkg-config bison yasm \ - libasound2-dev libpulse-dev libdrm-dev libfuse2 libgtk-3-dev libgtk2.0-dev \ - libatspi2.0-dev libgl1-mesa-dev libegl1-mesa-dev libffi-dev libxcb1-dev \ + apt-get install clang libglibmm-2.4-dev libicu-dev libssl-dev liblzma-dev zlib1g-dev \ + git wget autoconf automake build-essential libtool pkg-config bison nasm yasm unzip \ + libasound2-dev libpulse-dev libfuse2 libgtk-3-dev libgtk2.0-dev libatspi2.0-dev \ + libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb1-dev \ libxcb-glx0-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \ libxcb-randr0-dev libxcb-record0-dev libxcb-render0-dev libxcb-render-util0-dev \ libxcb-res0-dev libxcb-screensaver0-dev libxcb-shape0-dev libxcb-shm0-dev \ libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-xkb-dev \ - libxcb-util0-dev libx11-xcb-dev libxext-dev libxfixes-dev libxv-dev libva-dev \ - libvdpau-dev libsigc++-2.0-dev libxml-parser-perl mm-common xutils-dev \ - unzip libwebkit2gtk-4.0-dev subversion -y --force-yes && \ + libxcb-util0-dev libx11-xcb-dev libxext-dev libxfixes-dev libxv-dev libwayland-dev \ + libva-dev libvdpau-dev xutils-dev meson ninja-build subversion -y --force-yes && \ add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ apt-get update && \ - apt-get install gcc-9 g++-9 -y && \ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 && \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 60 && \ + apt-get install gcc-10 g++-10 -y && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 60 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 60 && \ update-alternatives --config gcc && \ add-apt-repository --remove ppa:ubuntu-toolchain-r/test -y @@ -166,55 +163,6 @@ jobs: make -j$(nproc) make install - - name: OpenSSL cache. - id: cache-openssl - uses: actions/cache@v2 - with: - path: ${{ env.LibrariesPath }}/openssl-cache - key: ${{ runner.OS }}-${{ env.OPENSSL_VER }}-${{ env.CACHE_KEY }} - - name: OpenSSL build. - if: steps.cache-openssl.outputs.cache-hit != 'true' - run: | - cd $LibrariesPath - - opensslDir=openssl_${OPENSSL_VER} - git clone -b OpenSSL_${OPENSSL_VER}-stable --depth=1 \ - $GIT/openssl/openssl $opensslDir - cd $opensslDir - ./config --openssldir=/etc/ssl no-tests no-dso - make -j$(nproc) - make DESTDIR="$LibrariesPath/openssl-cache" install_sw - cd .. - rm -rf $opensslDir - - name: OpenSSL install. - run: | - cd $LibrariesPath - cp -R openssl-cache/. / - ldconfig - - - name: Python 3.8 cache. - id: cache-python - uses: actions/cache@v2 - with: - path: ${{ env.LibrariesPath }}/python-cache - key: ${{ runner.OS }}-python-${{ env.CACHE_KEY }} - - name: Python 3.8 build. - if: steps.cache-python.outputs.cache-hit != 'true' - run: | - cd $LibrariesPath - - git clone -b v3.8.2 --depth=1 $GIT/python/cpython.git - cd cpython - ./configure --enable-optimizations - make -j$(nproc) - make DESTDIR="$LibrariesPath/python-cache" install - cd .. - rm -rf cpython - - name: Python 3.8 install. - run: | - cd $LibrariesPath - cp -R python-cache/. / - - name: CMake. run: | cd $LibrariesPath @@ -232,56 +180,26 @@ jobs: run: | cd $LibrariesPath - git clone -b v5.80.0 --depth=1 $GIT/KDE/extra-cmake-modules.git + git clone -b v5.88.0 --depth=1 $GIT/KDE/extra-cmake-modules.git cd extra-cmake-modules cmake . -DCMAKE_BUILD_TYPE=Release - cmake --build . -j$(nproc) + cmake --build . --parallel cmake --install . cd .. rm -rf extra-cmake-modules - - name: Meson. - run: | - python3 -m pip install meson==0.54.0 - meson --version - - - name: Ninja. - run: | - cd $LibrariesPath - - wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip - unzip ninja-linux.zip - chmod +x ninja - mv ninja /usr/local/bin - - ninja --version - - - name: NASM. - run: | - cd $LibrariesPath - - git clone -b nasm-2.14.02 --depth=1 https://repo.or.cz/nasm.git - cd nasm - ./autogen.sh - ./configure - make -j$(nproc) - install nasm /usr/local/bin/nasm - install ndisasm /usr/local/bin/ndisasm - cd .. - rm -rf nasm - - name: MozJPEG. run: | cd $LibrariesPath - git clone -b v4.0.1-rc2 --depth=1 $GIT/mozilla/mozjpeg.git + git clone -b v4.0.3 --depth=1 $GIT/mozilla/mozjpeg.git cd mozjpeg cmake -B build . \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DWITH_JPEG8=ON \ -DPNG_SUPPORTED=OFF - cmake --build build -j$(nproc) + cmake --build build --parallel cmake --install build cd .. rm -rf mozjpeg @@ -333,8 +251,6 @@ jobs: --disable-protocols \ --disable-devices \ --disable-filters \ - --disable-alsa \ - --disable-iconv \ --enable-shared \ --enable-libopus \ --enable-vaapi \ @@ -369,7 +285,7 @@ jobs: -DALSOFT_UTILS=OFF \ -DALSOFT_CONFIG=OFF - cmake --build . -j$(nproc) + cmake --build . --parallel cmake --install . ldconfig @@ -380,7 +296,7 @@ jobs: run: | cd $LibrariesPath - git clone -b 1.20 --depth=1 https://gitlab.freedesktop.org/wayland/wayland-protocols.git + git clone -b 1.23 --depth=1 https://gitlab.freedesktop.org/wayland/wayland-protocols.git cd wayland-protocols ./autogen.sh make -j$(nproc) @@ -392,65 +308,14 @@ jobs: run: | cd $LibrariesPath - git clone -b v1.1.1 --depth=1 $GIT/KDE/plasma-wayland-protocols.git + git clone -b v1.4.0 --depth=1 $GIT/KDE/plasma-wayland-protocols.git cd plasma-wayland-protocols cmake -B build . -DCMAKE_BUILD_TYPE=Release - cmake --build build -j$(nproc) + cmake --build build --parallel cmake --install build cd .. rm -rf plasma-wayland-protocols - - name: Libwayland. - run: | - cd $LibrariesPath - - git clone -b 1.18.0 --depth=1 https://gitlab.freedesktop.org/wayland/wayland - cd wayland - ./autogen.sh \ - --disable-documentation \ - --disable-dtd-validation - make -j$(nproc) - make install - ldconfig - cd .. - rm -rf wayland - - - name: Libxkbcommon. - run: | - cd $LibrariesPath - - git clone -b xkbcommon-1.0.3 --depth=1 $GIT/xkbcommon/libxkbcommon.git - cd libxkbcommon - meson build \ - --libdir=/usr/local/lib \ - -Denable-docs=false \ - -Denable-wayland=false \ - -Denable-xkbregistry=false \ - -Dxkb-config-root=/usr/share/X11/xkb \ - -Dxkb-config-extra-path=/etc/xkb \ - -Dx-locale-root=/usr/share/X11/locale - meson compile -C build -j$(nproc) - meson install -C build - ldconfig - cd .. - rm -rf libxkbcommon - - - name: Glibmm. - run: | - cd $LibrariesPath - - git clone -b 2.40.0 --depth=1 $GIT/GNOME/glibmm.git - cd glibmm - git apply ../patches/glibmm.patch - export ACLOCAL_PATH="/usr/local/share/aclocal" - NOCONFIGURE=1 ./autogen.sh - CXXFLAGS="-g -O2 -std=c++14" ./configure --enable-maintainer-mode --disable-documentation - make -j$(nproc) - make install - ldconfig - cd .. - rm -rf glibmm - - name: Qt 5.15.2 cache. id: cache-qt uses: actions/cache@v2 @@ -465,7 +330,6 @@ jobs: git clone -b v5.15.2 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT} cd qt_${QT} perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qttools,qtx11extras - git submodule update qtbase qtwayland qtimageformats qtsvg qttools qtx11extras cd qtbase find ../../patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply cd ../qtwayland @@ -483,7 +347,6 @@ jobs: -no-feature-xcb-sm \ -no-feature-wayland-server \ -openssl-linked \ - OPENSSL_LIBS="-L/usr/local/lib -lssl -lcrypto" \ QMAKE_CXX="$CXX" \ QMAKE_LINK="$CXX" \ -nomake examples \ @@ -516,13 +379,13 @@ jobs: run: | cd $LibrariesPath - git clone -b v5.80.0 --depth=1 $GIT/KDE/kwayland.git + git clone -b v5.88.0 --depth=1 $GIT/KDE/kwayland.git cd kwayland cmake . \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=OFF \ -DKDE_INSTALL_LIBDIR=lib - cmake --build . -j$(nproc) + cmake --build . --parallel cmake --install . ldconfig cd .. @@ -532,13 +395,13 @@ jobs: run: | cd $LibrariesPath - git clone -b v5.80.0 --depth=1 $GIT/KDE/kwindowsystem.git + git clone -b v5.88.0 --depth=1 $GIT/KDE/kwindowsystem.git cd kwindowsystem cmake . \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=OFF \ -DKDE_INSTALL_LIBDIR=lib - cmake --build . -j$(nproc) + cmake --build . --parallel cmake --install . ldconfig cd .. @@ -548,10 +411,10 @@ jobs: run: | cd $LibrariesPath - svn checkout https://svn.code.sf.net/p/qt5ct/code/tags/qt5ct-1.2 qt5ct + svn checkout https://svn.code.sf.net/p/qt5ct/code/tags/qt5ct-1.5 qt5ct cd qt5ct cmake . -DCMAKE_BUILD_TYPE=Release - cmake --build . -j$(nproc) + cmake --build . --parallel cmake --install . cd .. rm -rf qt5ct @@ -560,10 +423,10 @@ jobs: run: | cd $LibrariesPath - git clone -b V0.15.3 --depth=1 $GIT/tsujan/Kvantum.git + git clone -b V0.20.2 --depth=1 $GIT/tsujan/Kvantum.git cd Kvantum/Kvantum cmake . -DCMAKE_BUILD_TYPE=Release - cmake --build . -j$(nproc) + cmake --build . --parallel cmake --install . cd ../.. rm -rf Kvantum @@ -583,17 +446,17 @@ jobs: cd tg_owt git init git remote add origin $GIT/desktop-app/tg_owt.git - git fetch --depth=1 origin 91d836dc84a16584c6ac52b36c04c0de504d9c34 + git fetch --depth=1 origin b02478677baac6d563589f216800ff9cea0fd65c git reset --hard FETCH_HEAD git submodule init git submodule update cd src/third_party/pipewire - meson build + meson build -Dspa-plugins=disabled cd ../../.. cmake -B build . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DTG_OWT_DLOPEN_PIPEWIRE=ON - cmake --build build -j$(nproc) + cmake --build build --parallel - name: Kotatogram Desktop build. if: env.ONLY_CACHE == 'false' @@ -605,9 +468,6 @@ jobs: DEFINE="" if [ -n "${{ matrix.defines }}" ]; then DEFINE="-D ${{ matrix.defines }}=ON" - if [ "${{ matrix.defines }}" = "DESKTOP_APP_DISABLE_DBUS_INTEGRATION" ]; then - DEFINE="$DEFINE -D DESKTOP_APP_DISABLE_WEBKITGTK=ON" - fi echo Define from matrix: $DEFINE echo "ARTIFACT_NAME=Kotatogram_${{ matrix.defines }}" >> $GITHUB_ENV else @@ -615,14 +475,15 @@ jobs: fi ./configure.sh \ - -GNinja \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_C_FLAGS="-Werror" \ + -DCMAKE_CXX_FLAGS="-Werror" \ -DTDESKTOP_API_TEST=ON \ -DDESKTOP_APP_USE_PACKAGED_LAZY=ON \ + -DDESKTOP_APP_QT6=OFF \ $DEFINE - cd ../out/Release - cmake --build . -j$(nproc) + cmake --build ../out --config Debug --parallel DESTDIR=../../AppDir cmake --install . - name: AppImage build.