Skip to content

Commit 8507aec

Browse files
committed
More extensive CI tests
Signed-off-by: falkTX <[email protected]>
1 parent 1662e56 commit 8507aec

File tree

4 files changed

+175
-183
lines changed

4 files changed

+175
-183
lines changed

.github/workflows/build.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
os:
16+
# wrong use of AU MIDIPacket
17+
# - macos-12
18+
# - macos-13
19+
# - macos-14
20+
# webgui failure
21+
# - ubuntu-20.04
22+
- ubuntu-22.04
23+
- ubuntu-24.04
24+
runs-on: ${{ matrix.os }}
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
- name: Set up dependencies
30+
if: ${{ runner.os == 'Linux' }}
31+
env:
32+
DEBIAN_FRONTEND: noninteractive
33+
run: |
34+
sudo apt-get update -qq
35+
sudo apt-get install -yq libasound2-dev libcairo2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev xvfb
36+
- name: Set num jobs
37+
if: ${{ runner.os == 'Linux' }}
38+
run: echo "JOBS=$(nproc)" >> $GITHUB_ENV
39+
- name: Set num jobs
40+
if: ${{ runner.os != 'Linux' }}
41+
run: echo "JOBS=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV
42+
- name: Without any warnings
43+
env:
44+
CFLAGS: -Werror
45+
CXXFLAGS: -Werror
46+
run: |
47+
make clean >/dev/null
48+
make -j ${{ env.JOBS }}
49+
- name: Run tests
50+
if: ${{ runner.os == 'Linux' }}
51+
run: |
52+
xvfb-run make -C tests run
53+
- name: As C++98 mode
54+
env:
55+
CFLAGS: -Werror
56+
CXXFLAGS: -Werror -std=gnu++98
57+
run: |
58+
make clean >/dev/null
59+
make -j ${{ env.JOBS }}
60+
- name: As C++11 mode
61+
env:
62+
CFLAGS: -Werror
63+
CXXFLAGS: -Werror -std=gnu++11
64+
run: |
65+
make clean >/dev/null
66+
make -j ${{ env.JOBS }}
67+
- name: As C++14 mode
68+
env:
69+
CFLAGS: -Werror
70+
CXXFLAGS: -Werror -std=gnu++14
71+
run: |
72+
make clean >/dev/null
73+
make -j ${{ env.JOBS }}
74+
- name: As C++17 mode
75+
env:
76+
CFLAGS: -Werror
77+
CXXFLAGS: -Werror -std=gnu++17
78+
run: |
79+
make clean >/dev/null
80+
make -j ${{ env.JOBS }}
81+
- name: As C++20 mode
82+
env:
83+
CFLAGS: -Werror
84+
CXXFLAGS: -Werror -std=gnu++20
85+
run: |
86+
make clean >/dev/null
87+
make -j ${{ env.JOBS }}
88+
- name: No namespace
89+
env:
90+
CFLAGS: -Werror
91+
CXXFLAGS: -Werror -DDONT_SET_USING_DISTRHO_NAMESPACE -DDONT_SET_USING_DGL_NAMESPACE
92+
run: |
93+
make clean >/dev/null
94+
make -j ${{ env.JOBS }}
95+
- name: Custom namespace
96+
env:
97+
CFLAGS: -Werror
98+
CXXFLAGS: -Werror -DDISTRHO_NAMESPACE=WubbWubb -DDGL_NAMESPACE=DabDab
99+
run: |
100+
make clean >/dev/null
101+
make -j ${{ env.JOBS }}
102+
- name: With OpenGL 3.x
103+
env:
104+
CFLAGS: -Werror
105+
CXXFLAGS: -Werror
106+
run: |
107+
make clean >/dev/null
108+
make -j ${{ env.JOBS }} USE_OPENGL3=true
109+
- name: Without Cairo
110+
env:
111+
CFLAGS: -Werror
112+
CXXFLAGS: -Werror
113+
run: |
114+
make clean >/dev/null
115+
make -j ${{ env.JOBS }} HAVE_CAIRO=false
116+
- name: Without OpenGL
117+
env:
118+
CFLAGS: -Werror
119+
CXXFLAGS: -Werror
120+
run: |
121+
make clean >/dev/null
122+
make -j ${{ env.JOBS }} HAVE_OPENGL=false

.github/workflows/makefile.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

distrho/extra/Base64.hpp

Lines changed: 5 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include <vector>
2323

24-
// -----------------------------------------------------------------------
24+
// --------------------------------------------------------------------------------------------------------------------
2525
// base64 stuff, based on http://www.adp-gmbh.ch/cpp/common/base64.html
2626

2727
/*
@@ -48,7 +48,7 @@
4848
René Nyffenegger [email protected]
4949
*/
5050

51-
// -----------------------------------------------------------------------
51+
// --------------------------------------------------------------------------------------------------------------------
5252
// Helpers
5353

5454
#ifndef DOXYGEN
@@ -77,82 +77,13 @@ uint8_t findBase64CharIndex(const char c)
7777
static constexpr inline
7878
bool isBase64Char(const char c)
7979
{
80-
switch (c)
81-
{
82-
case 'A':
83-
case 'B':
84-
case 'C':
85-
case 'D':
86-
case 'E':
87-
case 'F':
88-
case 'G':
89-
case 'H':
90-
case 'I':
91-
case 'J':
92-
case 'K':
93-
case 'L':
94-
case 'M':
95-
case 'N':
96-
case 'O':
97-
case 'P':
98-
case 'Q':
99-
case 'R':
100-
case 'S':
101-
case 'T':
102-
case 'U':
103-
case 'V':
104-
case 'W':
105-
case 'X':
106-
case 'Y':
107-
case 'Z':
108-
case 'a':
109-
case 'b':
110-
case 'c':
111-
case 'd':
112-
case 'e':
113-
case 'f':
114-
case 'g':
115-
case 'h':
116-
case 'i':
117-
case 'j':
118-
case 'k':
119-
case 'l':
120-
case 'm':
121-
case 'n':
122-
case 'o':
123-
case 'p':
124-
case 'q':
125-
case 'r':
126-
case 's':
127-
case 't':
128-
case 'u':
129-
case 'v':
130-
case 'w':
131-
case 'x':
132-
case 'y':
133-
case 'z':
134-
case '0':
135-
case '1':
136-
case '2':
137-
case '3':
138-
case '4':
139-
case '5':
140-
case '6':
141-
case '7':
142-
case '8':
143-
case '9':
144-
case '+':
145-
case '/':
146-
return true;
147-
default:
148-
return false;
149-
}
80+
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '+' || c == '/';
15081
}
15182

15283
} // namespace DistrhoBase64Helpers
15384
#endif
15485

155-
// -----------------------------------------------------------------------
86+
// --------------------------------------------------------------------------------------------------------------------
15687

15788
static inline
15889
std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string)
@@ -213,6 +144,6 @@ std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string)
213144
return ret;
214145
}
215146

216-
// -----------------------------------------------------------------------
147+
// --------------------------------------------------------------------------------------------------------------------
217148

218149
#endif // DISTRHO_BASE64_HPP_INCLUDED

0 commit comments

Comments
 (0)