-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Kate Text Highlight Plugin Build | ||
|
||
on: [push, release, workflow_dispatch] | ||
|
||
|
||
jobs: | ||
check_commit_msg: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
commit_message: ${{ steps.get_message.outputs.message }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get commit message | ||
id: get_message | ||
run: | | ||
echo "::set-output name=message::$(git log --format=%B -n 1 ${{ github.event.after }} | tr '\n' ' ')" | ||
echo "message=\"$(git log --format=%B -n 1 ${{ github.event.after }} | tr '\n' ' ')\"" >> $GITHUB_ENV | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
- name: Install build dependencies | ||
run: | | ||
sudo sed -i 's/^#\s*deb-src/deb-src/' /etc/apt/sources.list # add src repos | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
ninja-build \ | ||
git \ | ||
python3 pip \ | ||
libzstd-dev # karchive | ||
pip install meson | ||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v4 | ||
with: | ||
aqtversion: '==3.1.*' | ||
version: '6.7.0' | ||
host: 'linux' | ||
target: 'desktop' | ||
arch: 'linux_gcc_64' | ||
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' | ||
- name: Build KDE Framework 6 | ||
run: | | ||
mkdir build | ||
cd build | ||
git clone https://invent.kde.org/frameworks/extra-cmake-modules.git | ||
cd extra-cmake-modules | ||
mkdir build && cd build && cmake .. && cmake --build . && sudo cmake --install . | ||
cd ../../ | ||
git clone https://invent.kde.org/sdk/kdesrc-build.git | ||
cd kdesrc-build | ||
# env | ||
export PATH=$QT_ROOT_DIR:`pwd`:$PATH | ||
export QT_MAJOR_VERSION=6 | ||
export QTDIR=$QT_ROOT_DIR | ||
# solve dependencies | ||
sudo apt build-dep wayland kcodecs karchive kguiaddons kdoctools knotifications kwindowsystem polkit-qt-1 kjobwidgets solid kio kparts ktexteditor -y | ||
# build kf6 | ||
kdesrc-build --initial-setup | ||
kdesrc-build --metadata-only | ||
kdesrc-build --pretend | ||
# let build faster | ||
sed -i "s/num-cores [0-9]\+/num-cores $(nproc)/" ~/.config/kdesrc-buildrc | ||
kdesrc-build --no-stop-on-failure kate || echo "Kate Build Completed" | ||
sudo kdesrc-build --install-only --no-stop-on-failure kate || echo "Install Completed" | ||
cd .. | ||
- name: Build Plugin | ||
run: | | ||
cd build | ||
cmake .. -DQT_MAJOR_VERSION=6 -DCMAKE_PREFIX_PATH="/root/kde/usr/lib/x86_64-linux-gnu/cmake/" | ||
cmake --build . | ||
cd .. | ||
- name: Linux - Uploading Artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: text-highlight-plugin-${{ github.sha }}.so | ||
path: build/bin/kf6/ktexteditor/text-highlight-plugin.so |