-
-
Notifications
You must be signed in to change notification settings - Fork 60
103 lines (97 loc) · 3.53 KB
/
c-cpp.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: C/C++ CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-22.04
env:
ASAN_FLAGS: "-fsanitize=address -fsanitize=undefined"
steps:
- uses: actions/checkout@v4
with: { submodules: true }
- name: Install dependencies
run: sudo apt-get -y install libglib2.0-dev libaspell-dev hspell libhunspell-dev libvoikko-dev voikko-fi aspell-en libunittest++-dev hunspell-fr groff doxygen graphviz valac pkg-config
- name: Install nuspell
run: |
sudo apt-get -y install libicu-dev ninja-build
wget https://github.com/nuspell/nuspell/archive/refs/tags/v5.1.0.tar.gz -O - | tar -xz
cmake -S nuspell-* -B nuspell-build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=0
cmake --build nuspell-build
sudo cmake --install nuspell-build
rm -rf nuspell-*
- name: Bootstrap (gnulib and autoreconf)
run: ./bootstrap
- name: configure
run: ./configure --enable-relocatable
env:
CFLAGS: -g ${{ env.ASAN_FLAGS }}
CXXFLAGS: -g ${{ env.ASAN_FLAGS }}
LDFLAGS: ${{ env.ASAN_FLAGS }}
- name: make
run: make --jobs=`nproc`
- name: make check
run: make check --jobs=`nproc` || ( cat tests/test-suite.log && exit 1 )
- name: make distcheck
# normal build is with ASAN, distcheck is without ASAN. Both are covered.
run: make distcheck --jobs=`nproc`
- name: non-relocatable build
run: make clean && ./configure && make
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with: { submodules: true }
- name: Install dependencies
run: |
brew tap nuspell/nuspell
brew install automake vala pkg-config dbus-glib groff hspell hunspell libvoikko unittest-cpp nuspell coreutils doxygen graphviz
- name: Bootstrap (gnulib and autoreconf)
run: PATH="$(brew --prefix)/opt/m4/bin:${PATH}" ./bootstrap
- name: configure
# Note: aspell should work on macOS, but has been removed because one of
# the tests fails; see https://github.com/GNUAspell/aspell/issues/555
run: ./configure --enable-relocatable --without-aspell
- name: make
run: make --jobs=`nproc`
- name: make check
run: make check --jobs=`nproc`
- name: make distcheck
run: make distcheck --jobs=`nproc` DISTCHECK_CONFIGURE_FLAGS="--without-aspell"
build-windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
include:
- { sys: mingw64, env: x86_64 }
steps:
- uses: msys2/setup-msys2@v2
with:
release: false
msystem: ${{matrix.sys}}
install: >-
patch git groff
mingw-w64-${{matrix.env}}-autotools
mingw-w64-${{matrix.env}}-pkg-config
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-vala
mingw-w64-${{matrix.env}}-glib2
mingw-w64-${{matrix.env}}-hunspell
mingw-w64-${{matrix.env}}-hunspell-en
mingw-w64-${{matrix.env}}-nuspell
mingw-w64-${{matrix.env}}-unittest-cpp
mingw-w64-${{matrix.env}}-doxygen
mingw-w64-${{matrix.env}}-graphviz
- uses: actions/checkout@v4
with: { submodules: true }
- name: Bootstrap (gnulib and autoreconf)
run: ./bootstrap
- name: configure
run: ./configure --enable-relocatable
- name: make
run: make --jobs=`nproc`
- name: make check
run: make check --jobs=`nproc`
- name: make distcheck
run: make distcheck --jobs=`nproc`