From 1dc58c2adec295eb280e651d8cc06cdd5a2bd256 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Sun, 10 Mar 2024 22:43:32 -0700 Subject: [PATCH 1/2] Add workflow --- .github/workflows/check.yml | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..9a91d85 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,70 @@ +name: CI + +on: + push: + branches: + - master + pull_requuest: + branches: + - master + +jobs: + check: + name: Build and test + runs-on: ubuntu-latest + container: archlinux:latest + strategy: + fail-fast: false + matrix: + compiler: [gcc, clang] + include: + - compiler: gcc + cxx_compiler: g++ + - compiler: clang + cxx_compiler: clang++ + env: + CC: ${{ matrix.compiler }} + CXX: ${{ matrix.cxx_compiler }} + steps: + - name: Install dependencies + run: | + pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv librime rime-data + - uses: actions/checkout@v4 + with: + repository: fcitx/fcitx5 + path: fcitx5 + - name: Cache fcitx5 data files + uses: actions/cache@v4 + with: + path: 'fcitx5/**/*.tar.*' + key: ${{ runner.os }}-${{ hashFiles('fcitx5/src/modules/spell/CMakeLists.txt') }} + - name: Build and Install fcitx5 + uses: fcitx/github-actions@cmake + with: + path: fcitx5 + 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 + - uses: actions/checkout@v4 + with: + path: fcitx5-rime + - name: Init CodeQL + uses: github/codeql-action/init@v3 + with: + languages: cpp + source-root: fcitx5-rime + - name: Build and Install fcitx5-rime + uses: fcitx/github-actions@cmake + with: + path: fcitx5-rime + - name: Test + run: | + ctest --test-dir fcitx5-rime/build + - name: CodeQL Analysis + uses: github/codeql-action/analyze@v2 From a3d98808fce7cdf4b9ff31e5af632c971705f197 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Sun, 10 Mar 2024 22:49:14 -0700 Subject: [PATCH 2/2] Fix dep package name --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9a91d85..30c36ad 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Install dependencies run: | - pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv librime rime-data + pacman -Syu --noconfirm base-devel clang cmake ninja extra-cmake-modules fmt libuv librime librime-data - uses: actions/checkout@v4 with: repository: fcitx/fcitx5