Skip to content

Commit 9137594

Browse files
committed

File tree

1 file changed

+15
-46
lines changed

1 file changed

+15
-46
lines changed
Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Kate Text Highlight Plugin Build
22

3-
on:
3+
on:
44
push:
55
branches:
66
- master
7+
- fix-ci
78
release:
89
types: published
910
workflow_dispatch:
@@ -34,13 +35,16 @@ jobs:
3435
# }
3536
- {
3637
qt_major_version: 6,
37-
qt_version: "6.7.0",
38+
qt_version: "6.10.0",
3839
arch: "linux_gcc_64",
3940
qt_modules: "qt3d qtcharts qtconnectivity qtdatavis3d qtgraphs qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3dphysics qtquickeffectmaker qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview debug_info qt5compat qtquick3d qtquicktimeline qtshadertools qtwaylandcompositor",
4041
ecm_branch: "master",
4142
}
4243

4344
runs-on: ubuntu-latest
45+
container:
46+
image: archlinux/base # Using the official Arch Linux base image
47+
options: --user root # Run as root inside the container if needed for package installation
4448
env:
4549
QT_MAJOR_VERSION: ${{ matrix.config.qt_major_version }}
4650
QT_VERSION: ${{ matrix.config.qt_version }}
@@ -50,58 +54,18 @@ jobs:
5054
steps:
5155
- name: Checkout Sources
5256
uses: actions/checkout@v4
57+
5358
- name: Install build dependencies
5459
run: |
55-
sudo sed -i 's/^#\s*deb-src/deb-src/' /etc/apt/sources.list # add src repos
56-
sudo apt-get update
57-
sudo apt-get install -y \
58-
build-essential \
59-
cmake \
60-
ninja-build \
61-
git \
62-
python3 pip \
63-
libzstd-dev # karchive
64-
pip install meson
60+
pacman -Syu --noconfirm
61+
pacman -S git curl python base-devel wget cmake ninja kate --noconfirm
6562
66-
- name: Install Qt
67-
uses: jurplel/install-qt-action@v4
68-
with:
69-
aqtversion: "==3.1.*"
70-
version: ${{ env.QT_VERSION }}
71-
host: "linux"
72-
target: "desktop"
73-
arch: ${{ env.AQT_ARCH }}
74-
modules: ${{ env.QT_MODULES }}
75-
- name: Build KDE Framework
76-
run: |
77-
mkdir build
78-
cd build
79-
git clone https://invent.kde.org/frameworks/extra-cmake-modules.git -b ${{ env.ECM_BRANCH }}
80-
cd extra-cmake-modules
81-
mkdir build && cd build && cmake .. && cmake --build . && sudo cmake --install .
82-
cd ../../
83-
git clone https://invent.kde.org/sdk/kdesrc-build.git
84-
cd kdesrc-build
85-
# env
86-
export PATH=$QT_ROOT_DIR:`pwd`:$PATH
87-
export QT_MAJOR_VERSION=${{ env.QT_MAJOR_VERSION }}
88-
export QTDIR=$QT_ROOT_DIR
89-
# solve dependencies
90-
sudo apt build-dep wayland kcodecs karchive kguiaddons kdoctools knotifications kwindowsystem polkit-qt-1 kjobwidgets solid kio kparts ktexteditor -y
91-
# build kf
92-
kdesrc-build --initial-setup
93-
kdesrc-build --metadata-only
94-
kdesrc-build --pretend
95-
# let build faster
96-
sed -i "s/num-cores [0-9]\+/num-cores $(nproc)/" ~/.config/kdesrc-buildrc
97-
kdesrc-build --no-stop-on-failure kate || echo "Kate Build Completed"
98-
cd ..
9963
- name: Build Plugin
10064
run: |
10165
cd build
10266
cmake .. \
10367
-DQT_MAJOR_VERSION=${{ env.QT_MAJOR_VERSION }} \
104-
-DCMAKE_PREFIX_PATH="$HOME/kde/usr/lib/x86_64-linux-gnu/cmake/" \
68+
-DCMAKE_PREFIX_PATH="$HOME/kde/usr/lib/x86_64-linux-gnu/cmake/;$HOME/kde/usr/lib/cmake;$HOME/kde/usr/lib/cmake;/usr/lib/cmake" \
10569
-DCMAKE_BUILD_TYPE=Release
10670
cmake --build .
10771
cd ..
@@ -118,3 +82,8 @@ jobs:
11882
file: build/bin/kf${{ env.QT_MAJOR_VERSION }}/ktexteditor/text-highlight-plugin.so
11983
tag: ${{ github.ref }}
12084
overwrite: true
85+
- name: Setup tmate session
86+
uses: mxschmitt/action-tmate@v3
87+
if: ${{ failure() }}
88+
with:
89+
limit-access-to-actor: false

0 commit comments

Comments
 (0)