Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/pyhubblenetwork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: PyHubbleNetwork CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout sdr-docker
uses: actions/checkout@v6

- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Build local image
run: mkdir -p decoder-src && docker build -t sdr-docker:pr-test .

- name: Checkout pyhubblenetwork
uses: actions/checkout@v6
with:
repository: HubbleNetwork/pyhubblenetwork
path: pyhubblenetwork

- name: Install pyhubblenetwork
run: |
cd pyhubblenetwork
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run sat integration tests
env:
SDR_DOCKER_IMAGE: sdr-docker:pr-test
run: pytest pyhubblenetwork/tests/test_sat_integration.py -v --tb=short
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,23 @@ COPY run_stream.py /app/
COPY src/ /app/src/
COPY entrypoint.sh /app/

# Optionally install hubble-satnet-decoder from a local source tree.
# In CI, set USE_LOCAL_DECODER=1 and copy the source into decoder-src/
# before building. Normal builds leave decoder-src/ empty and install from PyPI.
ARG USE_LOCAL_DECODER=0
COPY decoder-src/ /tmp/decoder-src/

# Install the python package
# GNU Radio from the Ubuntu PPA is compiled against NumPy 1.x;
# pip must not upgrade numpy beyond 1.x or gnuradio will fail to import.
# --ignore-installed is needed because some system distutils packages
# (blinker, etc.) can't be pip-uninstalled cleanly.
RUN python3 -m pip install --upgrade pip setuptools wheel
RUN python3 -m pip install --ignore-installed \
"hubble-satnet-decoder>=1.1.1" \
"numpy>=1.26,<2"
RUN if [ "$USE_LOCAL_DECODER" = "1" ]; then \
python3 -m pip install --ignore-installed /tmp/decoder-src "numpy>=1.26,<2"; \
else \
python3 -m pip install --ignore-installed "hubble-satnet-decoder>=1.1.1" "numpy>=1.26,<2"; \
fi
RUN python3 -m pip install --ignore-installed -e . "numpy>=1.26,<2"

# Start the live spectrogram + decoder web server
Expand Down
Loading