Skip to content

Commit c49ed41

Browse files
committed
Add CI
Assisted-by: Cursor
1 parent b843719 commit c49ed41

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

.github/workflows/ci.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
pull_request:
7+
branches: [ master, main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y \
20+
autoconf \
21+
automake \
22+
build-essential \
23+
perl \
24+
patch \
25+
diffutils \
26+
xmlto \
27+
libpcre2-dev
28+
29+
- name: Bootstrap
30+
run: ./bootstrap
31+
32+
- name: Configure
33+
run: |
34+
./configure \
35+
--with-pcre2
36+
37+
- name: Build
38+
run: make -j$(nproc)
39+
40+
- name: Run tests
41+
run: make check
42+
43+
- name: Show test results on failure
44+
if: failure()
45+
run: |
46+
echo "=== Test logs ==="
47+
find . -name "*.log" -type f -exec echo "=== {} ===" \; -exec cat {} \;
48+
echo "=== Test arena contents ==="
49+
find test-arena -type f 2>/dev/null | head -20 | while read f; do
50+
echo "=== $f ==="
51+
cat "$f" 2>/dev/null || echo "Cannot read file"
52+
done
53+
54+
test-without-pcre2:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Install dependencies (without PCRE2)
60+
run: |
61+
sudo apt-get update
62+
sudo apt-get install -y \
63+
autoconf \
64+
automake \
65+
build-essential \
66+
perl \
67+
patch \
68+
diffutils \
69+
xmlto
70+
71+
- name: Bootstrap
72+
run: ./bootstrap
73+
74+
- name: Configure without PCRE2
75+
run: ./configure --without-pcre2
76+
77+
- name: Build
78+
run: make -j$(nproc)
79+
80+
- name: Run tests
81+
run: make check
82+
83+
test-distcheck:
84+
runs-on: ubuntu-latest
85+
steps:
86+
- uses: actions/checkout@v4
87+
88+
- name: Install dependencies
89+
run: |
90+
sudo apt-get update
91+
sudo apt-get install -y \
92+
autoconf \
93+
automake \
94+
build-essential \
95+
perl \
96+
patch \
97+
diffutils \
98+
xmlto \
99+
libpcre2-dev
100+
101+
- name: Bootstrap
102+
run: ./bootstrap
103+
104+
- name: Configure
105+
run: ./configure --with-pcre2
106+
107+
- name: Build and test distribution
108+
run: make distcheck
109+
110+

0 commit comments

Comments
 (0)