src: format #101
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
name: Build and Test | |
on: [push] | |
jobs: | |
Validate-Format: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
path: | |
- 'src' | |
- 'include' | |
- 'bench' | |
- 'test' | |
- 'rttest' | |
- 'examples' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check code format against formatting rules | |
uses: jidicula/clang-format-action@v4.11.0 | |
with: | |
clang-format-version: '15' | |
check-path: ${{ matrix.path }} | |
Validate-Source: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v1 | |
- name: Build Project | |
run: | | |
sudo apt install meson zsh | |
make -f Makefile.Maintainer builddir | |
cd builddir | |
meson compile | |
- name: Check source for avoidable mistakes | |
run: | | |
make -f Makefile.Maintainer exportedsymbols | |
python3 meta/validate-source.py . | |
Plain-Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v1 | |
- name: Install meson | |
run: | | |
sudo apt install meson | |
- name: Build | |
run: | | |
meson setup builddir | |
- name: Compile | |
working-directory: builddir | |
run: | | |
ninja | |
With-Unit-Tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v1 | |
- name: Install meson | |
run: | | |
sudo apt install meson | |
- name: Build | |
run: | | |
meson builddir -Dwith-tests=true --buildtype=debugoptimized | |
- name: Compile | |
working-directory: builddir | |
run: | | |
ninja | |
- name: Run tests | |
working-directory: builddir | |
run: | | |
ninja test | |
Test-Install: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v1 | |
- name: Install meson | |
run: | | |
sudo apt install meson | |
- name: Build | |
run: | | |
meson --prefix=$RUNNER_TEMP builddir | |
- name: Compile and install | |
working-directory: builddir | |
run: | | |
ninja | |
PREFIX=$RUNNER_TEMP ninja install | |
- name: Run post-install tests | |
run: | | |
PREFIX=$RUNNER_TEMP PKG_CONFIG_PATH=$RUNNER_TEMP/lib/x86_64-linux-gnu/pkgconfig LD_LIBRARY_PATH=$RUNNER_TEMP/lib/x86_64-linux-gnu make -C rttest check |