Skip to content

Commit b5ce926

Browse files
Meson build system support
1 parent 610f63a commit b5ce926

25 files changed

Lines changed: 308 additions & 692 deletions

.github/actions/build/action.yml

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

.github/actions/package/action.yml

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

.github/actions/test/action.yml

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

.github/dependabot.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,3 @@ updates:
88
target-branch: "develop"
99
schedule:
1010
interval: "weekly"
11-
- package-ecosystem: "gitsubmodule"
12-
directory: "/"
13-
target-branch: "develop"
14-
schedule:
15-
interval: "weekly"

.github/labeler.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
ci:
2-
- .github/**
2+
- any: ['.github/**']
33

4-
build_system:
5-
- 'CMake*'
6-
- '**/CMakeLists.txt'
7-
- '**/*.cmake'
4+
build-system:
5+
- meson_options.txt
6+
- '**/meson.build'
87

98
sigutils:
10-
- any: ['src/**', '!src/CMakeLists.txt']
9+
- any: ['src/**', '!**/meson.build']
1110

1211
documentation:
13-
- any: ['doc/**', '!doc/CMakeLists.txt']
12+
- any: ['doc/**', '!**/meson.build']
1413

1514
tests:
16-
- any: ['tests/**', '!tests/CMakeLists.txt']
15+
- any: ['tests/**', '!**/meson.build']

.github/workflows/build.yml

Lines changed: 28 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -3,104 +3,49 @@ name: Build
33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
build-linux:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- name: Install dependencies
10-
run: sudo apt-get update && sudo apt-get install libsndfile1-dev libvolk2-dev libfftw3-dev catch2
11-
12-
- name: Checkout
13-
uses: actions/checkout@v4
14-
with:
15-
submodules: true
16-
fetch-depth: 0
17-
18-
- name: Build
19-
uses: "./.github/actions/build"
20-
with:
21-
target: sigutils
22-
cmake_configuration_parameters: -DCMAKE_INSTALL_PREFIX=/usr
23-
24-
- name: Build tests
25-
uses: "./.github/actions/build"
26-
with:
27-
target: sigutils_test
28-
29-
- name: Test
30-
uses: "./.github/actions/test"
31-
32-
- name: Package
33-
uses: "./.github/actions/package"
34-
with:
35-
generators: TGZ;DEB
36-
37-
build-macos:
38-
runs-on: macos-latest
39-
steps:
40-
- name: Install dependencies
41-
run: brew install libsndfile volk fftw catch2
42-
43-
- name: Checkout
44-
uses: actions/checkout@v4
45-
with:
46-
submodules: true
47-
fetch-depth: 0
48-
49-
- name: Build
50-
uses: "./.github/actions/build"
51-
with:
52-
target: sigutils
6+
build:
7+
strategy:
8+
matrix:
9+
sys:
10+
- { os: windows-latest, shell: 'msys2 {0}' }
11+
- { os: ubuntu-latest, shell: bash }
12+
- { os: macos-latest, shell: bash }
5313

54-
- name: Build tests
55-
uses: "./.github/actions/build"
56-
with:
57-
target: sigutils_test
14+
runs-on: ${{ matrix.sys.os }}
5815

59-
- name: Test
60-
uses: "./.github/actions/test"
61-
62-
- name: Package
63-
uses: "./.github/actions/package"
64-
with:
65-
generators: TGZ
66-
67-
build-windows:
68-
runs-on: windows-latest
6916
defaults:
7017
run:
71-
shell: msys2 {0}
18+
shell: ${{ matrix.sys.shell }}
19+
7220
steps:
73-
- name: Install dependencies
21+
- name: Install dependencies (Ubuntu)
22+
if: matrix.sys.os == 'ubuntu-latest'
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install meson libsndfile1-dev libvolk2-dev libfftw3-dev catch2
26+
27+
- name: Install dependencies (Mac OS)
28+
if: matrix.sys.os == 'macos-latest'
29+
run: brew install meson libsndfile volk fftw catch2
30+
31+
- name: Install dependencies (Windows)
32+
if: matrix.sys.os == 'windows-latest'
7433
uses: msys2/setup-msys2@v2
7534
with:
7635
msystem: MINGW64
7736
update: true
78-
install: git mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-libsndfile mingw-w64-x86_64-fftw mingw-w64-x86_64-volk mingw-w64-x86_64-catch
37+
install: git mingw-w64-x86_64-meson mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc mingw-w64-x86_64-libsndfile mingw-w64-x86_64-fftw mingw-w64-x86_64-volk mingw-w64-x86_64-catch
7938

