Skip to content

Commit

Permalink
Experimenting with docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
dbdexter-dev committed May 1, 2022
1 parent 72be687 commit c3b665e
Show file tree
Hide file tree
Showing 18 changed files with 462 additions and 15 deletions.
223 changes: 209 additions & 14 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,242 @@ env:
BUILD_TYPE: Release

jobs:
build_linux:
build_debian_buster:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
repository: AlexandreRouma/SDRPlusPlus
submodules: recursive

- name: Create Docker image
run: cd ${{github.workspace}}/docker/debian_buster && docker build . --tag sdrpp_build

- name: Run container
run: docker run --name build -v ${{github.workspace}}:/github/workspace --env BUILD_NO="-$GITHUB_RUN_NUMBER" -e PLUGIN_LOCATION="$GITHUB_WORKSPACE" sdrpp_build /root/do_build.sh

- name: Recover compiled binary
run: docker cp build:/root/SDRPlusPlus/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so ./

- name: Attach artifacts to tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{github.ref}}
file: ${{runner.workspace}}/radiosonde_decoder.so
asset_name: radiosonde_decoder_debian_buster.so
overwrite: false
prerelease: false



build_debian_bullseye:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
path: decoder_modules/sdrpp_radiosonde
submodules: recursive

- name: Install dependencies
run: sudo apt-get install libfftw3-dev libglfw3-dev libglew-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev libcodec2-dev libssl-dev libzstd-dev
- name: Create Docker image
run: cd ${{github.workspace}}/docker/debian_bullseye && docker build . --tag sdrpp_build

- name: Patch CMakeLists.txt
run: cp ${{github.workspace}}/decoder_modules/sdrpp_radiosonde/.github/workflows/CMakeLists.txt ${{github.workspace}}
- name: Run container
run: docker run --name build -v ${{github.workspace}}:/github/workspace --env BUILD_NO="-$GITHUB_RUN_NUMBER" -e PLUGIN_LOCATION="$GITHUB_WORKSPACE" sdrpp_build /root/do_build.sh

- name: Recover compiled binary
run: docker cp build:/root/SDRPlusPlus/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so ./

- name: Attach artifacts to tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{github.ref}}
file: ${{runner.workspace}}/radiosonde_decoder.so
asset_name: radiosonde_decoder_debian_bullseye.so
overwrite: false
prerelease: false



build_debian_sid:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Create Docker image
run: cd ${{github.workspace}}/docker/debian_sid && docker build . --tag sdrpp_build

- name: Run container
run: docker run --name build -v ${{github.workspace}}:/github/workspace --env BUILD_NO="-$GITHUB_RUN_NUMBER" -e PLUGIN_LOCATION="$GITHUB_WORKSPACE" sdrpp_build /root/do_build.sh

- name: Recover compiled binary
run: docker cp build:/root/SDRPlusPlus/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so ./

- name: Attach artifacts to tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{github.ref}}
file: ${{runner.workspace}}/radiosonde_decoder.so
asset_name: radiosonde_decoder_debian_sid.so
overwrite: false
prerelease: false



build_ubuntu_bionic:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Create Docker image
run: cd ${{github.workspace}}/docker/ubuntu_bionic && docker build . --tag sdrpp_build

- name: Run container
run: docker run --name build -v ${{github.workspace}}:/github/workspace --env BUILD_NO="-$GITHUB_RUN_NUMBER" -e PLUGIN_LOCATION="$GITHUB_WORKSPACE" sdrpp_build /root/do_build.sh

- name: Recover compiled binary
run: docker cp build:/root/SDRPlusPlus/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so ./

- name: Attach artifacts to tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{github.ref}}
file: ${{runner.workspace}}/radiosonde_decoder.so
asset_name: radiosonde_decoder_ubuntu_bionic.so
overwrite: false
prerelease: false

- name: Configure
run: cmake -B ${{github.workspace}}/build

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target radiosonde_decoder

