build: Update Github Actions
This commit is contained in:
parent
462e765ddc
commit
8d1541bde0
4 changed files with 43 additions and 62 deletions
|
@ -1,40 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# This script is for internal CI use only
|
|
||||||
#
|
|
||||||
# performs a standard out-of-tree build and transform environment vars to cmake options
|
|
||||||
# set RTLSDR=ON/OFF/AUTO (default: ON)
|
|
||||||
# set SOAPYSDR=ON/OFF/AUTO (default: AUTO)
|
|
||||||
# set OPENSSL=ON/OFF/AUTO (default: AUTO)
|
|
||||||
# set CMAKE_TOOLCHAIN_FILE=file (default: unset)
|
|
||||||
# set RUN_RTL_433_TESTS=1 (default: unset)
|
|
||||||
|
|
||||||
RTLSDR="${RTLSDR:-ON}"
|
|
||||||
SOAPYSDR="${SOAPYSDR:-AUTO}"
|
|
||||||
OPENSSL="${OPENSSL:-AUTO}"
|
|
||||||
set -- -DENABLE_RTLSDR=$RTLSDR -DENABLE_SOAPYSDR=$SOAPYSDR -DENABLE_OPENSSL=$OPENSSL
|
|
||||||
|
|
||||||
if [ -n "$CMAKE_TOOLCHAIN_FILE" ] ; then
|
|
||||||
cmake $@ -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -GNinja -B build
|
|
||||||
else
|
|
||||||
cmake $@ -GNinja -B build
|
|
||||||
fi
|
|
||||||
cmake --build build
|
|
||||||
|
|
||||||
if [ -n "$RUN_RTL_433_TESTS" ] ; then
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
set -x
|
|
||||||
git clone --depth 1 https://github.com/merbanan/rtl_433_tests.git
|
|
||||||
cd rtl_433_tests
|
|
||||||
export PATH=../build/src:$PATH
|
|
||||||
test -f ../build/src/rtl_433
|
|
||||||
|
|
||||||
# virtualenv --system-site-packages .venv
|
|
||||||
# source .venv/bin/activate
|
|
||||||
# pip install deepdiff
|
|
||||||
make test
|
|
||||||
|
|
||||||
fi
|
|
24
.ci/scripts/do_tests.sh
Executable file
24
.ci/scripts/do_tests.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script is for internal CI use only
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# prefer GNU commands
|
||||||
|
realpath=$(command -v grealpath || :)
|
||||||
|
realpath="${realpath:-realpath}"
|
||||||
|
|
||||||
|
# remove this script name and two dir levels to get the source root
|
||||||
|
source_dir=$(dirname $(dirname $(dirname $($realpath -s $0))))
|
||||||
|
|
||||||
|
cd "${source_dir}/.."
|
||||||
|
[ -e rtl_433_tests ] || git clone --depth 1 https://github.com/merbanan/rtl_433_tests.git
|
||||||
|
cd rtl_433_tests
|
||||||
|
export PATH="${source_dir}/build/src:$PATH"
|
||||||
|
test -f "${source_dir}/build/src/rtl_433"
|
||||||
|
|
||||||
|
# python3 -m venv .venv
|
||||||
|
# source .venv/bin/activate
|
||||||
|
# pip install deepdiff
|
||||||
|
make test
|
12
.github/workflows/check.yml
vendored
12
.github/workflows/check.yml
vendored
|
@ -6,7 +6,7 @@ jobs:
|
||||||
name: Build with CMake
|
name: Build with CMake
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Get latest CMake and Ninja
|
- name: Get latest CMake and Ninja
|
||||||
uses: lukka/get-cmake@latest
|
uses: lukka/get-cmake@latest
|
||||||
- name: Run CMake+Ninja
|
- name: Run CMake+Ninja
|
||||||
|
@ -28,7 +28,7 @@ jobs:
|
||||||
name: Build documentation
|
name: Build documentation
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Get latest CMake and Ninja
|
- name: Get latest CMake and Ninja
|
||||||
uses: lukka/get-cmake@latest
|
uses: lukka/get-cmake@latest
|
||||||
- name: "Install Doxygen"
|
- name: "Install Doxygen"
|
||||||
|
@ -46,14 +46,14 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check code style
|
name: Check code style
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Style Check
|
- name: Style Check
|
||||||
uses: ./.github/actions/style-check
|
uses: ./.github/actions/style-check
|
||||||
maintainer_update_check_job:
|
maintainer_update_check_job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Needs maintainer_update
|
name: Needs maintainer_update
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Working directory clean excluding untracked files
|
- name: Working directory clean excluding untracked files
|
||||||
run: |
|
run: |
|
||||||
./maintainer_update.py
|
./maintainer_update.py
|
||||||
|
@ -62,7 +62,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check symbol errors
|
name: Check symbol errors
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Symbolizer report
|
- name: Symbolizer report
|
||||||
run: |
|
run: |
|
||||||
./tests/symbolizer.py check
|
./tests/symbolizer.py check
|
||||||
|
@ -77,7 +77,7 @@ jobs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
name: Analyze with Clang
|
name: Analyze with Clang
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Clang
|
- name: Install Clang
|
||||||
run: |
|
run: |
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
|
||||||
|
|
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
||||||
#runs-on: ubuntu-latest
|
#runs-on: ubuntu-latest
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v4
|
||||||
id: downloads
|
id: downloads
|
||||||
with:
|
with:
|
||||||
path: ${{ runner.workspace }}/${{ env.pothos-exe }}
|
path: ${{ runner.workspace }}/${{ env.pothos-exe }}
|
||||||
|
@ -34,7 +34,7 @@ jobs:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
release_version: ${{ env.RELEASE_VERSION }}
|
release_version: ${{ env.RELEASE_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Create Release info
|
- name: Create Release info
|
||||||
|
@ -74,16 +74,15 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Build with Mingw-w64 on ${{ matrix.arch }}
|
name: Build with Mingw-w64 on ${{ matrix.arch }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: "Install Mingw-w64"
|
- name: "Install Mingw-w64"
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -q -y
|
sudo apt-get update -q -y
|
||||||
sudo apt-get install -q -y gcc-mingw-w64-base binutils-mingw-w64-${{ matrix.arch }} gcc-mingw-w64-${{ matrix.arch }} mingw-w64-${{ matrix.arch }}-dev gcc-mingw-w64 gcc-multilib p7zip-full
|
sudo apt-get install -q -y gcc-mingw-w64-base binutils-mingw-w64-${{ matrix.arch }} gcc-mingw-w64-${{ matrix.arch }} mingw-w64-${{ matrix.arch }}-dev gcc-mingw-w64 gcc-multilib p7zip-full
|
||||||
- name: "Build with Mingw-w64"
|
- name: "Build with Mingw-w64"
|
||||||
env:
|
run: |
|
||||||
RTLSDR: OFF
|
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-gcc-mingw-w64-${{ matrix.arch }}.cmake -DENABLE_RTLSDR=OFF -B build
|
||||||
CMAKE_TOOLCHAIN_FILE: cmake/Toolchain-gcc-mingw-w64-${{ matrix.arch }}.cmake
|
cmake --build build
|
||||||
run: ./.ci/scripts/do_build.sh
|
|
||||||
- name: "Sysroot Build with Mingw-w64"
|
- name: "Sysroot Build with Mingw-w64"
|
||||||
run: ./.ci/scripts/do_sysroot.sh
|
run: ./.ci/scripts/do_sysroot.sh
|
||||||
- name: "Upload Release Asset"
|
- name: "Upload Release Asset"
|
||||||
|
@ -121,8 +120,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- run: choco install openssl
|
- run: choco install openssl
|
||||||
if: matrix.platform == 'x64'
|
if: matrix.platform == 'x64'
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v4
|
||||||
id: downloads
|
id: downloads
|
||||||
if: matrix.platform == 'x64'
|
if: matrix.platform == 'x64'
|
||||||
with:
|
with:
|
||||||
|
@ -226,7 +225,7 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
name: Build with CMake on ${{ matrix.os }}
|
name: Build with CMake on ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install SDR
|
- name: Install SDR
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -q
|
sudo apt-get update -q
|
||||||
|
@ -273,7 +272,7 @@ jobs:
|
||||||
distro: buster
|
distro: buster
|
||||||
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
|
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: uraimo/run-on-arch-action@v2.0.8
|
- uses: uraimo/run-on-arch-action@v2.0.8
|
||||||
id: runcmd
|
id: runcmd
|
||||||
with:
|
with:
|
||||||
|
@ -309,11 +308,9 @@ jobs:
|
||||||
uname -a
|
uname -a
|
||||||
lsb_release -sc || echo NO lsb_release
|
lsb_release -sc || echo NO lsb_release
|
||||||
echo Release ${{ needs.release_job.outputs.release_version }}
|
echo Release ${{ needs.release_job.outputs.release_version }}
|
||||||
mkdir build
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=../dist -B build
|
||||||
cd build
|
cmake --build build
|
||||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=../dist ..
|
cmake --build build --target install
|
||||||
cmake --build .
|
|
||||||
cmake --build . --target install
|
|
||||||
|
|
||||||
- name: Install FPM
|
- name: Install FPM
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue