From edace26e01c6573015e3eb1a0e33ada2ce3bc71f Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Sun, 10 Mar 2024 22:50:14 -0700 Subject: [PATCH] Add workflow --- .github/workflows/check.yml | 74 +++++++++++++++++++++++++++++++++++++ 1 file changed, 74 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..e7fdc68 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,74 @@ +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 boost git + - 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: + repository: fcitx/libime + path: libime + submodules: true + - name: Cache libime data files + uses: actions/cache@v4 + with: + path: 'libime/**/*.tar.*' + key: ${{ runner.os }}-${{ hashFiles('libime/data/CMakeLists.txt') }} + - name: Build and Install libime + uses: fcitx/github-actions@cmake + with: + path: libime + - uses: actions/checkout@v4 + with: + path: fcitx5-table-other + - name: Build and Install fcitx5-table-other + uses: fcitx/github-actions@cmake + with: + path: fcitx5-table-other