Skip to content

Commit

Permalink
try fix linux-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tamlok committed Sep 19, 2023
1 parent 17d20c4 commit 535d1ca
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,42 @@ jobs:
- name: Install dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libfcitx-qt5-dev tree
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libfcitx5-qt6-dev tree
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-5.15
key: ${{ runner.os }}-QtCache-6.5

- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
version: 6.5.2
target: desktop
modules: qtwebengine
tools: tools_openssl_x64,1.1.1-4,qt.tools.openssl.gcc_64
cached: ${{ steps.cache-qt.outputs.cache-hit }}
modules: 'qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat'
tools: tools_opensslv3_${{matrix.config.platform}}
cache: 'true'

- name: Create Build Dir
run: mkdir build
working-directory: ${{runner.workspace}}

- name: Compile qt5ct
run: |
wget --no-check-certificate -c https://versaweb.dl.sourceforge.net/project/qt5ct/qt5ct-1.1.tar.bz2
tar xf qt5ct-1.*.tar.bz2
cd qt5ct-1.*/
QT_SELECT=5 qmake
git clone https://github.com/trialuser02/qt6ct qt6ct.git
cd qt6ct.git
qmake
make -j$(nproc) && sudo make install
working-directory: ${{runner.workspace}}/build

- name: Configure Project
run: |
qmake -v
cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so ./
cp /usr/lib/x86_64-linux-gnu/qt6/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so ./
sudo chmod +rwx ./libfcitxplatforminputcontextplugin.so
cp ./libfcitxplatforminputcontextplugin.so $Qt5_Dir/plugins/platforminputcontexts
cp ./libfcitxplatforminputcontextplugin.so $Qt6_Dir/plugins/platforminputcontexts
qmake CONFIG+=release -spec linux-g++-64 ${GITHUB_WORKSPACE}/vnote.pro
working-directory: ${{runner.workspace}}/build

Expand All @@ -96,16 +95,16 @@ jobs:
LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
# Copy translations
mkdir -p AppDir/usr/translations
cp $Qt5_Dir/translations/qt_zh_CN.qm 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 $Qt5_Dir/plugins/platformthemes/* AppDir/usr/plugins/platformthemes/
cp $Qt5_Dir/plugins/styles/* 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
Qt5_Tools=$Qt5_Dir/../../Tools
linuxdeploy-x86_64.AppImage --appdir ./AppDir --plugin qt --output appimage -l $Qt5_Tools/OpenSSL/binary/lib/libcrypto.so.1.1 -l $Qt5_Tools/OpenSSL/binary/lib/libssl.so.1.1
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
working-directory: ${{runner.workspace}}/build

Expand Down

0 comments on commit 535d1ca

Please sign in to comment.