Skip to content

Commit

Permalink
Try build with non-root user
Browse files Browse the repository at this point in the history
  • Loading branch information
wengxt committed Aug 27, 2024
1 parent 71795e0 commit 25cadf3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/fcitx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.cxx_compiler }}
steps:
- name: Setup User
run: |
useradd -m builduser
- name: Install dependencies
run: |
pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv boost git qt6-base qt6-wayland libxkbcommon qt6-webengine bazel
Expand All @@ -56,6 +59,7 @@ jobs:
cmake-option: >-
-DENABLE_KEYBOARD=Off -DENABLE_X11=Off -DENABLE_WAYLAND=Off -DENABLE_ENCHANT=Off
-DENABLE_DBUS=Off -DENABLE_SERVER=Off -DENABLE_EMOJI=Off -DUSE_SYSTEMD=Off
install-prefix: /usr
- uses: actions/checkout@v4
with:
path: mozc
Expand All @@ -69,6 +73,7 @@ jobs:
shell: bash
run: |
cd mozc/src/
PKG_CONFIG_PATH=/opt/fcitx/lib/pkgconfig _BUILD_TARGETS=unix/fcitx5:fcitx5-mozc.so ../scripts/build_fcitx5_bazel --cxxopt=-Wno-uninitialized --host_cxxopt=-Wno-uninitialized --linkopt=-L/opt/fcitx/lib
chown -R builduser:builduser .
_BUILD_TARGETS=unix/fcitx5:fcitx5-mozc.so sudo -u builduser ../scripts/build_fcitx5_bazel --cxxopt=-Wno-uninitialized --host_cxxopt=-Wno-uninitialized --linkopt=-L/opt/fcitx/lib
- name: CodeQL Analysis
uses: github/codeql-action/analyze@v2

0 comments on commit 25cadf3

Please sign in to comment.