summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorQijia Liu <liumeo@pku.edu.cn>2025-12-17 19:21:45 -0500
committerPeng Wu <alexepico@gmail.com>2025-12-22 14:34:06 +0800
commit988df889e9351cba4d0f8ecae863f69c3cb4fcb2 (patch)
tree8fa82d03754e11258322e02eeb4781df10a6a5ec /.github/workflows
parenteea3ec45f5fb685fd9d10a4125f7b91887bc3a56 (diff)
downloadlibpinyin-988df889e9351cba4d0f8ecae863f69c3cb4fcb2.tar.gz
libpinyin-988df889e9351cba4d0f8ecae863f69c3cb4fcb2.tar.xz
libpinyin-988df889e9351cba4d0f8ecae863f69c3cb4fcb2.zip
Add CMake workflow
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cmake.yml32
-rw-r--r--.github/workflows/make-check.yml2
2 files changed, 33 insertions, 1 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
new file mode 100644
index 0000000..f5d79bd
--- /dev/null
+++ b/.github/workflows/cmake.yml
@@ -0,0 +1,32 @@
+name: CMake CI
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ container:
+ image: fedora:rawhide
+
+ steps:
+ - uses: actions/checkout@v6
+ - name: install build dependency
+ run: sudo dnf install -y gcc-c++ kyotocabinet-devel glib2-devel cmake ninja wget
+ - name: configure
+ run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
+ - name: build
+ run: cmake --build build
+ - name: install
+ env:
+ DESTDIR: ${{ github.workspace }}/dist
+ run: cmake --install build
+ - name: run tests
+ working-directory: ${{ github.workspace }}/build
+ run: ctest --output-on-failure
+ - name: list artifact
+ working-directory: ${{ github.workspace }}/dist/usr/local
+ run: find .
diff --git a/.github/workflows/make-check.yml b/.github/workflows/make-check.yml
index 382184c..ddb0a74 100644
--- a/.github/workflows/make-check.yml
+++ b/.github/workflows/make-check.yml
@@ -15,7 +15,7 @@ jobs:
image: fedora:rawhide
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v6
- name: install build dependency
run: sudo dnf install -y gcc-c++ libdb-devel glib2-devel make gnome-common wget awk
- name: autoconf