|
@@ -8,14 +8,21 @@ on:
|
|
|
|
|
|
# Allows you to run this workflow manually from the Actions tab.
|
|
|
workflow_dispatch:
|
|
|
+ inputs:
|
|
|
+ debug_enabled:
|
|
|
+ type: boolean
|
|
|
+ description: 'Run the build with tmate debugging enabled'
|
|
|
+ required: false
|
|
|
+ default: false
|
|
|
|
|
|
env:
|
|
|
VNOTE_VER: 3.17.0
|
|
|
+ CMAKE_VER: 3.24.3
|
|
|
|
|
|
jobs:
|
|
|
build-linux:
|
|
|
name: Build On Ubuntu
|
|
|
- runs-on: ubuntu-20.04
|
|
|
+ runs-on: ubuntu-latest
|
|
|
timeout-minutes: 120
|
|
|
|
|
|
steps:
|
|
@@ -30,15 +37,27 @@ jobs:
|
|
|
git submodule sync --recursive
|
|
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
|
|
|
|
+ - name: Install a Fresh CMake
|
|
|
+ run: |
|
|
|
+ wget --no-verbose https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-Linux-x86_64.sh
|
|
|
+ chmod +x cmake-${CMAKE_VER}-Linux-x86_64.sh
|
|
|
+ mkdir ${{runner.workspace}}/cmake
|
|
|
+ sudo ./cmake-${CMAKE_VER}-Linux-x86_64.sh --skip-license --prefix=${{runner.workspace}}/cmake
|
|
|
+ sudo rm -f /usr/local/bin/cmake /usr/local/bin/cpack
|
|
|
+ sudo ln -s ${{runner.workspace}}/cmake/bin/cmake /usr/local/bin/cmake
|
|
|
+ sudo ln -s ${{runner.workspace}}/cmake/bin/cpack /usr/local/bin/cpack
|
|
|
+
|
|
|
- name: Install linuxdeploy
|
|
|
uses: miurahr/install-linuxdeploy-action@v1
|
|
|
with:
|
|
|
plugins: qt appimage
|
|
|
|
|
|
- - name: Install dependencies
|
|
|
+ - name: Install Dependencies
|
|
|
run: |
|
|
|
sudo DEBIAN_FRONTEND=noninteractive apt-get update
|
|
|
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libfcitx5-qt-dev tree
|
|
|
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libfcitx5-qt-dev fcitx-libs-dev extra-cmake-modules libxkbcommon-dev
|
|
|
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y tree
|
|
|
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y fuse libxcb-cursor-dev
|
|
|
|
|
|
- name: Cache Qt
|
|
|
id: cache-qt
|
|
@@ -50,15 +69,33 @@ jobs:
|
|
|
- name: Install Qt
|
|
|
uses: jurplel/install-qt-action@v3
|
|
|
with:
|
|
|
- version: 6.5.2
|
|
|
+ version: 6.5.3
|
|
|
target: desktop
|
|
|
- modules: 'qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat'
|
|
|
+ modules: 'qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat qtserialport'
|
|
|
+ tools: 'tools_opensslv3_src'
|
|
|
cache: 'true'
|
|
|
|
|
|
+ - name: Compile OpenSSLV3
|
|
|
+ run: |
|
|
|
+ cd ${Qt6_DIR}/../../Tools/OpenSSLv3/src
|
|
|
+ ./Configure
|
|
|
+ make -j2
|
|
|
+ sudo make install
|
|
|
+
|
|
|
- name: Create Build Dir
|
|
|
run: mkdir build
|
|
|
working-directory: ${{runner.workspace}}
|
|
|
|
|
|
+ - name: Compile fcitxqt5
|
|
|
+ run: |
|
|
|
+ git clone https://github.com/fcitx/fcitx-qt5
|
|
|
+ cd fcitx-qt5
|
|
|
+ mkdir build && cd build
|
|
|
+ cmake -DENABLE_QT5=OFF -DENABLE_QT6=ON ..
|
|
|
+ make -j2
|
|
|
+ sudo make install
|
|
|
+ working-directory: ${{runner.workspace}}/build
|
|
|
+
|
|
|
- name: Compile qt6ct
|
|
|
run: |
|
|
|
git clone https://github.com/trialuser02/qt6ct qt6ct.git
|
|
@@ -70,42 +107,13 @@ jobs:
|
|
|
- name: Configure Project
|
|
|
run: |
|
|
|
qmake -v
|
|
|
- # TODO: libfcitx5
|
|
|
- qmake CONFIG+=release -spec linux-g++-64 ${GITHUB_WORKSPACE}/vnote.pro
|
|
|
+ cmake --version
|
|
|
+ cmake ${GITHUB_WORKSPACE}
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
|
|
- name: Build Project
|
|
|
- run: make -j$(nproc)
|
|
|
- working-directory: ${{runner.workspace}}/build
|
|
|
-
|
|
|
- - name: Install Project
|
|
|
- run: |
|
|
|
- mkdir AppDir
|
|
|
- make install INSTALL_ROOT=${{runner.workspace}}/build/AppDir
|
|
|
- tree AppDir
|
|
|
- working-directory: ${{runner.workspace}}/build
|
|
|
-
|
|
|
- - name: Package Project
|
|
|
run: |
|
|
|
- # Move the lib out to avoid duplication
|
|
|
- mv AppDir/usr/lib ./
|
|
|
- LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
|
|
|
- Qt6_Dir=$QT_HOST_BINS/..
|
|
|
- tree $Qt6_Dir
|
|
|
- tree $Qt6_Dir/../..
|
|
|
- # Copy translations
|
|
|
- mkdir -p AppDir/usr/translations
|
|
|
- cp $Qt6_Dir/translations/qt_zh_CN.qm AppDir/usr/translations
|
|
|
- # Package qt5ct (EXTRA_QT_PLUGINS seems not work)
|
|
|
- # EXTRA_QT_PLUGINS="platformthemes/libqt5ct.so;styles/libqt5ct-style.so"
|
|
|
- mkdir -p AppDir/usr/plugins/platformthemes
|
|
|
- mkdir -p AppDir/usr/plugins/styles
|
|
|
- cp $Qt6_Dir/plugins/platformthemes/* AppDir/usr/plugins/platformthemes/
|
|
|
- cp $Qt6_Dir/plugins/styles/* AppDir/usr/plugins/styles/
|
|
|
- # Package libssl.so and libcrypto.so
|
|
|
- Qt_Tools=$Qt6_Dir/../../Tools
|
|
|
- linuxdeploy-x86_64.AppImage --appdir ./AppDir --plugin qt --output appimage -l $Qt_Tools/OpenSSL/binary/lib/libcrypto.so.* -l $Qt_Tools/OpenSSL/binary/lib/
|
|
|
- tree AppDir
|
|
|
+ cmake --build . --target pack
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
|
|
- name: Fix Package
|
|
@@ -122,15 +130,14 @@ jobs:
|
|
|
linuxdeploy-plugin-appimage-x86_64.AppImage --appdir=./squashfs-root
|
|
|
mv VNote*.AppImage ../
|
|
|
popd
|
|
|
- mv VNote*.AppImage vnote-linux-x64_v${{env.VNOTE_VER}}.AppImage
|
|
|
- cp vnote-linux-x64_v${{env.VNOTE_VER}}.AppImage vnote-linux-x64.AppImage
|
|
|
+ mv VNote*.AppImage VNote-${{env.VNOTE_VER}}-linux-x64.AppImage
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
|
|
- name: Archive Artifacts
|
|
|
uses: actions/upload-artifact@v2
|
|
|
with:
|
|
|
- name: vnote-linux-x64_v${{env.VNOTE_VER}}
|
|
|
- path: ${{runner.workspace}}/build/vnote-linux-x64_v${{env.VNOTE_VER}}.AppImage
|
|
|
+ name: VNote-${{env.VNOTE_VER}}-linux-x64
|
|
|
+ path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-linux-x64.AppImage
|
|
|
|
|
|
- name: Update Tag
|
|
|
if: github.ref == 'refs/heads/master'
|
|
@@ -143,7 +150,7 @@ jobs:
|
|
|
uses: johnwbyrd/[email protected]
|
|
|
with:
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- files: ${{runner.workspace}}/build/vnote-linux-x64.AppImage
|
|
|
+ files: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-linux-x64
|
|
|
release: Continuous Build
|
|
|
tag: continuous-build
|
|
|
|
|
@@ -152,7 +159,7 @@ jobs:
|
|
|
uses: ncipollo/[email protected]
|
|
|
with:
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- artifacts: ${{runner.workspace}}/build/vnote-linux-x64_v${{env.VNOTE_VER}}.AppImage
|
|
|
+ artifacts: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-linux-x64
|
|
|
commit: master
|
|
|
tag: v${{env.VNOTE_VER}}
|
|
|
allowUpdates: true
|