Skip to content

Commit 740e321

Browse files
meson: Initial build system support
1 parent 6b37442 commit 740e321

File tree

14 files changed

+346
-241
lines changed

14 files changed

+346
-241
lines changed

.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: "master"
99
schedule:
1010
interval: "weekly"
11-
- package-ecosystem: "gitsubmodule"
12-
directory: "/"
13-
target-branch: "master"
14-
schedule:
15-
interval: "weekly"

.github/labeler.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ build_system:
77
- all:
88
- changed-files:
99
- any-glob-to-any-file:
10+
- meson_options.txt
11+
- '**/meson.build'
1012
- 'CMake*'
1113
- '**/CMakeLists.txt'
1214
- '**/*.cmake'
@@ -15,16 +17,18 @@ sigutils:
1517
- all:
1618
- changed-files:
1719
- any-glob-to-any-file: 'src/**'
18-
- all-globs-to-all-files: '!src/CMakeLists.txt'
20+
- all-globs-to-all-files: '!**/meson.build'
1921

2022
documentation:
2123
- all:
2224
- changed-files:
2325
- any-glob-to-any-file: 'doc/**'
24-
- all-globs-to-all-files: '!doc/CMakeLists.txt'
26+
- all-globs-to-all-files: '!**/meson.build'
27+
- all-globs-to-all-files: '!**/CMakeLists.txt'
2528

2629
tests:
2730
- all:
2831
- changed-files:
2932
- any-glob-to-any-file: 'tests/**'
30-
- all-globs-to-all-files: '!tests/CMakeLists.txt'
33+
- all-globs-to-all-files: '!**/meson.build'
34+
- all-globs-to-all-files: '!**/CMakeLists.txt'

.github/workflows/build.yml

Lines changed: 63 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -3,138 +3,83 @@ 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
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 }
1713

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"
14+
runs-on: ${{ matrix.sys.os }}
3115

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
53-
54-
- name: Build tests
55-
uses: "./.github/actions/build"
56-
with:
57-
target: sigutils_test
58-
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 -vd 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:
76-
msystem: MINGW64
35+
msystem: UCRT64
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-ucrt-x86_64-meson mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-libsndfile mingw-w64-ucrt-x86_64-fftw mingw-w64-ucrt-x86_64-volk mingw-w64-ucrt-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
107-
108-
release:
109-
runs-on: "ubuntu-latest"
110-
needs:
111-
- build-linux
112-
- build-macos
113-
- build-windows
114-
115-
steps:
116-
- name: Get current date
117-
id: date
118-
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
119-
120-
- name: Download binaries
121-
uses: actions/download-artifact@v4
122-
123-
- name: Release nightly
124-
if: github.ref == 'refs/heads/master'
125-
uses: marvinpinto/action-automatic-releases@v1.2.1
126-
with:
127-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
128-
automatic_release_tag: "latest"
129-
prerelease: true
130-
title: "Sigutils nightly (${{steps.date.outputs.date}})"
131-
files: sigutils*/*
132-
133-
- name: Release stable
134-
if: contains(github.ref, 'refs/tags/v')
135-
uses: marvinpinto/action-automatic-releases@v1.2.1
136-
with:
137-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
138-
prerelease: false
139-
title: "Sigutils ${{github.ref_name}}"
140-
files: sigutils*/*
51+
run: meson test -C builddir
52+
53+
# TODO: Package
54+
# TODO: Upload artifacts
55+
56+
# release:
57+
# runs-on: "ubuntu-latest"
58+
# needs: build
59+
60+
# steps:
61+
# - name: Get current date
62+
# id: date
63+
# run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
64+
65+
# - name: Download binaries
66+
# uses: actions/download-artifact@v4
67+
68+
# - name: Release nightly
69+
# if: github.ref == 'refs/heads/master'
70+
# uses: marvinpinto/action-automatic-releases@v1.2.1
71+
# with:
72+
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
73+
# automatic_release_tag: "latest"
74+
# prerelease: true
75+
# title: "Sigutils nightly (${{steps.date.outputs.date}})"
76+
# files: sigutils*/*
77+
78+
# - name: Release stable
79+
# if: contains(github.ref, 'refs/tags/v')
80+
# uses: marvinpinto/action-automatic-releases@v1.2.1
81+
# with:
82+
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
83+
# prerelease: false
84+
# title: "Sigutils ${{github.ref_name}}"
85+
# files: sigutils*/*

.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@v3
4445

0 commit comments

Comments
 (0)