This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
123 lines (102 loc) · 4.39 KB
/
configure.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Check that the ./configure script behaves as expected in various scenarios
name: Configure
on:
- push
- pull_request
jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check that no optional dependency is installed
run: |
# Remove liblz4-dev which is installed by default on the runner
sudo apt-get remove liblz4-dev
# Check that there are no dependencies installed
! pkg-config --exists libuv
! pkg-config --exists liblz4
- name: Run autoreconf
run: |
autoreconf -i
- name: With no deps ./configure
run: |
# Succeed, since we are not explicitly requiring libuv.
./configure
- name: With no deps ./configure --enable-uv
run: |
# Fail, since libuv is not installed.
! ./configure --enable-uv 2>errors
tail -1 errors | grep -q "libuv required but not found" || (cat errors && false)
- name: With no deps ./configure --with-lz4
run: |
# Fail, since using lz4 makes sense only if libuv is used too.
! ./configure --with-lz4 2>errors
tail -1 errors | grep -q "liblz4 can be used only if libuv is used too" || (cat errors && false)
- name: Install libuv
run: |
sudo apt-get install -qq linux-libc-dev libuv1-dev
- name: With libuv only ./configure
run: |
# Fail, since libuv is installed but liblz4 is not.
! ./configure 2>errors
tail -1 errors | grep -q "liblz4 required but not found" || (cat errors && false)
- name: With libuv only ./configure --with-lz4
run: |
# Fail, since liblz4 is not installed.
! ./configure --with-lz4 2>errors
tail -1 errors | grep -q "liblz4 required but not found" || (cat errors && false)
- name: With libuv only ./configure --without-lz4
run: |
# Succeed, since we support building without lz4 even if libuv is found,
# as long --without-lz4 is passed.
./configure --without-lz4
- name: With libuv only ./configure --disable-uv --with-lz4
run: |
# Fail, since using lz4 makes sense only if libuv is used too.
! ./configure --disable-uv --with-lz4 2>errors
tail -1 errors | grep -q "liblz4 can be used only if libuv is used too" || (cat errors && false)
- name: With libuv only ./configure --enable-lz4
run: |
# Fail, since liblz4 is not installed.
! ./configure --enable-lz4 2>errors
tail -1 errors | grep -q "liblz4 required but not found" || (cat errors && false)
- name: Install liblz4
run: |
sudo apt-get install -qq liblz4-dev
- name: With libuv and liblz4 ./configure
run: |
# Succeed, since all optional dependencies are found and used.
./configure
- name: With libuv and liblz4 ./configure --without-lz4
run: |
# Succeed, since we support building without lz4 even if both libuv and
# liblz4 are found.
./configure --without-lz4
- name: With libuv and liblz4 ./configure --without-lz4 --enable-lz4
run: |
# Fail, since enabling compression by default only makes sense if liblz4
# is used.
! ./configure --without-lz4 --enable-lz4 2>errors
tail -1 errors | grep -q "snapshot compression (either by default or not) requires liblz4" || (cat errors && false)
- name: With libuv and liblz4 ./configure --without-lz4 --disable-lz4
run: |
# Fail, since disabling compression by default only makes sense if
# liblz4 is used.
! ./configure --without-lz4 --disable-lz4 2>errors
tail -1 errors | grep -q "snapshot compression (either by default or not) requires liblz4" || (cat errors && false)
- name: With libuv and liblz4 ./configure --with-lz4 --enable-lz4
run: |
# Succeed, since liblz4 is found and used.
./configure --with-lz4 --enable-lz4
- name: With libuv and liblz4 ./configure --with-lz4 --disable-lz4
run: |
# Succeed, since liblz4 is found and used.
./configure --with-lz4 --disable-lz4
- name: With libuv and liblz4 ./configure --enable-lz4
run: |
# Succeed, since liblz4 is used by default if found.
./configure --enable-lz4
- name: With libuv and liblz4 ./configure --disable-lz4
run: |
# Succeed, since liblz4 is used by default if found.
./configure --disable-lz4