build_ubuntu_focal:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Create Docker image
run: cd ${{github.workspace}}/docker/ubuntu_focal && docker build . --tag sdrpp_build

- name: Run container
run: docker run --name build -v ${{github.workspace}}:/github/workspace --env BUILD_NO="-$GITHUB_RUN_NUMBER" -e PLUGIN_LOCATION="$GITHUB_WORKSPACE" sdrpp_build /root/do_build.sh

- name: Recover compiled binary
run: docker cp build:/root/SDRPlusPlus/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so ./

- name: Attach artifacts to tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{github.ref}}
file: ${{runner.workspace}}/radiosonde_decoder.so
asset_name: radiosonde_decoder_ubuntu_focal.so
overwrite: false
prerelease: false


build_ubuntu_hirsute:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Create Docker image
run: cd ${{github.workspace}}/docker/ubuntu_hirsute && docker build . --tag sdrpp_build

- name: Run container
run: docker run --name build -v ${{github.workspace}}:/github/workspace --env BUILD_NO="-$GITHUB_RUN_NUMBER" -e PLUGIN_LOCATION="$GITHUB_WORKSPACE" sdrpp_build /root/do_build.sh

- name: Recover compiled binary
run: docker cp build:/root/SDRPlusPlus/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so ./

- name: Attach artifacts to tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{github.ref}}
file: ${{runner.workspace}}/radiosonde_decoder.so
asset_name: radiosonde_decoder_ubuntu_hirsute.so
overwrite: false
prerelease: false



build_ubuntu_impish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Create Docker image
run: cd ${{github.workspace}}/docker/ubuntu_impish && docker build . --tag sdrpp_build

- name: Run container
run: docker run --name build -v ${{github.workspace}}:/github/workspace --env BUILD_NO="-$GITHUB_RUN_NUMBER" -e PLUGIN_LOCATION="$GITHUB_WORKSPACE" sdrpp_build /root/do_build.sh

- name: Recover compiled binary
run: docker cp build:/root/SDRPlusPlus/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so ./

- name: Attach artifacts to tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{github.ref}}
file: ${{runner.workspace}}/radiosonde_decoder.so
asset_name: radiosonde_decoder_ubuntu_impish.so
overwrite: false
prerelease: false



build_ubuntu_jammy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Create Docker image
run: cd ${{github.workspace}}/docker/ubuntu_jammy && docker build . --tag sdrpp_build

- name: Run container
run: docker run --name build -v ${{github.workspace}}:/github/workspace --env BUILD_NO="-$GITHUB_RUN_NUMBER" -e PLUGIN_LOCATION="$GITHUB_WORKSPACE" sdrpp_build /root/do_build.sh

- name: Recover compiled binary
run: docker cp build:/root/SDRPlusPlus/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so ./

- name: Attach artifacts to tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{github.ref}}
file: ${{github.workspace}}/build/decoder_modules/sdrpp_radiosonde/radiosonde_decoder.so
asset_name: radiosonde_decoder_x64.so
file: ${{runner.workspace}}/radiosonde_decoder.so
asset_name: radiosonde_decoder_ubuntu_jammy.so
overwrite: false
prerelease: false





build_windows:
runs-on: windows-latest


steps:
- uses: actions/checkout@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions docker/debian_bullseye/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM debian:bullseye
ENV DEBIAN_FRONTEND=noninteractive
COPY do_build.sh /root
RUN chmod +x /root/do_build.sh
24 changes: 24 additions & 0 deletions docker/debian_bullseye/do_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e
cd /root

# Install dependencies and tools
apt update
apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \
libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \
libcodec2-dev

# Download SDR++ source code
git clone https://github.com/AlexandreRouma/SDRPlusPlus

# Copy module code into SDR++ tree
cp -r /github/workspace SDRPlusPlus/decoder_modules/sdrpp_radiosonde

