Skip to content

Commit 004ec7e

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

File tree

3 files changed

+50
-21
lines changed

3 files changed

+50
-21
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: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ 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+
-DUSE_QT6=Off \
30+
-DFCITX_INSTALL_USE_FCITX_SYS_PATHS=ON
31+
cmake --build build --parallel

.github/workflows/release.yml

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,58 @@ 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: Build fcitx5-cskk
35+
run: |
36+
cmake -B build \
37+
-DCMAKE_PREFIX_PATH=/opt/fcitx \
38+
-DCMAKE_BUILD_TYPE=Release \
39+
-DCPACK_PACKAGING_INSTALL_PREFIX=/usr \
40+
-DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \
41+
-DENABLE_QT=On \
42+
-DUSE_QT6=On
43+
cmake --build build --parallel
4044
- name: Pack deb
4145
run: |
42-
cd ${{ runner.workspace }}/build
43-
cpack -G DEB -DFCITX_INSTALL_USE_FCITX_SYS_PATHS=On
46+
cd build
47+
cpack -G DEB \
48+
-DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=amd64
49+
cp _CPack_Packages/Linux/DEB/fcitx5-cskk_*.deb .
50+
- name: Debug - List build directory
51+
run: |
52+
echo "=== Contents of build/ directory ==="
53+
ls -la build/
54+
echo "=== Searching for .deb files ==="
55+
find build/ -name "*.deb" -ls
56+
- name: Verify deb package contents
57+
run: |
58+
echo "=== Checking .deb package structure ==="
59+
dpkg -c build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
60+
echo ""
61+
echo "=== Verifying main plugin location ==="
62+
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
63+
echo "✓ Main plugin in correct location: /usr/lib/x86_64-linux-gnu/fcitx5/fcitx5-cskk.so"
64+
else
65+
echo "✗ ERROR: Main plugin not found at /usr/lib/x86_64-linux-gnu/fcitx5/fcitx5-cskk.so"
66+
exit 1
67+
fi
68+
- name: Rename deb for workflow_dispatch builds
69+
if: github.event_name == 'workflow_dispatch'
70+
run: |
71+
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
72+
mv build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb \
73+
build/fcitx5-cskk_${{ steps.version.outputs.version }}_${TIMESTAMP}_amd64.deb
74+
echo "Renamed to: fcitx5-cskk_${{ steps.version.outputs.version }}_${TIMESTAMP}_amd64.deb"
4475
- name: Attatch artifact to Release
4576
if: github.event_name == 'release'
4677
uses: softprops/action-gh-release@v1
4778
with:
4879
files: |
49-
${{ runner.workspace }}/fcitx5-cskk/_packages/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
80+
build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
5081
- name: Upload DEB artifact
5182
if: github.event_name == 'workflow_dispatch'
5283
uses: actions/upload-artifact@v4
5384
with:
5485
name: fcitx5-cskk-deb
55-
path: ${{ runner.workspace }}/fcitx5-cskk/_packages/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
86+
path: build/fcitx5-cskk_*_amd64.deb
5687
if-no-files-found: error
5788
retention-days: 30

0 commit comments

Comments
 (0)