Skip to content

Commit cc42f94

Browse files
committed
Use normal commands on cmake build
1 parent 289635b commit cc42f94

File tree

4 files changed

+57
-23
lines changed

4 files changed

+57
-23
lines changed

.github/actions/archlinux_build_environment_setup/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# archlinux_build_environment_setup
22

33
Installs one example environment's build dependencies for fcitx5-cskk.
4-
Which means it installs wayland, qt6, fcitx5, cskk, and all dependencies of them.
4+
Which means it installs wayland, qt6, fcitx5, cskk, and all dependencies of them under /opt/fcitx.
5+
Cmake files will be at /opt/fcitx/lib/cmake/Fcitx5Core/Fcitx5CoreConfig.cmake
56

67
Depends on archlinux. Caller should use
78

.github/workflows/build_pass.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ jobs:
2222
echo cskk_version=`bin/cskk_version.sh` >> ${GITHUB_OUTPUT}
2323
- name: Install required build environment
2424
uses: ./.github/actions/archlinux_build_environment_setup
25-
- name: Build
26-
uses: ashutoshvarma/action-cmake-build@master
27-
with:
28-
build-dir: ${{ runner.workspace }}/build
29-
cc: gcc
30-
cxx: g++
31-
build-type: Release
32-
run-test: false
33-
configure-options: -DFCITX_INSTALL_USE_FCITX_SYS_PATHS=ON -DUSE_QT6=Off
34-
build-options: --verbose
25+
- name: Build fcitx5-cskk
26+
run: |
27+
cmake -B build \
28+
-DCMAKE_PREFIX_PATH=/opt/fcitx \
29+
-DENABLE_QT=On \
30+
-DUSE_QT6=On \
31+
-DFCITX_INSTALL_USE_FCITX_SYS_PATHS=ON
32+
cmake --build build --parallel

.github/workflows/release.yml

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,62 @@ jobs:
3131
run: test "refs/tags/v${{ steps.version.outputs.version }}" = ${{ github.ref }}
3232
- name: Install required build environment
3333
uses: ./.github/actions/archlinux_build_environment_setup
34-
- name: Build (and install) fcitx5-cskk
35-
uses: fcitx/github-actions@cmake
36-
with:
37-
path: fcitx5-cskk
38-
cmake-option: >-
39-
-DENABLE_QT=On -DUSE_QT6=On -DFCITX_INSTALL_USE_FCITX_SYS_PATHS=ON
34+
- name: Install dpkg for package verification
35+
run: pacman -S --noconfirm dpkg
36+
- name: Build fcitx5-cskk
37+
run: |
38+
cmake -B build \
39+
-DCMAKE_PREFIX_PATH=/opt/fcitx \
40+
-DCMAKE_BUILD_TYPE=Release \
41+
-DCPACK_PACKAGING_INSTALL_PREFIX=/usr \
42+
-DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \
43+
-DENABLE_QT=On \
44+
-DUSE_QT6=On
45+
cmake --build build --parallel
4046
- name: Pack deb
4147
run: |
42-
cd ${{ runner.workspace }}/build
43-
cpack -G DEB -DFCITX_INSTALL_USE_FCITX_SYS_PATHS=On
48+
cd build
49+
cpack -G DEB \
50+
-DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=amd64
51+
cp _CPack_Packages/Linux/DEB/fcitx5-cskk_*.deb .
52+
# - name: Debug - List build directory
53+
# run: |
54+
# echo "=== Contents of build/ directory ==="
55+
# ls -la build/
56+
# echo "=== Searching for .deb files ==="
57+
# find build/ -name "*.deb" -ls
58+
- name: Verify deb package contents
59+
run: |
60+
echo "=== Checking .deb package structure ==="
61+
dpkg -c build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
62+
echo ""
63+
echo "=== Verifying main plugin location ==="
64+
if dpkg -c build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb | grep -q "./usr/lib/x86_64-linux-gnu/fcitx5/fcitx5-cskk.so"; then
65+
echo "✓ Main plugin in correct location: /usr/lib/x86_64-linux-gnu/fcitx5/fcitx5-cskk.so"
66+
else
67+
echo "✗ ERROR: Main plugin not found at /usr/lib/x86_64-linux-gnu/fcitx5/fcitx5-cskk.so"
68+
exit 1
69+
fi
70+
- name: Rename deb for workflow_dispatch builds
71+
id: timestamp
72+
if: github.event_name == 'workflow_dispatch'
73+
run: |
74+
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
75+
mv build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb \
76+
build/fcitx5-cskk_${{ steps.version.outputs.version }}_${TIMESTAMP}_amd64.deb
77+
echo "Renamed to: fcitx5-cskk_${{ steps.version.outputs.version }}_${TIMESTAMP}_amd64.deb"
78+
echo "timestamp=${TIMESTAMP}" >> ${GITHUB_OUTPUT}
4479
- name: Attatch artifact to Release
4580
if: github.event_name == 'release'
4681
uses: softprops/action-gh-release@v1
4782
with:
4883
files: |
49-
${{ runner.workspace }}/fcitx5-cskk/_packages/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
84+
build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
5085
- name: Upload DEB artifact
5186
if: github.event_name == 'workflow_dispatch'
5287
uses: actions/upload-artifact@v4
5388
with:
54-
name: fcitx5-cskk-deb
55-
path: ${{ runner.workspace }}/fcitx5-cskk/_packages/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
89+
name: fcitx5-cskk-deb-${{ steps.timestamp.outputs.timestamp }}
90+
path: build/fcitx5-cskk_*_amd64.deb
5691
if-no-files-found: error
5792
retention-days: 30

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Same as other fcitx5 plugin project.
1313

1414
For example in Debian,
1515

16-
$ sudo apt install gettext cmake extra-cmake-modules fcitx5-modules-dev qtbase5-dev qtdeclarative5-dev libfcitx5-qt-dev
16+
$ sudo apt install gettext cmake extra-cmake-modules fcitx5-modules-dev qtbase6-dev qt6-wayland qtdeclarative6-dev libfcitx6-qt-dev
1717

1818
For full features.
1919

0 commit comments

Comments
 (0)