Skip to content

Commit

Permalink
Merge branch 'master' into bind-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaeddert committed Jul 11, 2024
2 parents 420d161 + 0ddff9c commit c752899
Show file tree
Hide file tree
Showing 136 changed files with 3,578 additions and 1,393 deletions.
29 changes: 29 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# For more configuration details:
# https://docs.codecov.io/docs/codecov-yaml

# Check if this file is valid by running in bash:
# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate

# coverage configuration
coverage:
range: 70..90
round: down
precision: 3

ignore:
- autotest/*
- examples/*
- sandbox/*
- scripts/*
- src/*/bench/*
- src/*/tests/*

# parse coverage reports
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

8 changes: 7 additions & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ jobs:
runs-on: ${{ matrix.runs-on }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: setup
if: runner.os == 'macos'
run: |
brew update
brew install autoconf automake
#- name: Setup libfec
# run: git clone https://github.com/jgaeddert/libfec.git && cd libfec && ./configure && make && sudo make install
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- master
- coverage-dev

jobs:
standard:
Expand Down Expand Up @@ -45,5 +46,9 @@ jobs:
- name: make coverage
run: make -j 2 coverage

- name: upload report
run: bash <(curl -s https://codecov.io/bash)
- name: upload report to codecov with github action
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
46 changes: 30 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ install:
- ldconfig
- make check-link

# compile and run benchmark program
bench:
stage: test
script:
- make -j4 bench
artifacts:
paths: [benchmark.json]

# run all test programs
check:
stage: test
Expand All @@ -37,13 +45,17 @@ check:
artifacts:
paths: [autotest.json]

# compile and run benchmark program
bench:
# build from scratch
coverage:
stage: test
script:
- make -j4 bench
- make distclean
- ./bootstrap.sh
- ./configure --enable-coverage
- make -j4 coverage
coverage: '/lines: \d+\.\d+%/'
artifacts:
paths: [benchmark.json]
paths: [coverage.out]

# compile and run documenation checks (e.g. example code in README.md)
check-doc:
Expand All @@ -62,18 +74,15 @@ examples:
artifacts:
paths: [run_examples.sh, time.txt]

# compile and run all example programs with valgrind
# TODO: ensure no errors
#examples-memcheck:
# stage: test
# script:
# - make -j4 examples
# # setting --track-origins=yes gives more detail but takes longer than gitlab allows
# - ls examples/*_example | sed -E "s#examples/(.*)#valgrind --tool=memcheck --log-file=examples/\1.log ./examples/\1#g" > run_examples_valgrind.sh
# - /bin/sh run_examples_valgrind.sh
# - tail -n +1 examples/*.log > valgrind.log
# artifacts:
# paths: [run_examples_valgrind.sh, valgrind.log]
# compile and run all autotest programs with valgrind
autotest-memcheck:
stage: test
script:
- make -j4 xautotest
- mkdir valgrind
- ./scripts/valgrind_eval.py -output valgrind -test 881
artifacts:
paths: [valgrind/*]

# build from scratch
coverage:
Expand All @@ -83,7 +92,12 @@ coverage:
- ./bootstrap.sh
- ./configure --enable-coverage
- make -j4 coverage
#- curl -Os http://cli.codecov.io/latest/linux/codecov
#- chmod +x codecov
#- ./codecov --version
#- ./codecov upload-process -t $CODECOV_TOKEN --git-service gitlab --slug jgaeddert/liquid-dsp
- bash <(curl -s https://codecov.io/bash)

coverage: '/lines: \d+\.\d+%/'
artifacts:
paths: [coverage.out]
Expand Down
24 changes: 15 additions & 9 deletions HISTORY → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog

## Latest improvements ##
## Unreleased

## Improvements for v1.6.0 ##
## 1.6.0 - 2023-06-19

Version 1.6.0 includes a new qdsync object to greatly simplify the frame
synchronization process in liquid, allowing for both detection and channel
Expand Down Expand Up @@ -38,7 +39,7 @@ methods for consistency.
order for generator polynomial and internal state definition to be
more consistent with literature and readily-available genpolys

## Improvements for v1.5.0 ##
## 1.5.0 - 2022-11-20

This release includes substantially improved testing coverage, deep copy()
methods for nearly all objects, improved speed, and resolves a number of
Expand Down Expand Up @@ -101,7 +102,7 @@ issues and pull requests.
similar to bisection search, but to find potentially non-continuous
minimum/maximum of function

## Improvements for v1.4.0 ##
## 1.4.0 - 2022-02-03

* autotest
- automated code coverage testing (72%)
Expand Down Expand Up @@ -157,7 +158,7 @@ issues and pull requests.
- modem: adding type extension for more consistency: `modem` -> `modemcf`,
supporting backwards compatibility with API shim

## Improvements for v1.3.2 ##
## 1.3.1 - 2019-07-28

* autotest
- runs with random seeds (based on time) for diveristy
Expand Down Expand Up @@ -194,7 +195,7 @@ issues and pull requests.
* nco
- improving consistency across platforms

## Improvements for v1.3.1 ##
## 1.3.1 - 2017-10-23

* improved selection of SSE/MMX extension flags for gcc
* agc
Expand All @@ -210,7 +211,7 @@ issues and pull requests.
- fixed issue with order of operations causing inconsistent behavior across
different platforms

## Major improvements for v1.3.0 ##
## 1.3.0 - 2016-12-30

* New MIT/X11 license (https://opensource.org/licenses/MIT)
* agc (automatic gain control)
Expand Down Expand Up @@ -300,7 +301,7 @@ issues and pull requests.
- global header file (`liquid.h`) include more structured source
- consistent naming of reset() methods for most objects

## Major improvements for v1.2.0 ##
## 1.2.0 - 2012-04-26

* dotprod
- leveraging SIMD extensions for vector operations (SSE2, SSE3)
Expand All @@ -315,7 +316,7 @@ issues and pull requests.
LIQUID_MODEM_QAM16
- new type definitions for analog modems

## Major improvements for v1.1.0 ##
## 1.1.0 - 2011-12-23

* build
- simplifying build environment by explicitly defining object
Expand Down Expand Up @@ -371,3 +372,8 @@ issues and pull requests.
equalization
* optim
- simplified interface to gradient search

## [1.0.0] - 2011-04-29

_First release._

28 changes: 27 additions & 1 deletion autotest/autotest.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007 - 2022 Joseph Gaeddert
* Copyright (c) 2007 - 2024 Joseph Gaeddert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -362,3 +362,29 @@ int liquid_autotest_validate_psd_iirfilt_rrrf(iirfilt_rrrf _q, unsigned int _nff
return liquid_autotest_validate_spectrum(psd,_nfft,_regions,num_regions,debug_filename);
}

// validate spectral content of a spectral periodogram object
int liquid_autotest_validate_psd_spgramcf(spgramcf _q,
autotest_psd_s * _regions, unsigned int num_regions, const char * debug_filename)
{
unsigned int nfft = spgramcf_get_nfft(_q);
float psd[nfft];
spgramcf_get_psd(_q, psd);
return liquid_autotest_validate_spectrum(psd,nfft,_regions,num_regions,debug_filename);
}

// callback function to simplify testing for framing objects
int framing_autotest_callback(
unsigned char * _header,
int _header_valid,
unsigned char * _payload,
unsigned int _payload_len,
int _payload_valid,
framesyncstats_s _stats,
void * _context)
{
printf("*** callback invoked (%s) ***\n", _payload_valid ? "pass" : "FAIL");
unsigned int * secret = (unsigned int*) _context;
*secret = FRAMING_AUTOTEST_SECRET;
return 0;
}

17 changes: 16 additions & 1 deletion autotest/autotest.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007 - 2022 Joseph Gaeddert
* Copyright (c) 2007 - 2024 Joseph Gaeddert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -316,5 +316,20 @@ int liquid_autotest_validate_psd_firfilt_cccf(firfilt_cccf _q, unsigned int _nff
int liquid_autotest_validate_psd_iirfilt_rrrf(iirfilt_rrrf _q, unsigned int _nfft,
autotest_psd_s * _regions, unsigned int num_regions, const char * debug_filename);

// validate spectral content of a spectral periodogram object
int liquid_autotest_validate_psd_spgramcf(spgramcf _q,
autotest_psd_s * _regions, unsigned int num_regions, const char * debug_filename);

// callback function to simplify testing for framing objects
#define FRAMING_AUTOTEST_SECRET 0x01234567
int framing_autotest_callback(
unsigned char * _header,
int _header_valid,
unsigned char * _payload,
unsigned int _payload_len,
int _payload_valid,
framesyncstats_s _stats,
void * _context);

#endif // __LIQUID_AUTOTEST_H__

6 changes: 5 additions & 1 deletion autotest/xautotest.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007 - 2022 Joseph Gaeddert
* Copyright (c) 2007 - 2023 Joseph Gaeddert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -33,6 +33,7 @@
#include <getopt.h>
#include <time.h>
#include <sys/resource.h>
#include "liquid.internal.h"
#include "autotest/autotest.h"

void usage()
Expand Down Expand Up @@ -301,6 +302,9 @@ int main(int argc, char *argv[])
return -1;
}

// ugh
liquid_fftwf_cleanup_wrapper();

if (liquid_autotest_verbose)
print_unstable_tests();

Expand Down
1 change: 1 addition & 0 deletions examples/bpacketsync_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ int main(int argc, char*argv[]) {

// create packet synchronizer
bpacketsync ps = bpacketsync_create(0, callback, (void*)msg_dec);
bpacketsync_print(ps);

// initialize original data message
for (i=0; i<n; i++)
Expand Down
4 changes: 0 additions & 4 deletions examples/cbufferf_example.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//
// cbufferf_example.c
//
// This example demonstrates the circular buffer object on
// floating-point data.
//
Expand Down Expand Up @@ -35,7 +32,6 @@ int main() {
cbufferf_write(cb, v, 8);

// print
cbufferf_debug_print(cb);
cbufferf_print(cb);

// destroy object
Expand Down
1 change: 1 addition & 0 deletions examples/cpfskmodem_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ int main(int argc, char*argv[])

// print modulator
cpfskmod_print(mod);
cpfskdem_print(dem);

// get full symbol delay
unsigned int delay = cpfskmod_get_delay(mod) + cpfskdem_get_delay(dem);
Expand Down
Loading

0 comments on commit c752899

Please sign in to comment.