Debian Codegraph @

.github/workflows/test.yml

raw
1 name: ci
2
3 on:
4 pull_request:
5 branches: [ master ]
6 workflow_dispatch:
7
8 permissions: read-all
9
10 jobs:
11 linux_autotools:
12 runs-on: ubuntu-latest
13 steps:
14 - uses: actions/checkout@v4
15 - name: autoreconf
16 run: autoreconf -vif
17 - name: configure
18 run: ./configure --enable-dwarfexample
19 - name: make -j
20 run: make
21 - name: make -j check
22 run: make check
23 - name: make distcheck
24 run: make distcheck
25 linux_cmake:
26 runs-on: ubuntu-latest
27 steps:
28 - uses: actions/checkout@v4
29 - name: Install cmake
30 run: |
31 sudo apt-get -qq update
32 sudo apt install build-essential cmake
33 - name: Build libdwarf
34 run: |
35 mkdir builddir && cd builddir
36 cmake -G "Unix Makefiles" -DDO_TESTING=ON -DBUILD_DWARFEXAMPLE=ON ../CMakeLists.txt
37 make
38 ctest -R self
39
40 linux_meson:
41 runs-on: ubuntu-latest
42 steps:
43 - uses: actions/checkout@v4
44 - name: Install meson / ninja
45 run: |
46 sudo apt-get -qq update
47 sudo apt install build-essential meson ninja-build python3-pip python3-setuptools
48 pip3 install --upgrade pip
49 pip3 install meson --user
50 - name: Install doxygen
51 run: |
52 sudo apt install doxygen
53 - name: Build libdwarf
54 run: |
55 mkdir builddir && cd builddir
56 meson setup -Ddwarfexample=true . ..
57 ninja
58 ninja test
59
60 freebsd_autotools:
61 runs-on: ubuntu-latest
62 steps:
63 - uses: actions/checkout@v4
64 - name: FreeBSD-with-autotools
65 uses: cross-platform-actions/[email protected]
66 with:
67 operating_system: freebsd
68 sync_files: runner-to-vm
69 version: '14.0'
70 run: |
71 uname -a
72 whoami
73 freebsd-version
74 echo $SHELL
75 sudo pkg install -y python3 bash automake pkgconf
76 sudo pkg install -y libtool gmake binutils lzlib
77 autoreconf --warnings=all -vif
78 ./configure
79 make
80 make check
81
82 freebsd_cmake:
83 runs-on: ubuntu-latest
84 steps:
85 - uses: actions/checkout@v4
86 - name: FreeBSD-with-cmake
87 uses: cross-platform-actions/[email protected]
88 with:
89 operating_system: freebsd
90 sync_files: runner-to-vm
91 version: '14.0'
92 run: |
93 uname -a
94 freebsd-version
95 echo $SHELL
96 sudo pkg install -y python3 bash cmake ninja pkgconf
97 sudo pkg install -y gmake binutils lzlib
98 mkdir builddir && cd builddir
99 cmake -G Ninja -DDO_TESTING=YES -DBUILD_NON_SHARED=YES -DBUILD_SHARED=NO -DBUILD_DWARFEXAMPLE=ON ../CMakeLists.txt
100 ninja
101 ninja test
102
103 freebsd_meson:
104 runs-on: ubuntu-latest
105 name: FreeBSD-with-meson
106 steps:
107 - uses: actions/checkout@v4
108 - name: FreeBSD-meson
109 uses: cross-platform-actions/[email protected]
110 with:
111 operating_system: freebsd
112 sync_files: runner-to-vm
113 version: '14.0'
114 run: |
115 uname -a
116 freebsd-version
117 echo $SHELL
118 sudo pkg install -y python3 bash meson ninja
119 sudo pkg install -y pkgconf gmake binutils zstd
120 mkdir build && cd build
121 meson setup -Ddwarfexample=true . ..
122 ninja
123 ninja test
124
125 macos_autotools:
126 runs-on: macos-latest
127 steps:
128 - uses: actions/checkout@v4
129 - name: tools
130 run: brew install automake libtool
131 - name: autoreconf
132 run: autoreconf --warnings=all -vif
133 - name: config
134 run: ./configure --enable-dwarfexample --enable-wall
135 - name: make
136 run: |
137 make
138 make check
139
140 macos_cmake:
141 runs-on: macos-latest
142 steps:
143 - uses: actions/checkout@v4
144 - name: brew
145 run: brew install cmake ninja
146 - name: cmake
147 run: |
148 mkdir builddir && cd builddir
149 cmake -G Ninja -DDO_TESTING=YES -DBUILD_NON_SHARED=YES -DBUILD_SHARED=NO -DBUILD_DWARFEXAMPLE=ON ../CMakeLists.txt
150 ninja
151 ninja test
152
153 macos_meson:
154 runs-on: macos-latest
155 steps:
156 - uses: actions/checkout@v4
157 - name: brew
158 run: |
159 brew install meson ninja
160 - name: meson
161 run: |
162 mkdir builddir && cd builddir
163 meson setup -Ddwarfexample=true . ..
164 ninja
165 ninja test
166
167 msys2_autotools:
168 runs-on: windows-latest
169 defaults:
170 run:
171 shell: msys2 {0}
172 env:
173 PYTHONIOENCODING: "utf-8"
174 steps:
175 - uses: actions/checkout@v4
176 - uses: msys2/setup-msys2@v2
177 with:
178 msystem: MINGW64
179 update: true
180 install: base-devel git autoconf automake libtool mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib
181 - name: Configure
182 run: autoreconf -vif && ./configure --disable-static --enable-shared
183 - name: Build
184 run: make
185 - name: Check
186 run: make check
187 - name: Distcheck
188 run: make distcheck DISTCHECK_CONFIGURE_FLAGS="--disable-static --enable-shared"
189
190 msys2_cmake:
191 runs-on: windows-latest
192 defaults:
193 run:
194 shell: msys2 {0}
195 env:
196 PYTHONIOENCODING: "utf-8"
197 steps:
198 - uses: actions/checkout@v4
199 - uses: msys2/setup-msys2@v2
200 with:
201 msystem: MINGW64
202 update: true
203 install: base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-zlib mingw-w64-x86_64-doxygen mingw-w64-x86_64-ninja
204 - name: Build libdwarf
205 run: |
206 mkdir builddir && cd builddir
207 cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/c/msys64/usr -DBUILD_DWARFEXAMPLE=ON -DDO_TESTING=ON -DBUILD_SHARED:BOOL=TRUE -DBUILD_NON_SHARED:BOOL=FALSE ../CMakeLists.txt
208 ninja
209 ninja install
210 ninja test
211
212 msys2_meson:
213 runs-on: windows-latest
214 defaults:
215 run:
216 shell: msys2 {0}
217 env:
218 PYTHONIOENCODING: "utf-8"
219 steps:
220 - uses: actions/checkout@v4
221 - uses: msys2/setup-msys2@v2
222 with:
223 msystem: MINGW64
224 update: true
225 install: base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3 mingw-w64-x86_64-python3-pip mingw-w64-x86_64-meson mingw-w64-x86_64-ninja mingw-w64-x86_64-zlib mingw-w64-x86_64-doxygen
226 - name: Build libdwarf
227 run: |
228 mkdir builddir && cd builddir
229 meson setup --default-library shared -Ddwarfexample=true -Ddwarfgen=false . ..
230 ninja
231 ninja install
232 ninja test