Skip to content

Commit 681d255

Browse files
committed
Re-enable builds on github action using arch linux container environment
1 parent 7ea5133 commit 681d255

File tree

5 files changed

+78
-73
lines changed

5 files changed

+78
-73
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# archlinux_build_environment_setup
2+
3+
Installs one example environment's build dependencies for fcitx5-cskk.
4+
Which means it installs wayland, qt6, fcitx5, cskk, and all dependencies of them.
5+
6+
Depends on archlinux. Caller should use
7+
8+
runs-on: ubuntu-latest
9+
container: archlinux:latest
10+
11+
or alike to use the archlinux container.
12+
13+
Implicitly depends on CC and CXX environment variables.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: archlinux_build_environment_setup
2+
description: "Build environemnt setup. Prepares the dev libraries to build the project. Depends on archlinux container."
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Install dependencies
7+
run: |
8+
pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv boost git qt6-base qt6-wayland libxkbcommon skk-jisyo cargo-c cbindgen
9+
shell: bash
10+
- uses: actions/checkout@v4
11+
with:
12+
repository: fcitx/fcitx5
13+
path: fcitx5
14+
- name: Cache fcitx5 data files
15+
uses: actions/cache@v4
16+
with:
17+
path: 'fcitx5/**/*.tar.*'
18+
key: ${{ runner.os }}-${{ hashFiles('fcitx5/src/modules/spell/CMakeLists.txt')
19+
}}
20+
- name: Build and Install fcitx5
21+
uses: fcitx/github-actions@cmake
22+
with:
23+
path: fcitx5
24+
cmake-option: >-
25+
-DENABLE_KEYBOARD=Off -DENABLE_X11=Off -DENABLE_WAYLAND=Off -DENABLE_ENCHANT=Off
26+
-DENABLE_DBUS=Off -DENABLE_SERVER=Off -DENABLE_EMOJI=Off -DUSE_SYSTEMD=Off
27+
- uses: actions/checkout@v4
28+
with:
29+
repository: fcitx/fcitx5-qt
30+
path: fcitx5-qt
31+
- name: Build and Install fcitx5-qt
32+
uses: fcitx/github-actions@cmake
33+
with:
34+
repository: fcitx/fcitx5-qt
35+
path: fcitx5-qt
36+
cmake-option: >-
37+
-DENABLE_QT4=Off -DENABLE_QT5=Off -DENABLE_QT6=On
38+
- uses: actions/checkout@v4
39+
with:
40+
repository: naokiri/cskk
41+
path: cskk
42+
- uses: actions/cache@v3
43+
with:
44+
path: |
45+
~/.cargo/bin/
46+
~/.cargo/registry/index/
47+
~/.cargo/registry/cache/
48+
~/.cargo/git/db/
49+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
50+
- name: Build and install cskk
51+
shell: bash
52+
run: "cd cskk\ncargo cinstall --release --prefix=/usr \n"

.github/workflows/build_pass.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Build passes check
2-
# Disabled for push for now.
3-
# Re-enable when github actions has good image for build environment. (Issue#83)
4-
#on: [ push ]
5-
on: workflow_dispatch
2+
on: [ push ]
63
concurrency:
74
group: "continuous_test"
85
cancel-in-progress: true
@@ -11,7 +8,9 @@ jobs:
118
build-check:
129
name: Build check
1310
runs-on: ubuntu-24.04
11+
container: archlinux:latest
1412
steps:
13+
-
1514
- name: checkout
1615
uses: actions/checkout@v3
1716
with:
@@ -24,14 +23,8 @@ jobs:
2423
id: cskk_version
2524
run: |
2625
echo cskk_version=`bin/cskk_version.sh` >> ${GITHUB_OUTPUT}
27-
- name: Download & install libcskk
28-
run: |
29-
wget https://github.com/naokiri/cskk/releases/download/v${{ steps.cskk_version.outputs.cskk_version }}/libcskk_${{ steps.cskk_version.outputs.cskk_version }}_amd64.deb
30-
sudo apt-get install ./libcskk_${{ steps.cskk_version.outputs.cskk_version }}_amd64.deb
31-
- name: Install required libs and dependencies
32-
run: |
33-
sudo apt-get update
34-
sudo apt-get install gettext cmake extra-cmake-modules fcitx5-modules-dev libfcitx5core-dev qtbase5-dev libfcitx5-qt-dev
26+
- name: Install required build environment
27+
uses: ./.github/actions/archlinux_build_environment_setup
3528
- name: Build
3629
uses: ashutoshvarma/action-cmake-build@master
3730
with:

