Skip to content

Commit

Permalink
Merge pull request #897 from lk-iqt/feature/mavlink-external-gps
Browse files Browse the repository at this point in the history
Feature/mavlink external gps
  • Loading branch information
lk-iqt authored Oct 4, 2023
2 parents 5e08963 + c581e0b commit 274eb8b
Show file tree
Hide file tree
Showing 29 changed files with 1,349 additions and 1,098 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ name: CI Test
on: [push, pull_request]

jobs:

ci-test:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
Expand All @@ -23,8 +22,25 @@ jobs:
version: 1.4.2
- name: Get dependencies
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential cmake gcc git g++ gnuradio-dev libev-dev libboost-all-dev libuhd-dev libunwind-dev make pkg-config software-properties-common sox swig uhd-host wget libopencv-dev
grep -h 'git clone' docker/*|sed -E 's/RUN\s+git clone\s+//g'|sort|uniq|xargs -L1 git clone
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
g++ \
gcc \
git \
gnuradio-dev \
libboost-all-dev \
libev-dev \
libopencv-dev \
libuhd-dev \
libunwind-dev \
make \
pkg-config \
software-properties-common \
sox \
uhd-host \
wget \
&& grep -h 'git clone' docker/*|sed -E 's/RUN\s+git clone\s+//g'|sort|uniq|xargs -L1 git clone
- name: Install dependencies
run: |
for repodir in flatbuffers json libsigmf gr-iqtlabs ; do \
Expand All @@ -33,7 +49,8 @@ jobs:
done && \
sudo ldconfig -v && \
poetry config virtualenvs.create false && \
poetry install --no-interaction
poetry install --no-interaction && \
sudo dpkg -r --force-depends python3-numpy
- name: test gamutrf-samples2raw
env:
PYTHONPATH: /usr/local/lib/python3.10/dist-packages:/usr/lib/python3/dist-packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docker-extras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
buildx-mqtt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the version
Expand All @@ -19,20 +19,20 @@ jobs:
id: change_version
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "main" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi
- name: Set up qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
- name: Build and push platforms
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: docker
file: docker/Dockerfile.mqtt
Expand All @@ -43,7 +43,7 @@ jobs:
buildx-airspyfm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the version
Expand All @@ -53,12 +53,12 @@ jobs:
id: change_version
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "main" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi
- name: Set up qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
Expand All @@ -67,7 +67,7 @@ jobs:
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'

- name: Build and push platforms
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: docker
file: docker/Dockerfile.airspyfm
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: docker-test
on: [push, pull_request]
jobs:
test:
test-gamutrf-extra-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: docker build
run: |
cd docker
docker build -f Dockerfile.base . -t iqtlabs/gamutrf-base:latest
docker build -f Dockerfile.airspyfm . -t iqtlabs/gamutrf-airspyfm:latest
docker build -f Dockerfile.mqtt . -t iqtlabs/gamutrf-mqtt:latest
test-gamutrf-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: docker build
run: |
cd docker
docker build -f Dockerfile.vkfft . -t iqtlabs/gamutrf-vkfft:latest
docker build -f Dockerfile.base . -t iqtlabs/gamutrf-base:latest
cd ..
docker build -f Dockerfile . -t iqtlabs/gamutrf:latest
docker run -t iqtlabs/gamutrf:latest gamutrf-scan --help
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
buildx-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the version
Expand All @@ -19,21 +19,29 @@ jobs:
id: change_version
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "main" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi
- name: Set up qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'

- name: Build and push platforms
uses: docker/build-push-action@v4
- name: Build and push platforms vkfft
uses: docker/build-push-action@v5
with:
context: docker
file: docker/Dockerfile.vkfft
platforms: linux/amd64,linux/arm64
push: true
tags: iqtlabs/gamutrf-vkfft:${{ steps.change_version.outputs.VERSION }}
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
- name: Build and push platforms base
uses: docker/build-push-action@v5
with:
context: docker
file: docker/Dockerfile.base
Expand All @@ -45,7 +53,7 @@ jobs:
needs: [buildx-base]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the version
Expand All @@ -55,12 +63,12 @@ jobs:
id: change_version
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "main" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi
- name: Set up qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
Expand All @@ -69,7 +77,7 @@ jobs:
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'

- name: Build and push platforms
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Poetry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/secrets-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: scan
run: |
export DEBIAN_FRONTEND=noninteractive && \
Expand All @@ -25,7 +25,7 @@ jobs:
echo {{steps.scan.outputs.found-count}} && \
core.setFailed('Secrets found. Please check the uploaded report')
- name: Upload scan reports
uses: actions/[email protected].2
uses: actions/[email protected].3
if: failure()
with:
name: whispers-report
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
docker_scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand All @@ -23,7 +23,7 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update && sudo apt-get install jq && python3 -m pip install semgrep
sudo apt-get update && sudo apt-get install jq && python3 -m pip install semgrep==1.37.0
- name: scan
id: d_scan
run: |
Expand Down Expand Up @@ -51,15 +51,15 @@ jobs:
core.setFailed('Semgrep found errors in Dockerfiles or docker-compose files. Please check the uploaded report');
- name: Upload scan reports
uses: actions/[email protected].2
uses: actions/[email protected].3
if: failure()
with:
name: semgrep-docker-report
path: /home/runner/reports/semgrep.out
python_scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand All @@ -71,7 +71,7 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update && sudo apt-get install jq && python3 -m pip install semgrep
sudo apt-get update && sudo apt-get install jq && python3 -m pip install semgrep==1.37.0
- name: run semgrep
run: |
mkdir -p /home/runner/reports/ && \
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
core.setFailed('Semgrep found errors in Python files. Please check the uploaded report');
- name: Upload scan reports
uses: actions/[email protected].2
uses: actions/[email protected].3
if: failure()
with:
name: semgrep-python-report
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y -q \

# nosemgrep:github.workflows.config.dockerfile-source-not-pinned
FROM ubuntu:22.04
COPY --from=iqtlabs/gnuradio:3.10.7 /usr/share/uhd/images /usr/share/uhd/images
COPY --from=installer /usr/local /usr/local
COPY --from=installer /gamutrf /gamutrf
COPY --from=installer /root/.local /root/.local
COPY --from=iqtlabs/gamutrf-base:latest /usr/share/uhd/images /usr/share/uhd/images
LABEL maintainer="Charlie Lewis <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
ENV UHD_IMAGES_DIR /usr/share/uhd/images
Expand All @@ -55,9 +55,11 @@ RUN apt-get update && apt-get install --no-install-recommends -y -q \
libopencv-core4.5d \
libopencv-imgcodecs4.5d \
libopencv-imgproc4.5d \
librtlsdr0 \
libspdlog1 \
libuhd4.1.0 \
libunwind8 \
libvulkan1 \
libzmq5 \
mesa-vulkan-drivers \
python3 \
Expand All @@ -67,6 +69,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y -q \
sox \
sudo \
wget \
uhd-host \
zstd && \
apt-get -y -q clean && rm -rf /var/lib/apt/lists/*
WORKDIR /gamutrf
Expand Down
Loading

0 comments on commit 274eb8b

Please sign in to comment.