Skip to content

Commit

Permalink
Add debian:buster workflow to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
windytan committed Jun 27, 2024
1 parent 989a33a commit 49dfb38
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build

on:
push:
branches: [ master ]
branches: [ master, dev ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]
Expand Down Expand Up @@ -39,6 +39,22 @@ jobs:
#- name: Install .deb
# run: dpkg -i ../redsea_*.deb

build-debian-oldoldstable:
runs-on: ubuntu-latest
container: debian:buster

steps:
- name: Install dependencies (apt)
run: apt install python3-pip ninja-build libsndfile1-dev libliquid-dev nlohmann-json3-dev
- name: Install meson (pip3)
run: pip3 install --user meson
- name: meson setup
run: meson setup -Dwerror=true build
- name: compile
run: cd build && meson compile
- name: test
run: cd build && meson test

macos-build:
runs-on: macos-latest

Expand Down
12 changes: 6 additions & 6 deletions src/redsea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,26 +128,26 @@ int processMPXInput(Options options) {

auto& output_stream = options.feed_thru ? std::cerr : std::cout;

std::vector<Channel> channels;
std::vector<std::unique_ptr<Channel>> channels;
std::vector<std::unique_ptr<Subcarrier>> subcarriers;
for (uint32_t i = 0; i < options.num_channels; i++) {
channels.emplace_back(options, i, output_stream);
channels.emplace_back(std::make_unique<Channel>(options, i, output_stream));
subcarriers.push_back(std::make_unique<Subcarrier>(options));
}

while (!mpx.eof()) {
mpx.fillBuffer();
for (uint32_t i = 0; i < options.num_channels; i++) {
channels[i].processBits(subcarriers[i]->processChunk(mpx.readChunk(i)));
if (channels[i].getSecondsSinceCarrierLost() > 10.f &&
channels[i]->processBits(subcarriers[i]->processChunk(mpx.readChunk(i)));
if (channels[i]->getSecondsSinceCarrierLost() > 10.f &&
subcarriers[i]->getSecondsSinceLastReset() > 5.f) {
subcarriers[i]->reset();
channels[i].resetPI();
channels[i]->resetPI();
}
}
}

for (uint32_t i = 0; i < options.num_channels; i++) channels[i].flush();
for (uint32_t i = 0; i < options.num_channels; i++) channels[i]->flush();

return EXIT_SUCCESS;
}
Expand Down

0 comments on commit 49dfb38

Please sign in to comment.