mirror of
https://github.com/fanlumaster/googlepinyinime-rev.git
synced 2026-10-10 04:53:13 +08:00
56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
merge_group:
|
|
workflow_dispatch:
|
|
permissions:
|
|
contents: read
|
|
concurrency:
|
|
group: ci-${{ github.event_name }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
native:
|
|
name: Native / ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-24.04, macos-15, windows-2025]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Configure decoder regression tests
|
|
run: cmake -S tests -B build -DCMAKE_BUILD_TYPE=Release
|
|
- name: Configure dictionary builder
|
|
run: cmake -S command -B build-dictionary -DCMAKE_BUILD_TYPE=Release
|
|
- name: Build dictionary builder
|
|
run: cmake --build build-dictionary --config Release --parallel 4
|
|
- name: Build
|
|
run: cmake --build build --config Release --parallel 4
|
|
- name: Run regression tests
|
|
run: ctest --test-dir build -C Release --output-on-failure --no-tests=error --timeout 30
|
|
sanitizers:
|
|
name: Linux ASan and UBSan
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Configure
|
|
run: >-
|
|
cmake -S tests -B build-sanitizers -DCMAKE_BUILD_TYPE=Debug
|
|
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer"
|
|
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
|
|
- name: Build
|
|
run: cmake --build build-sanitizers --parallel 4
|
|
- name: Run regression tests
|
|
env:
|
|
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
|
|
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
|
run: ctest --test-dir build-sanitizers --output-on-failure --no-tests=error --timeout 30
|