Skip to content

Commit 3027da2

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

File tree

3 files changed

+53
-21
lines changed

3 files changed

+53
-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: 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: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,60 @@ 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+
if: github.event_name == 'workflow_dispatch'
72+
run: |
73+
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
74+
mv build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb \
75+
build/fcitx5-cskk_${{ steps.version.outputs.version }}_${TIMESTAMP}_amd64.deb
76+
echo "Renamed to: fcitx5-cskk_${{ steps.version.outputs.version }}_${TIMESTAMP}_amd64.deb"
4477
- name: Attatch artifact to Release
4578
if: github.event_name == 'release'
4679
uses: softprops/action-gh-release@v1
4780
with:
4881
files: |
49-
${{ runner.workspace }}/fcitx5-cskk/_packages/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
82+
build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
5083
- name: Upload DEB artifact
5184
if: github.event_name == 'workflow_dispatch'
5285
uses: actions/upload-artifact@v4
5386
with:
5487
name: fcitx5-cskk-deb
55-
path: ${{ runner.workspace }}/fcitx5-cskk/_packages/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
88+
path: build/fcitx5-cskk_*_amd64.deb
5689
if-no-files-found: error
5790
retention-days: 30

0 commit comments

Comments
 (0)