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 024c030
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .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,19 +59,15 @@ 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
submodules: true
- name: Init CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
source-root: mozc/src/unix/fcitx5
- name: Build fcitx5-mozc
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
- name: CodeQL Analysis
uses: github/codeql-action/analyze@v2
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
chown -R root:root .

0 comments on commit 024c030

Please sign in to comment.