8039
- name: Checkout
8140
uses: actions/checkout@v4
8241
with:
83-
submodules: true
8442
fetch-depth: 0
8543

86-
- name: Build
87-
uses: "./.github/actions/build"
88-
with:
89-
shell: msys2 {0}
90-
target: sigutils
44+
- name: Configure
45+
run: meson setup builddir
9146

92-
- name: Build tests
93-
uses: "./.github/actions/build"
94-
with:
95-
shell: msys2 {0}
96-
target: sigutils_test
47+
- name: Build
48+
run: meson compile -C builddir
9749

9850
- name: Test
99-
uses: "./.github/actions/test"
100-
with:
101-
shell: msys2 {0}
102-
103-
- name: Package
104-
uses: "./.github/actions/package"
105-
with:
106-
generators: ZIP
51+
run: meson test -C builddir

.github/workflows/codeql.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
3030
with:
31-
submodules: true
3231
fetch-depth: 0
3332

3433
- name: Initialize CodeQL
@@ -37,8 +36,10 @@ jobs:
3736
languages: ${{ matrix.language }}
3837

3938
- name: Install dependencies
40-
run: sudo apt-get update && sudo apt-get install libsndfile1-dev libvolk2-dev libfftw3-dev
41-
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install meson libsndfile1-dev libvolk2-dev libfftw3-dev
42+
4243
- name: Autobuild
4344
uses: github/codeql-action/autobuild@v2
4445

.github/workflows/doc.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install dependencies
1515
run: |
1616
sudo apt-get update
17-
sudo apt-get install libsndfile1-dev libvolk2-dev libfftw3-dev doxygen python3-pip
17+
sudo apt-get install meson libsndfile1-dev libvolk2-dev libfftw3-dev doxygen graphviz python3-pip
1818
sudo pip3 install coverxygen
1919
2020
- name: Determine checkout ref
@@ -30,18 +30,18 @@ jobs:
3030
with:
3131
ref: "${{ steps.fetch_ref.outputs.value }}"
3232
fetch-depth: 0
33-
submodules: true
33+
34+
- name: Configure
35+
run: meson setup builddir
3436

3537
- name: Build documentation
36-
uses: "./.github/actions/build"
37-
with:
38-
target: doxygen
38+
run: meson compile -C builddir docs
3939

4040
- name: Upload documentation artifact
4141
uses: actions/upload-artifact@v3
4242
with:
4343
name: documentation
44-
path: build/doc/html/
44+
path: builddir/doc/html/
4545

4646
- name: Setup Pages
4747
if: contains(github.ref, 'develop') && (github.event_name != 'pull_request_target')
@@ -53,24 +53,22 @@ jobs:
5353
if: contains(github.ref, 'develop') && (github.event_name != 'pull_request_target')
5454
uses: actions/upload-pages-artifact@v2
5555
with:
56-
path: build/doc/html/
56+
path: builddir/doc/html/
5757

5858
- name: Deploy to GitHub Pages
5959
if: contains(github.ref, 'develop') && (github.event_name != 'pull_request_target')
6060
uses: actions/deploy-pages@v3
6161

6262
- name: Documentation coverage
6363
if: github.event_name == 'pull_request_target'
64-
uses: "./.github/actions/build"
65-
with:
66-
target: coverxygen_summary
64+
run: meson compile -C builddir docs_coverage
6765

6866
- name: Documentation coverage report generation
6967
if: github.event_name == 'pull_request_target'
7068
run: |
7169
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
7270
echo "report<<$EOF" >> "$GITHUB_ENV"
73-
cat build/doc/doc-coverage.markdown-summary.info >> "$GITHUB_ENV"
71+
cat builddir/doc/coverxygen.md >> "$GITHUB_ENV"
7472
echo "$EOF" >> "$GITHUB_ENV"
7573
7674
- name: Documentation coverage report

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[submodule "cmake/cmake-gitversiondetect"]
22
path = cmake/cmake-gitversiondetect
33
url = https://github.com/antoniovazquezblanco/cmake-gitversiondetect.git
4-
[submodule "cmake/cmake-pcfilegenerator"]
5-
path = cmake/cmake-pcfilegenerator
6-
url = https://github.com/antoniovazquezblanco/cmake-pcfilegenerator.git
74
[submodule "cmake/cmake-relativefilemacro"]
85
path = cmake/cmake-relativefilemacro
96
url = https://github.com/antoniovazquezblanco/cmake-relativefilemacro.git

0 commit comments

Comments
 (0)