# Add module to CMakeLists
echo "add_subdirectory(\"decoder_modules/sdrpp_radiosonde\")" >> SDRPlusPlus/CMakeLists.txt

# Build
cd SDRPlusPlus
cmake -B build -DOPT_BUILD_AIRSPY_SOURCE=OFF -DOPT_BUILD_AIRSPYHF_SOURCE=OFF -DOPT_BUILD_HACKRF_SOURCE=OFF -DOPT_BUILD_RFSPACE_SOURCE=OFF -DOPT_BUILD_RTL_SDR_SOURCE=OFF -DOPT_BUILD_RTL_TCP_SOURCE=OFF -DOPT_BUILD_SPYSERVER_SOURCE=OFF -DOPT_BUILD_PLUTOSDR_SOURCE=OFF
cd build
make -j2 radiosonde_decoder
4 changes: 4 additions & 0 deletions docker/debian_buster/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM debian:buster
ENV DEBIAN_FRONTEND=noninteractive
COPY do_build.sh /root
RUN chmod +x /root/do_build.sh
24 changes: 24 additions & 0 deletions docker/debian_buster/do_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e
cd /root

# Install dependencies and tools
apt update
apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk1-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \
libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \
libcodec2-dev

# Download SDR++ source code
git clone https://github.com/AlexandreRouma/SDRPlusPlus

# Copy module code into SDR++ tree
cp -r /github/workspace SDRPlusPlus/decoder_modules/sdrpp_radiosonde

# Add module to CMakeLists
echo "add_subdirectory(\"decoder_modules/sdrpp_radiosonde\")" >> SDRPlusPlus/CMakeLists.txt

# Build
cd SDRPlusPlus
cmake -B build -DOPT_BUILD_AIRSPY_SOURCE=OFF -DOPT_BUILD_AIRSPYHF_SOURCE=OFF -DOPT_BUILD_HACKRF_SOURCE=OFF -DOPT_BUILD_RFSPACE_SOURCE=OFF -DOPT_BUILD_RTL_SDR_SOURCE=OFF -DOPT_BUILD_RTL_TCP_SOURCE=OFF -DOPT_BUILD_SPYSERVER_SOURCE=OFF -DOPT_BUILD_PLUTOSDR_SOURCE=OFF
cd build
make -j2 radiosonde_decoder
4 changes: 4 additions & 0 deletions docker/debian_sid/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM debian:sid
ENV DEBIAN_FRONTEND=noninteractive
COPY do_build.sh /root
RUN chmod +x /root/do_build.sh
24 changes: 24 additions & 0 deletions docker/debian_sid/do_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e
cd /root

# Install dependencies and tools
apt update
apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \
libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \
libcodec2-dev

# Download SDR++ source code
git clone https://github.com/AlexandreRouma/SDRPlusPlus

# Copy module code into SDR++ tree
cp -r /github/workspace SDRPlusPlus/decoder_modules/sdrpp_radiosonde

# Add module to CMakeLists
echo "add_subdirectory(\"decoder_modules/sdrpp_radiosonde\")" >> SDRPlusPlus/CMakeLists.txt

# Build
cd SDRPlusPlus
cmake -B build -DOPT_BUILD_AIRSPY_SOURCE=OFF -DOPT_BUILD_AIRSPYHF_SOURCE=OFF -DOPT_BUILD_HACKRF_SOURCE=OFF -DOPT_BUILD_RFSPACE_SOURCE=OFF -DOPT_BUILD_RTL_SDR_SOURCE=OFF -DOPT_BUILD_RTL_TCP_SOURCE=OFF -DOPT_BUILD_SPYSERVER_SOURCE=OFF -DOPT_BUILD_PLUTOSDR_SOURCE=OFF
cd build
make -j2 radiosonde_decoder
4 changes: 4 additions & 0 deletions docker/ubuntu_bionic/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
COPY do_build.sh /root
RUN chmod +x /root/do_build.sh
Loading

0 comments on commit c3b665e

Please sign in to comment.