mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-03-14 11:49:46 +00:00
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
338 lines
13 KiB
YAML
338 lines
13 KiB
YAML
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# SPDX-FileCopyrightText: 2020-2024 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
|
name: Simple CI
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**/CITATION.cff"
|
|
push:
|
|
paths-ignore:
|
|
- "**/CITATION.cff"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-ubuntu:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y libunwind-dev
|
|
sudo apt install -y --no-install-recommends ninja-build cmake \
|
|
libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev \
|
|
libboost-thread-dev libboost-chrono-dev libboost-serialization-dev \
|
|
liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev \
|
|
liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
|
|
libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev \
|
|
python3-mako liborc-0.4-dev
|
|
- name: configure
|
|
run: cmake -S . -B build -GNinja
|
|
- name: build
|
|
run: cmake --build build
|
|
- name: check
|
|
run: cmake --build build --target check && ./install/volk_gnsssdr_profile && ./install/run_tests
|
|
- name: default position_test
|
|
run: |
|
|
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF && \
|
|
cmake --build build && ./install/position_test && ./install/run_tests --gtest_filter=Osnma*
|
|
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
- name: install dependencies
|
|
run: |
|
|
brew update
|
|
rm /usr/local/bin/2to3 || true
|
|
rm /usr/local/bin/idle3 || true
|
|
rm /usr/local/bin/pydoc3 || true
|
|
rm /usr/local/bin/python3 || true
|
|
rm /usr/local/bin/python3-config || true
|
|
rm /usr/local/bin/2to3-3.1* || true
|
|
rm /usr/local/bin/idle3.1* || true
|
|
rm /usr/local/bin/pydoc3.1* || true
|
|
rm /usr/local/bin/python3.1* || true
|
|
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
|
brew link --overwrite python@3.13
|
|
brew install ninja hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf boost
|
|
pip3 install mako
|
|
- name: configure
|
|
run: cmake -S . -B build -GNinja
|
|
- name: build
|
|
run: cmake --build build
|
|
- name: check
|
|
run: cmake --build build --target check && ./install/volk_gnsssdr_profile && ./install/run_tests
|
|
- name: default position_test
|
|
run: |
|
|
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF && \
|
|
cmake --build build && ./install/position_test && ./install/run_tests --gtest_filter=Osnma*
|
|
|
|
build-macos-xcode:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
- name: install dependencies
|
|
run: |
|
|
brew update
|
|
rm /usr/local/bin/2to3 || true
|
|
rm /usr/local/bin/idle3 || true
|
|
rm /usr/local/bin/pydoc3 || true
|
|
rm /usr/local/bin/python3 || true
|
|
rm /usr/local/bin/python3-config || true
|
|
rm /usr/local/bin/2to3-3.1* || true
|
|
rm /usr/local/bin/idle3.1* || true
|
|
rm /usr/local/bin/pydoc3.1* || true
|
|
rm /usr/local/bin/python3.1* || true
|
|
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
|
brew link --overwrite python@3.13
|
|
brew install ninja pkg-config hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf boost
|
|
pip3 install mako
|
|
- name: configure
|
|
run: cmake -S . -B build -GXcode
|
|
- name: build
|
|
run: cmake --build build --config Release
|
|
- name: check
|
|
run: |
|
|
cmake --build build --config Release --target check
|
|
./install/volk_gnsssdr_profile
|
|
./install/run_tests
|
|
- name: default position_test
|
|
run: |
|
|
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF
|
|
cmake --build build --config Release --target position_test
|
|
./install/position_test
|
|
./install/run_tests --gtest_filter=Osnma*
|
|
|
|
clang-format:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
path:
|
|
- 'src'
|
|
- 'tests'
|
|
- 'utils'
|
|
- 'docs'
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: run clang-format
|
|
uses: jidicula/clang-format-action@v4.16.0
|
|
with:
|
|
clang-format-version: "19"
|
|
check-path: ${{ matrix.path }}
|
|
exclude-regex: '(libs\/gsl\/)|(tmpl)|(cpu_features)|^.*\.(cu)$'
|
|
|
|
clang-tidy:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CLANG_VERSION: 20
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y --no-install-recommends cmake \
|
|
clang-${CLANG_VERSION} clang-tidy-${CLANG_VERSION} clang-format-${CLANG_VERSION} \
|
|
libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev \
|
|
libboost-thread-dev libboost-chrono-dev libboost-serialization-dev \
|
|
liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev \
|
|
liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libunwind-dev \
|
|
libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev \
|
|
python3-mako liborc-0.4-dev
|
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/clang /usr/bin/clang
|
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/clang /usr/bin/clang++
|
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/clang-format /usr/bin/clang-format
|
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/clang-tidy /usr/bin/clang-tidy
|
|
sudo ln -sf /usr/lib/llvm-${CLANG_VERSION}/bin/run-clang-tidy /usr/bin/run-clang-tidy
|
|
- name: Prepare run
|
|
run: |
|
|
cmake -S . -B build-tidy -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang
|
|
cmake --build build-tidy --target volk_gnsssdr_module gtest-1.17.0 core_monitor core_libs pvt_libs
|
|
- name: Run clang-tidy
|
|
run: |
|
|
cd build-tidy && run-clang-tidy -fix -format
|
|
- name: check
|
|
run: |
|
|
git diff > clang_tidy.patch
|
|
echo -e "if \n [ -s clang_tidy.patch ] \nthen \n echo "clang_tidy not applied:"; echo ""; more clang_tidy.patch; exit 1 \nfi \n" > detect
|
|
chmod +x ./detect
|
|
./detect
|
|
|
|
cpplint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: install dependencies
|
|
run: sudo apt install python3-pip && sudo pip3 install cpplint
|
|
- name: run checks
|
|
run: "find ./src/ ./utils ./tests -iname *.h -o -iname *.cc | xargs cpplint
|
|
--filter=-,+build/class,+build/deprecated,+build/explicit_make_pair,\
|
|
+build/forward_decl,+build/printf_format,+build/storage_class,\
|
|
+readability/constructors,+readability/namespace,+readability/newline,\
|
|
+readability/utf8,+runtime/casting,+runtime/explicit,\
|
|
+runtime/indentation_namespace,+runtime/init,+runtime/invalid_increment,\
|
|
+runtime/member_string_references,+runtime/memset,+runtime/operator,\
|
|
+runtime/printf,+runtime/printf_format,+whitespace/blank_line,\
|
|
+whitespace/comma,+whitespace/comments,+whitespace/empty_conditional_body,\
|
|
+whitespace/end-of-line,+whitespace/ending-newline,+whitespace/semicolon,\
|
|
+whitespace/tab --exclude=./src/core/interfaces/gnss_block_interface.h
|
|
--exclude=./src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cpu_features/test/hwcaps_for_testing.*
|
|
--exclude=./utils/nav-listener/build/nav_message.pb.h"
|
|
|
|
prettier-markdown:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up latest Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: latest
|
|
- name: Install prettier
|
|
run: npm install --global prettier
|
|
- name: Process markdown files
|
|
run: prettier --parser markdown --print-width 80 --prose-wrap always --write "**/*.md"
|
|
- name: Show required fixes
|
|
run: git diff --exit-code
|
|
|
|
cmakelint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: install dependencies
|
|
run: |
|
|
sudo pip install cmakelint
|
|
- name: check CMake scripts
|
|
run: find . -iname "CMakeLists.txt" -o -iname "*.cmake" | xargs cmakelint --filter=-linelength,-readability/wonkycase
|
|
|
|
volk-gnsssdr-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install mako
|
|
- name: configure
|
|
shell: powershell
|
|
run: cmake -S src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr -B build -G "Visual Studio 17 2022"
|
|
- name: build
|
|
run: cmake --build build --config Release
|
|
- name: test
|
|
shell: powershell
|
|
run: ctest -C Release --test-dir build
|
|
- name: install
|
|
run: cmake --install build
|
|
- name: run profile
|
|
run: cd 'C:\Program Files (x86)\volk_gnsssdr\bin'; .\volk_gnsssdr_profile.exe
|
|
|
|
volk-gnsssdr-ubuntu:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: install dependencies
|
|
run: sudo apt install python3-mako liborc-dev
|
|
- name: configure
|
|
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build
|
|
- name: build
|
|
run: cmake --build build
|
|
- name: install
|
|
run: sudo cmake --install build && sudo ldconfig
|
|
- name: test
|
|
run: volk_gnsssdr_profile
|
|
|
|
volk-gnsssdr-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install mako
|
|
- name: configure
|
|
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build
|
|
- name: build
|
|
run: cmake --build build && sudo cmake --install build
|
|
- name: test
|
|
run: ctest -C Release --test-dir build --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
|
|
|
|
volk-gnsssdr-macos-xcode:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install mako
|
|
- name: configure
|
|
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build -GXcode
|
|
- name: build
|
|
run: cmake --build build --config Release
|
|
- name: install
|
|
run: sudo cmake --install build
|
|
- name: test
|
|
run: ctest -C Release --test-dir build --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
|
|
|
|
shellcheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: install dependencies
|
|
run: sudo apt install shellcheck
|
|
- name: check scripts
|
|
run: shellcheck utils/scripts/*
|
|
|
|
REUSE-compliance:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Check REUSE compliance
|
|
uses: docker://fsfe/reuse
|
|
with:
|
|
args: lint
|
|
|
|
long-line-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Find lines longer than 512 characters
|
|
run: |
|
|
set -uo pipefail
|
|
echo "🔍 Checking for lines with >512 characters ..."
|
|
FLAG_FILE=$(mktemp) > "$FLAG_FILE"
|
|
find . \( -name "*.c" -o -name "*.cpp" -o -name "*.cc" -o -name "*.h" -o -name "*.hpp" -o -name "*.py" -o -name "*.txt" -o -name "*.sh" -o -name "*.proto" -o -name "*.yml" \) -print0 \
|
|
| while IFS= read -r -d '' file; do
|
|
awk -v fname="$file" 'length($0) > 512 {
|
|
gsub(/^\.\/?/, "", fname)
|
|
printf "::error file=%s,line=%d::Line exceeds 512 characters\n", fname, NR
|
|
print fname ":" NR ": " $0
|
|
}' "$file" || true
|
|
if awk 'length($0) > 512 { exit 1 }' "$file"; then
|
|
:
|
|
else
|
|
echo 1 > "$FLAG_FILE"
|
|
fi
|
|
done
|
|
if grep -q 1 "$FLAG_FILE"; then
|
|
echo "❌ One or more lines exceed 512 characters"
|
|
exit 1
|
|
else
|
|
echo "✅ No long lines found."
|
|
fi
|
|
rm -f "$FLAG_FILE"
|