|
1 | 1 | name: Kate Text Highlight Plugin Build |
2 | 2 |
|
3 | | -on: |
| 3 | +on: |
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - master |
@@ -32,76 +32,29 @@ jobs: |
32 | 32 | # qt_modules: "qtcharts qtdatavis3d qtlottie qtnetworkauth qtpurchasing qtquick3d qtquicktimeline qtscript qtvirtualkeyboard qtwaylandcompositor qtwebengine qtwebglplugin", |
33 | 33 | # ecm_branch: "kf5", |
34 | 34 | # } |
35 | | - - { |
36 | | - qt_major_version: 6, |
37 | | - qt_version: "6.7.0", |
38 | | - arch: "linux_gcc_64", |
39 | | - 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", |
40 | | - ecm_branch: "master", |
41 | | - } |
| 35 | + - { qt_major_version: 6 } |
42 | 36 |
|
43 | 37 | runs-on: ubuntu-latest |
| 38 | + container: |
| 39 | + image: archlinux:base |
| 40 | + options: --user root --privileged |
44 | 41 | env: |
45 | 42 | QT_MAJOR_VERSION: ${{ matrix.config.qt_major_version }} |
46 | | - QT_VERSION: ${{ matrix.config.qt_version }} |
47 | | - QT_MODULES: ${{ matrix.config.qt_modules }} |
48 | | - AQT_ARCH: ${{ matrix.config.arch }} |
49 | | - ECM_BRANCH: ${{ matrix.config.ecm_branch }} |
50 | 43 | steps: |
51 | 44 | - name: Checkout Sources |
52 | 45 | uses: actions/checkout@v4 |
| 46 | + |
53 | 47 | - name: Install build dependencies |
54 | 48 | 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 |
| 49 | + pacman -Syyu --noconfirm |
| 50 | + pacman -S git curl python base-devel wget cmake ninja kate extra-cmake-modules --noconfirm |
65 | 51 |
|
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 .. |
99 | 52 | - name: Build Plugin |
100 | 53 | run: | |
| 54 | + mkdir build |
101 | 55 | cd build |
102 | 56 | cmake .. \ |
103 | 57 | -DQT_MAJOR_VERSION=${{ env.QT_MAJOR_VERSION }} \ |
104 | | - -DCMAKE_PREFIX_PATH="$HOME/kde/usr/lib/x86_64-linux-gnu/cmake/" \ |
105 | 58 | -DCMAKE_BUILD_TYPE=Release |
106 | 59 | cmake --build . |
107 | 60 | cd .. |
|
118 | 71 | file: build/bin/kf${{ env.QT_MAJOR_VERSION }}/ktexteditor/text-highlight-plugin.so |
119 | 72 | tag: ${{ github.ref }} |
120 | 73 | overwrite: true |
| 74 | + # - name: Setup tmate session |
| 75 | + # uses: mxschmitt/action-tmate@v3 |
| 76 | + # if: ${{ failure() }} |
| 77 | + # with: |
| 78 | + # limit-access-to-actor: false |
0 commit comments