Regex fix #366
Workflow file for this run
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: 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@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
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_advanced.h libs/ | |
cp bindings/python/genalyzer.py libs/ | |
cp bindings/python/genalyzer_advanced.py libs/ | |
cp bindings/matlab/genalyzer.m libs/ | |
- name: Archive generated SOs | |
uses: actions/upload-artifact@v2 | |
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@v2 | |
- 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_advanced.h libs/ | |
cp bindings/python/genalyzer.py libs/ | |
cp bindings/python/genalyzer_advanced.py libs/ | |
cp bindings/matlab/genalyzer.m libs/ | |
- name: Archive generated SOs | |
uses: actions/upload-artifact@v2 | |
with: | |
name: RHEL_7-Build | |
path: libs/ | |
CoverageTest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
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 .. -DPYTHON_BINDINGS=ON -DBUILD_TESTS_EXAMPLES=ON -DCOVERAGE=ON -DCMAKE_BUILD_TYPE=Debug | |
make -j4 | |
make coverage | |
- name: Coveralls | |
uses: coverallsapp/github-action@v1 | |
with: | |
path-to-lcov: build/main_coverage.info | |
TestCMacOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- 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@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
bash ./.github/scripts/install_dependencies.sh | |
bash ./.github/scripts/install_genalyzer.sh | |
- name: Test | |
run: | | |
cd build/bindings/python | |
sudo pip3 install . | |
cd ../../.. | |
cd bindings/python | |
pytest -vs tests |