Kate Text Highlight Plugin Build #32
Workflow file for this run
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
name: Kate Text Highlight Plugin Build | |
on: | |
push: | |
release: | |
types: published | |
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: | |
strategy: | |
matrix: | |
config: | |
# - { | |
# qt_major_version: 5, | |
# qt_version: "5.15.2", | |
# arch: "gcc_64", | |
# qt_modules: "qtcharts qtdatavis3d qtlottie qtnetworkauth qtpurchasing qtquick3d qtquicktimeline qtscript qtvirtualkeyboard qtwaylandcompositor qtwebengine qtwebglplugin", | |
# ecm_branch: "kf5", | |
# } | |
- { | |
qt_major_version: 6, | |
qt_version: "6.7.0", | |
arch: "linux_gcc_64", | |
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", | |
ecm_branch: "master", | |
} | |
runs-on: ubuntu-latest | |
env: | |
QT_MAJOR_VERSION: ${{ matrix.config.qt_major_version }} | |
QT_VERSION: ${{ matrix.config.qt_version }} | |
QT_MODULES: ${{ matrix.config.qt_modules }} | |
AQT_ARCH: ${{ matrix.config.arch }} | |
ECM_BRANCH: ${{ matrix.config.ecm_branch }} | |
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: ${{ env.QT_VERSION }} | |
host: "linux" | |
target: "desktop" | |
arch: ${{ env.AQT_ARCH }} | |
modules: ${{ env.QT_MODULES }} | |
- name: Build KDE Framework | |
run: | | |
mkdir build | |
cd build | |
git clone https://invent.kde.org/frameworks/extra-cmake-modules.git -b ${{ env.ECM_BRANCH }} | |
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=${{ env.QT_MAJOR_VERSION }} | |
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 kf | |
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" | |
cd .. | |
- name: Build Plugin | |
run: | | |
cd build | |
cmake .. \ | |
-DQT_MAJOR_VERSION=${{ env.QT_MAJOR_VERSION }} \ | |
-DCMAKE_PREFIX_PATH="$HOME/kde/usr/lib/x86_64-linux-gnu/cmake/" \ | |
-DCMAKE_BUILD_TYPE=Release | |
cmake --build . | |
cd .. | |
- name: Uploading Artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: text-highlight-plugin-${{ github.sha }}.so | |
path: build/bin/kf${{ env.QT_MAJOR_VERSION }}/ktexteditor/text-highlight-plugin.so | |
- name: Upload Artifact to GitHub release | |
uses: svenstaro/upload-release-action@v2 | |
if: github.event_name == 'release' | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: text-highlight-plugin-${{ github.sha }}.so | |
tag: ${{ github.ref }} | |
overwrite: true |