kopia lustrzana https://github.com/OpenRTX/OpenRTX
ci: add a job for builds
rodzic
3a2bac3e7e
commit
384a07d197
|
@ -1,44 +1,92 @@
|
||||||
name: CI
|
name: "Build and test"
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
RADIO_TOOL_VERSION: 0.2.2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: install-deps
|
- name: install-deps
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install python3-pip gcc pkg-config libsdl2-dev wget ninja-build libcodec2-dev codec2
|
sudo apt install git pkg-config build-essential meson libsdl2-dev libreadline-dev dfu-util cmake libusb-1.0-0 libusb-1.0-0-dev
|
||||||
wget -O /tmp/MiosixToolchainInstaller.run https://miosix.org/toolchain/MiosixToolchainInstaller.run
|
- name: build install codec2
|
||||||
sudo sh /tmp/MiosixToolchainInstaller.run
|
run: |
|
||||||
sudo pip3 install meson
|
cd ${{github.workspace}}
|
||||||
wget -O /tmp/radio_tool.deb https://github.com/v0l/radio_tool/releases/download/v0.1.0/radio_tool-0.1.0-Linux.deb
|
meson subprojects download
|
||||||
sudo dpkg -i /tmp/radio_tool.deb
|
cd subprojects/codec2
|
||||||
# sudo wget -O /usr/bin/bin2sgl https://raw.githubusercontent.com/rogerclarkmelbourne/OpenGD77/master/firmware/tools/bin2sgl
|
mkdir build_linux
|
||||||
# sudo wget -O /usr/bin/bin2sgl.Linux https://raw.githubusercontent.com/rogerclarkmelbourne/OpenGD77/master/firmware/tools/bin2sgl.Linux
|
cd build_linux
|
||||||
# sudo wget -O /usr/bin/gd-77_firmware_loader.py https://raw.githubusercontent.com/rogerclarkmelbourne/OpenGD77/master/tools/Python/FirmwareLoader/gd-77_firmware_loader.py
|
cmake ..
|
||||||
# sudo chmod +x /usr/bin/bin2sgl /usr/bin/bin2sgl.Linux /usr/bin/gd-77_firmware_loader.py
|
make
|
||||||
- name: meson-setup
|
sudo make install
|
||||||
run: |
|
- name: install miosix
|
||||||
cd ${{github.workspace}}
|
run: |
|
||||||
meson setup build_linux
|
wget https://miosix.org/toolchain/MiosixToolchainInstaller.run
|
||||||
meson setup --cross-file cross_arm.txt build_arm
|
chmod +x MiosixToolchainInstaller.run
|
||||||
- name: ninja
|
sudo sh MiosixToolchainInstaller.run
|
||||||
run: |
|
wget https://github.com/v0l/radio_tool/releases/download/v$RADIO_TOOL_VERSION/radio_tool-$RADIO_TOOL_VERSION-Linux.deb
|
||||||
cd ${{github.workspace}}
|
sudo dpkg -i radio_tool-$RADIO_TOOL_VERSION-Linux.deb
|
||||||
ninja -C build_linux openrtx_linux -j4
|
- name: Get opengd77 for wrapping
|
||||||
ninja -C build_arm openrtx_md3x0_wrap -j4
|
run: |
|
||||||
ninja -C build_arm openrtx_mduv3x0_wrap -j4
|
git clone https://github.com/open-ham/OpenGD77.git /tmp/OpenGD77
|
||||||
ninja -C build_arm openrtx_gd77_bin -j4
|
- name: setup meson
|
||||||
ninja -C build_arm openrtx_dm1801_bin -j4
|
run: |
|
||||||
- uses: actions/upload-artifact@v2
|
cd ${{github.workspace}}
|
||||||
with:
|
meson setup build_linux
|
||||||
name: release-bins
|
meson setup --cross-file cross_arm.txt build_arm
|
||||||
path: |
|
- name: Compile linux
|
||||||
${{github.workspace}}/build_arm/openrtx_*_wrap*
|
run: meson compile -C build_linux openrtx_linux
|
||||||
${{github.workspace}}/build_linux/openrtx_linux
|
- name: Compile arm targets
|
||||||
|
run: |
|
||||||
|
export PATH=$PATH:/tmp/OpenGD77/tools/Python/FirmwareLoader:/tmp/OpenGD77/firmware/tools
|
||||||
|
echo $PATH
|
||||||
|
meson compile -C build_arm openrtx_md3x0_wrap
|
||||||
|
meson compile -C build_arm openrtx_mduv3x0_wrap
|
||||||
|
meson compile -C build_arm openrtx_md9600_wrap
|
||||||
|
meson compile -C build_arm openrtx_gd77_wrap
|
||||||
|
meson compile -C build_arm openrtx_dm1801_wrap
|
||||||
|
meson compile -C build_arm openrtx_mod17_wrap
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: release-bins
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build_arm/openrtx_*_wrap
|
||||||
|
${{github.workspace}}/build_linux/openrtx_linux
|
||||||
|
unit-test:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: install-deps
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y git pkg-config build-essential meson libsdl2-dev libreadline-dev dfu-util cmake libusb-1.0-0 libusb-1.0-0-dev libcodec2-dev codec2
|
||||||
|
- name: setup meson
|
||||||
|
run: |
|
||||||
|
cd ${{github.workspace}}
|
||||||
|
meson setup build
|
||||||
|
- name: M17 Viterbi Unit Test
|
||||||
|
run: meson test -C build "M17 Viterbi Unit Test"
|
||||||
|
- name: M17 Golay Unit Test
|
||||||
|
run: meson test -C build "M17 Golay Unit Test"
|
||||||
|
- name: M17 RRC Test
|
||||||
|
run: meson test -C build "M17 RRC Test"
|
||||||
|
- name: Codeplug Test
|
||||||
|
run: meson test -C build "Codeplug Test"
|
||||||
|
# The following tests are disabled because they appear to be flakey when run in CI
|
||||||
|
# - name: Sine Test
|
||||||
|
# run: meson test -C build "Sine Test"
|
||||||
|
# - name: Linux InputStream Test
|
||||||
|
# run: meson test -C build "Linux InputStream Test"
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
name: "Run unit tests"
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
unit-test:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: install-deps
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y git pkg-config build-essential meson libsdl2-dev libreadline-dev dfu-util cmake libusb-1.0-0 libusb-1.0-0-dev libcodec2-dev codec2
|
|
||||||
- name: setup meson
|
|
||||||
run: |
|
|
||||||
cd ${{github.workspace}}
|
|
||||||
meson setup build
|
|
||||||
- name: M17 Viterbi Unit Test
|
|
||||||
run: meson test -C build "M17 Viterbi Unit Test"
|
|
||||||
- name: M17 Golay Unit Test
|
|
||||||
run: meson test -C build "M17 Golay Unit Test"
|
|
||||||
- name: M17 RRC Test
|
|
||||||
run: meson test -C build "M17 RRC Test"
|
|
||||||
- name: Codeplug Test
|
|
||||||
run: meson test -C build "Codeplug Test"
|
|
||||||
# The following tests are disabled because they appear to be flakey when run in CI
|
|
||||||
# - name: Sine Test
|
|
||||||
# run: meson test -C build "Sine Test"
|
|
||||||
# - name: Linux InputStream Test
|
|
||||||
# run: meson test -C build "Linux InputStream Test"
|
|
Ładowanie…
Reference in New Issue