Skip to content

Commit

Permalink
More extensive CI tests
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Oct 6, 2024
1 parent 1662e56 commit 77bbde3
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 117 deletions.
62 changes: 50 additions & 12 deletions .github/workflows/makefile.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: makefile
name: build

on:
push:
Expand All @@ -7,17 +7,27 @@ on:
pull_request:
branches:
- '*'
env:
DEBIAN_FRONTEND: noninteractive

jobs:
linux-x86_64:
runs-on: ubuntu-22.04
build:
strategy:
matrix:
os:
- macos-12
- macos-13
- macos-14
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up dependencies
if: ${{ runner.os == 'Linux' }}
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update -qq
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
Expand All @@ -27,7 +37,7 @@ jobs:
CXXFLAGS: -Werror
run: |
make clean >/dev/null
make -j $(nproc)
make
- name: Run tests
env:
CFLAGS: -Werror
Expand All @@ -40,39 +50,67 @@ jobs:
CXXFLAGS: -Werror -std=gnu++98
run: |
make clean >/dev/null
make -j $(nproc)
make
- name: As C++11 mode
env:
CFLAGS: -Werror
CXXFLAGS: -Werror -std=gnu++11
run: |
make clean >/dev/null
make
- name: As C++14 mode
env:
CFLAGS: -Werror
CXXFLAGS: -Werror -std=gnu++14
run: |
make clean >/dev/null
make
- name: As C++17 mode
env:
CFLAGS: -Werror
CXXFLAGS: -Werror -std=gnu++17
run: |
make clean >/dev/null
make
- name: As C++20 mode
env:
CFLAGS: -Werror
CXXFLAGS: -Werror -std=gnu++20
run: |
make clean >/dev/null
make
- name: No namespace
env:
CFLAGS: -Werror
CXXFLAGS: -Werror -DDONT_SET_USING_DISTRHO_NAMESPACE -DDONT_SET_USING_DGL_NAMESPACE
run: |
make clean >/dev/null
make -j $(nproc)
make
- name: Custom namespace
env:
CFLAGS: -Werror
CXXFLAGS: -Werror -DDISTRHO_NAMESPACE=WubbWubb -DDGL_NAMESPACE=DabDab
run: |
make clean >/dev/null
make -j $(nproc)
make
- name: With OpenGL 3.x
env:
CFLAGS: -Werror
CXXFLAGS: -Werror
run: |
make clean >/dev/null
make -j $(nproc) USE_OPENGL3=true
make USE_OPENGL3=true
- name: Without Cairo
env:
CFLAGS: -Werror
CXXFLAGS: -Werror
run: |
make clean >/dev/null
make -j $(nproc) HAVE_CAIRO=
make HAVE_CAIRO=false
- name: Without OpenGL
env:
CFLAGS: -Werror
CXXFLAGS: -Werror
run: |
make clean >/dev/null
make -j $(nproc) HAVE_OPENGL=
make HAVE_OPENGL=false
79 changes: 5 additions & 74 deletions distrho/extra/Base64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <vector>

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

/*
Expand All @@ -48,7 +48,7 @@
René Nyffenegger [email protected]
*/

// -----------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------
// Helpers

#ifndef DOXYGEN
Expand Down Expand Up @@ -77,82 +77,13 @@ uint8_t findBase64CharIndex(const char c)
static constexpr inline
bool isBase64Char(const char c)
{
switch (c)
{
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '+':
case '/':
return true;
default:
return false;
}
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '+' || c == '/';
}

} // namespace DistrhoBase64Helpers
#endif

// -----------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

static inline
std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string)
Expand Down Expand Up @@ -213,6 +144,6 @@ std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string)
return ret;
}

// -----------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

#endif // DISTRHO_BASE64_HPP_INCLUDED
Loading

0 comments on commit 77bbde3

Please sign in to comment.