Skip to content

Merge pull request #43 from analogdevicesinc/doc-spectral-analysis #525

Merge pull request #43 from analogdevicesinc/doc-spectral-analysis

Merge pull request #43 from analogdevicesinc/doc-spectral-analysis #525

Workflow file for this run

name: Linux and macOS Builds
on: [push, pull_request]
jobs:
TestC:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
images: ["debian:buster", "debian:bullseye", "ubuntu:20.04"]
include:
- images: "debian:buster"
label: "Debian_10"
- images: "debian:bullseye"
label: "Debian_11"
- images: "ubuntu:20.04"
label: "Ubuntu_20_04"
container:
image: ${{ matrix.images }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install dependencies
run: |
bash ./.github/scripts/install_dependencies.sh
- name: Build and test
run: |
mkdir -p build
cd build
cmake -DBUILD_TESTS_EXAMPLES=ON ..
make -j4
make test ARGS="-VV"
cd ..
mkdir -p libs
cp build/bindings/c/src/libgenalyzer.so* libs/
cp build/src/libgenalyzer_plus_plus.a* libs/
cp bindings/c/include/cgenalyzer.h libs/
cp bindings/c/include/cgenalyzer_simplified_beta.h libs/
cp bindings/matlab/genalyzer.m libs/
- name: Archive generated SOs
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.label }}-Build
path: libs/
# TestCCentOS:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# images: ["tfcollins/libiio_centos_7-ci:latest"]
# container:
# image: ${{ matrix.images }}
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# run: |
# bash ./.github/scripts/install_dependencies_rhel.sh
# - name: Build and test
# run: |
# mkdir -p build
# cd build
# source scl_source enable devtoolset-7 && cmake -DBUILD_TESTS_EXAMPLES=ON ..
# make -j4
# make test ARGS="-VV"
# cd ..
# mkdir -p libs
# cp build/bindings/c/src/libgenalyzer.so* libs/
# cp build/src/libgenalyzer_plus_plus.a* libs/
# cp bindings/c/include/cgenalyzer.h libs/
# cp bindings/c/include/cgenalyzer_simplified_beta.h libs/
# cp bindings/matlab/genalyzer.m libs/
# - name: Archive generated SOs
# uses: actions/upload-artifact@v4
# with:
# name: RHEL_7-Build
# path: libs/
CoverageTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v3
with:
python-version: 3.7
- name: Install dependencies
run: |
bash ./.github/scripts/install_dependencies.sh
sudo apt install lcov -y
- name: Build and run coverage test
run: |
mkdir -p build
cd build
cmake .. -DBUILD_TESTS_EXAMPLES=ON -DCOVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
make -j4
make coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
path-to-lcov: build/main_coverage.info
TestCMacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
brew install cmake gnu-tar bzip2 gzip fftw doxygen
pip3 install -r requirements_doc.txt
mkdir -p build
cd build
cmake -DBUILD_TESTS_EXAMPLES=ON ..
make -j4
make test ARGS="-VV"
sudo make install
TestPython:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
bash ./.github/scripts/install_dependencies.sh
bash ./.github/scripts/install_genalyzer.sh
pip install -r requirements_test.txt
- name: Test
run: |
cd bindings/python
pip install ".[tools]"
python -m pytest -vs tests
for f in examples/*.py; do python "$f"; done