@@ -3,138 +3,82 @@ name: Build
33on : [push, pull_request, workflow_dispatch]
44
55jobs :
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
77- 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
35+ msystem : UCRT64
36+ 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
7937
8038 - name : Checkout
8139 uses : actions/checkout@v4
8240 with :
83- submodules : true
8441 fetch-depth : 0
8542
86- - name : Build
87- uses : " ./.github/actions/build"
88- with :
89- shell : msys2 {0}
90- target : sigutils
43+ - name : Configure
44+ run : meson setup builddir
9145
92- - name : Build tests
93- uses : " ./.github/actions/build"
94- with :
95- shell : msys2 {0}
96- target : sigutils_test
46+ - name : Build
47+ run : meson compile -C builddir
9748
9849 - 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*/*
50+ run : meson test -C builddir
51+
52+ # TODO: Package
53+ # TODO: Upload artifacts
54+
55+ # release:
56+ # runs-on: "ubuntu-latest"
57+ # needs: build
58+
59+ # steps:
60+ # - name: Get current date
61+ # id: date
62+ # run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
63+
64+ # - name: Download binaries
65+ # uses: actions/download-artifact@v4
66+
67+ # - name: Release nightly
68+ # if: github.ref == 'refs/heads/master'
69+ # uses: marvinpinto/action-automatic-releases@v1.2.1
70+ # with:
71+ # repo_token: "${{ secrets.GITHUB_TOKEN }}"
72+ # automatic_release_tag: "latest"
73+ # prerelease: true
74+ # title: "Sigutils nightly (${{steps.date.outputs.date}})"
75+ # files: sigutils*/*
76+
77+ # - name: Release stable
78+ # if: contains(github.ref, 'refs/tags/v')
79+ # uses: marvinpinto/action-automatic-releases@v1.2.1
80+ # with:
81+ # repo_token: "${{ secrets.GITHUB_TOKEN }}"
82+ # prerelease: false
83+ # title: "Sigutils ${{github.ref_name}}"
84+ # files: sigutils*/*
0 commit comments