-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use meson for finding deps & building * remove unmaintained macro-based build options * liquid-dsp and sndfile are now actual dependencies * add .clang-format * add build check pipeline
- Loading branch information
Showing
17 changed files
with
572 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
BasedOnStyle: Google | ||
IndentWidth: 2 | ||
--- | ||
Language: Cpp | ||
Standard: c++14 | ||
ColumnLimit: 100 | ||
AllowShortIfStatementsOnASingleLine: false | ||
AlignArrayOfStructures: Left | ||
AlignConsecutiveAssignments: Consecutive | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AlignConsecutiveShortCaseStatements: | ||
Enabled: true | ||
AcrossEmptyLines: true | ||
AlignConsecutiveDeclarations: | ||
Enabled: true | ||
IncludeBlocks: Preserve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master, dev ] | ||
tags: [ 'v*' ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build-ubuntu-22-04: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies (apt) | ||
run: sudo apt install python3-pip ninja-build libsndfile1-dev libliquid-dev | ||
- name: Install meson (pip3) | ||
run: pip3 install --user meson | ||
- name: Compile via makefile | ||
run: make | ||
- name: meson setup | ||
run: meson setup -Dwerror=true build | ||
- name: meson compile | ||
run: cd build && meson compile | ||
|
||
build-ubuntu-20-04: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies (apt) | ||
run: sudo apt install python3-pip ninja-build libsndfile1-dev libliquid-dev | ||
- name: Install meson (pip3) | ||
run: pip3 install --user meson | ||
- name: Compile via makefile | ||
run: make | ||
- name: meson setup | ||
run: meson setup -Dwerror=true build | ||
- name: meson compile | ||
run: cd build && meson compile | ||
|
||
build-debian-oldoldstable: | ||
runs-on: ubuntu-latest | ||
container: debian:buster | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies (apt-get) | ||
run: apt-get update && apt-get -y install python3-pip ninja-build build-essential libsndfile1-dev libliquid-dev | ||
- name: Install meson (pip3) | ||
run: pip3 install --user meson | ||
- name: Compile via makefile | ||
run: make | ||
- name: meson setup | ||
run: export PATH=$PATH:$HOME/.local/bin && meson setup -Dwerror=true build | ||
- name: meson compile | ||
run: export PATH=$PATH:$HOME/.local/bin && cd build && meson compile | ||
|
||
build-macos: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies (brew) | ||
run: brew install meson libsndfile liquid-dsp | ||
- name: Compile via makefile | ||
run: make | ||
- name: meson setup | ||
run: meson setup -Dwerror=true build | ||
- name: meson compile | ||
run: cd build && meson compile | ||
|
||
test: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies (apt) | ||
run: sudo apt install meson libsndfile1-dev libliquid-dev perl sox | ||
- name: meson setup | ||
run: meson setup -Dwerror=true build | ||
- name: meson compile | ||
run: cd build && meson compile | ||
- name: test | ||
run: cd test && perl test.pl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
project( | ||
'deinvert', | ||
'cpp', | ||
default_options: ['warning_level=3', 'buildtype=release', 'optimization=3'], | ||
version: '1.0', | ||
) | ||
|
||
# Store version number to be compiled in | ||
conf = configuration_data() | ||
conf.set_quoted('VERSION', meson.project_version()) | ||
configure_file(output: 'config.h', configuration: conf) | ||
|
||
######################## | ||
### Compiler options ### | ||
######################## | ||
|
||
cc = meson.get_compiler('cpp') | ||
add_project_arguments(cc.get_supported_arguments(['-Wno-unknown-pragmas']), language: 'cpp') | ||
|
||
# We want to use M_PI on Windows | ||
if build_machine.system() == 'windows' | ||
add_project_arguments('-D_USE_MATH_DEFINES=1', language: 'cpp') | ||
endif | ||
|
||
# Explicit GNU extensions on Cygwin | ||
if build_machine.system() == 'cygwin' | ||
add_project_arguments('-std=gnu++14', language: 'cpp') | ||
else | ||
add_project_arguments('-std=c++14', language: 'cpp') | ||
endif | ||
|
||
#################### | ||
### Dependencies ### | ||
#################### | ||
|
||
# Find libsndfile | ||
sndfile = dependency('sndfile') | ||
|
||
# Find liquid-dsp | ||
if build_machine.system() == 'darwin' | ||
fs = import('fs') | ||
# Homebrew system | ||
if fs.is_dir('/opt/homebrew/lib') | ||
liquid_lib = cc.find_library('liquid', dirs: ['/opt/homebrew/lib']) | ||
liquid_inc = include_directories('/opt/homebrew/include') | ||
# MacPorts system | ||
else | ||
liquid_lib = cc.find_library('liquid', dirs: ['/opt/local/lib']) | ||
liquid_inc = include_directories('/opt/local/include') | ||
endif | ||
liquid = declare_dependency(dependencies: liquid_lib, include_directories: liquid_inc) | ||
else | ||
liquid = cc.find_library('liquid') | ||
endif | ||
|
||
############################ | ||
### Sources & Executable ### | ||
############################ | ||
|
||
sources = [ | ||
'src/deinvert.cc', | ||
'src/liquid_wrappers.cc', | ||
] | ||
|
||
executable('deinvert', sources, dependencies: [liquid, sndfile], install: true) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.