.github/workflows/check.yml

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -36,52 +36,8 @@ jobs:
3636
CC: ${{ matrix.compiler }}
3737
CXX: ${{ matrix.cxx_compiler }}
3838
steps:
39-
- name: Install dependencies
40-
run: |
41-
pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv boost git qt6-base qt6-wayland libxkbcommon skk-jisyo cargo-c cbindgen
42-
- uses: actions/checkout@v4
43-
with:
44-
repository: fcitx/fcitx5
45-
path: fcitx5
46-
- name: Cache fcitx5 data files
47-
uses: actions/cache@v4
48-
with:
49-
path: 'fcitx5/**/*.tar.*'
50-
key: ${{ runner.os }}-${{ hashFiles('fcitx5/src/modules/spell/CMakeLists.txt')
51-
}}
52-
- name: Build and Install fcitx5
53-
uses: fcitx/github-actions@cmake
54-
with:
55-
path: fcitx5
56-
cmake-option: >-
57-
-DENABLE_KEYBOARD=Off -DENABLE_X11=Off -DENABLE_WAYLAND=Off -DENABLE_ENCHANT=Off
58-
-DENABLE_DBUS=Off -DENABLE_SERVER=Off -DENABLE_EMOJI=Off -DUSE_SYSTEMD=Off
59-
- uses: actions/checkout@v4
60-
with:
61-
repository: fcitx/fcitx5-qt
62-
path: fcitx5-qt
63-
- name: Build and Install fcitx5-qt
64-
uses: fcitx/github-actions@cmake
65-
with:
66-
repository: fcitx/fcitx5-qt
67-
path: fcitx5-qt
68-
cmake-option: >-
69-
-DENABLE_QT4=Off -DENABLE_QT5=Off -DENABLE_QT6=On
70-
- uses: actions/checkout@v4
71-
with:
72-
repository: naokiri/cskk
73-
path: cskk
74-
- uses: actions/cache@v3
75-
with:
76-
path: |
77-
~/.cargo/bin/
78-
~/.cargo/registry/index/
79-
~/.cargo/registry/cache/
80-
~/.cargo/git/db/
81-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
82-
- name: Build and install cskk
83-
shell: bash
84-
run: "cd cskk\ncargo cinstall --release --prefix=/usr \n"
39+
- name: Install required build environment
40+
uses: ./.github/actions/archlinux_build_environment_setup
8541
- uses: actions/checkout@v4
8642
with:
8743
path: fcitx5-cskk

.github/workflows/release.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
name: Release x86_64 deb artifact on release published
2-
# Disabled for release for now.
3-
# Re-enable when github actions has good image for build. (Issue#83)
4-
#on:
5-
# release:
6-
# types:
7-
# - published
8-
on: workflow_dispatch
2+
on:
3+
release:
4+
types:
5+
- published
96

107
jobs:
118
Build:
@@ -31,14 +28,8 @@ jobs:
3128
bin/metainfo_version.sh
3229
- name: Check release tag matches version
3330
run: test "refs/tags/v${{ steps.version.outputs.version }}" = ${{ github.ref }}
34-
- name: Download & install libcskk
35-
run: |
36-
wget https://github.com/naokiri/cskk/releases/download/v${{ steps.cskk_version.outputs.cskk_version }}/libcskk_${{ steps.cskk_version.outputs.cskk_version }}_amd64.deb
37-
sudo apt-get install ./libcskk_${{ steps.cskk_version.outputs.cskk_version }}_amd64.deb
38-
- name: Install required libs and dependencies
39-
run: |
40-
sudo apt-get update
41-
sudo apt-get install extra-cmake-modules libfcitx5core-dev qtbase5-dev libfcitx5-qt-dev gettext
31+
- name: Install required build environment
32+
uses: ./.github/actions/archlinux_build_environment_setup
4233
- name: Build
4334
uses: ashutoshvarma/action-cmake-build@master
4435
with:

0 commit comments

Comments
 (0)