2020-02-08 00:20:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
# SPDX-FileCopyrightText: 2020 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
2019-11-30 01:05:56 +00:00
|
|
|
name: Simple CI
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-ubuntu:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-05-10 15:31:39 +00:00
|
|
|
run: sudo apt-get update && sudo apt-get install ninja-build 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
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: configure
|
|
|
|
run: cd build && cmake -GNinja ..
|
|
|
|
- name: build
|
|
|
|
run: cd build && ninja
|
|
|
|
- name: check
|
|
|
|
run: cd build && ninja check && ../install/volk_gnsssdr_profile && ../install/run_tests
|
|
|
|
- name: default position_test
|
|
|
|
run: cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. && ninja && ../install/position_test
|
|
|
|
|
|
|
|
|
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-05-10 15:31:39 +00:00
|
|
|
run: brew install ninja pkg-config hdf5 libtool automake armadillo lapack gflags glog gnuradio log4cpp pugixml protobuf && pip3 install mako
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: configure
|
|
|
|
run: cd build && cmake -GNinja ..
|
|
|
|
- name: build
|
|
|
|
run: cd build && ninja
|
|
|
|
- name: check
|
|
|
|
run: cd build && ninja check && ../install/volk_gnsssdr_profile && ../install/run_tests
|
|
|
|
- name: default position_test
|
|
|
|
run: cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. && ninja && ../install/position_test
|
|
|
|
|
|
|
|
|
|
|
|
clang-format:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-11-06 09:43:38 +00:00
|
|
|
run: brew install clang-format
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: run clang-format
|
2020-11-22 10:05:16 +00:00
|
|
|
run: find . -iname \*.h -o -iname \*.c -o -iname \*.cc | xargs clang-format -style=file -i
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: check
|
|
|
|
run: git diff > clang_format.patch && echo -e "if \n [ -s clang_format.patch ] \nthen \n echo "clang-format not applied:"; echo ""; more clang_format.patch; exit 1 \nfi \n" > detect && chmod +x ./detect && ./detect
|
|
|
|
|
|
|
|
|
|
|
|
clang-tidy:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-10-29 11:58:13 +00:00
|
|
|
run: brew install llvm pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio log4cpp pugixml protobuf && ln -s /usr/local/opt/llvm/bin/clang-tidy /usr/local/bin && ln -s /usr/local/Cellar/llvm/11.*/bin/clang-apply-replacements /usr/local/bin && cp /usr/local/Cellar/llvm/11.*/share/clang/run-clang-tidy.py /usr/local/bin && pip3 install mako
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: Prepare run
|
|
|
|
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.10.0 core_monitor pvt_libs
|
|
|
|
- name: run clang-tidy
|
|
|
|
run: cd build && run-clang-tidy.py -fix
|
|
|
|
- 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
|
|
|
|
|
2020-02-23 09:40:58 +00:00
|
|
|
|
2020-02-22 23:57:16 +00:00
|
|
|
cpplint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-02-23 00:04:09 +00:00
|
|
|
run: sudo apt-get install python3-pip && sudo pip3 install cpplint
|
2020-02-22 23:57:16 +00:00
|
|
|
- name: run checks
|
2020-04-03 10:09:25 +00:00
|
|
|
run: find ./src/ -iname *.h -o -iname *.cc | xargs cpplint --filter=-,+build/class,+build/c++14,+build/deprecated,+build/explicit_make_pair,+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
|
2020-02-22 23:57:16 +00:00
|
|
|
|
2019-11-30 01:05:56 +00:00
|
|
|
|
2020-02-27 18:09:55 +00:00
|
|
|
prettier-markdown:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-02-27 18:09:55 +00:00
|
|
|
run: sudo npm install --global prettier
|
|
|
|
- name: check markdown
|
2020-02-27 20:05:29 +00:00
|
|
|
run: find . -iname "*.md" | xargs prettier --parser markdown --print-width 80 --prose-wrap always --list-different
|
2020-02-27 18:09:55 +00:00
|
|
|
|
|
|
|
|
2020-03-01 10:33:51 +00:00
|
|
|
cmakelint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: install dependencies
|
|
|
|
run: |
|
|
|
|
sudo python -m pip install --upgrade pip
|
|
|
|
sudo pip install cmakelint
|
|
|
|
- name: check CMake scripts
|
2020-03-01 11:29:21 +00:00
|
|
|
run: find . -iname "CMakeLists.txt" -o -iname "*.cmake" | xargs cmakelint --filter=-linelength,-readability/wonkycase
|
2020-03-01 10:33:51 +00:00
|
|
|
|
|
|
|
|
2019-11-30 01:05:56 +00:00
|
|
|
volk-gnsssdr-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/setup-python@v1
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2020-05-10 15:31:39 +00:00
|
|
|
pip install mako
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: configure
|
|
|
|
shell: powershell
|
|
|
|
run: cd build; cmake -G "Visual Studio 16 2019" ..\src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr
|
|
|
|
- name: build
|
|
|
|
run: cmake --build build --config Release
|
|
|
|
- name: test
|
|
|
|
shell: powershell
|
|
|
|
run: cd build; ctest -C Release
|
2020-11-21 09:36:04 +00:00
|
|
|
- name: install
|
|
|
|
run: cmake --install build
|
|
|
|
- name: run profile
|
|
|
|
run: cd 'C:\Program Files (x86)\volk_gnsssdr\bin'; .\volk_gnsssdr_profile.exe
|
2019-11-30 01:05:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
volk-gnsssdr-ubuntu:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-05-15 07:09:46 +00:00
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install mako
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: configure
|
|
|
|
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
|
|
|
- name: build
|
|
|
|
run: cd build && make -j2
|
|
|
|
- name: install
|
|
|
|
run: cd build && sudo make install && sudo ldconfig
|
|
|
|
- name: test
|
|
|
|
run: volk_gnsssdr_profile
|
|
|
|
|
|
|
|
|
|
|
|
volk-gnsssdr-macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-05-10 15:31:39 +00:00
|
|
|
run: pip3 install mako
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: configure
|
|
|
|
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
|
|
|
- name: build
|
|
|
|
run: cd build && make -j2 && sudo make install
|
|
|
|
- name: test
|
|
|
|
run: cd build && ctest -C Release --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
|
|
|
|
|
|
|
|
|
|
|
|
volk-gnsssdr-macos-xcode:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-27 20:05:29 +00:00
|
|
|
- name: install dependencies
|
2020-05-10 15:31:39 +00:00
|
|
|
run: pip3 install mako
|
2019-11-30 01:05:56 +00:00
|
|
|
- name: configure
|
|
|
|
run: cd build && cmake -GXcode ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
|
|
|
- name: build
|
|
|
|
run: cd build && xcodebuild -configuration Release
|
|
|
|
- name: install
|
|
|
|
run: cd build && sudo xcodebuild -configuration Release -target install
|
|
|
|
- name: test
|
|
|
|
run: cd build && ctest -C Release --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
|
2020-02-08 00:20:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
REUSE-compliance:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Check REUSE compliance
|
|
|
|
uses: docker://fsfe/reuse
|
|
|
|
with:
|
2020-04-25 17:00:50 +00:00
|
|
|
args: lint
|