Skip to content

Commit cb857b5

Browse files
lklohJason Mobarak
andcommitted
open source publish 351306f..a9297d9
X-Publish-Start-Commit: 351306f091a19b5df458fed62ece5203c69b857b X-Publish-End-Commit: a9297d9ce86fcf28d7c8164c40db5e12ee613408 --- remove OsrQuality Enum and shift to starling Co-authored-by: laykuan loh <lkloh@users.noreply.github.com> --- Add a constellation clock into calc_PVT. Co-authored-by: ismolyakov <39203083+ismolyakov@users.noreply.github.com> Co-authored-by: pgrgich <pgrgich@swift-nav.com> --- Distinguish baseline and position members in pvt_engine_result_t Co-authored-by: Lloyd Maza <34033788+lloydmaza@users.noreply.github.com> --- Turn on pedantic flag Author: Matt Woodward <46688854+woodfell@users.noreply.github.com> --- cmake - code coverage overhaul Co-authored-by: Rodrigo Reichert <rodrigo.reichert@swift-nav.com> --- Handle WN of 0 gracefully Co-authored-by: Christian Reimer <christian.reimer@swift-nav.com> --- docker: bump swift-build tag Co-authored-by: Jason Mobarak <jason@swift-nav.com> --- cmake - added RLM third party library --- gpsdifftime overflow fix Co-authored-by: Rodrigo Reichert <rodrigo.reichert@swift-nav.com> --- cmake - update googleflags --- cmake - memcheck_xml2junit_converter.py: Remove redundancy SonarCloud complains about the repeated string. --- Fix bug in sub_constellation_to_string() Co-authored-by: Isak Tjernberg <5121240+IsakTjernberg@users.noreply.github.com> --- Fuzz testing Co-authored-by: Matt Woodward <46688854+woodfell@users.noreply.github.com> Co-authored-by: Matt Woodward <matthew.woodward@swift-nav.com> --- s/Travis/GitHub Actions/g Co-authored-by: Jason Mobarak <jason@swift-nav.com>
1 parent 59ca6b5 commit cb857b5

32 files changed

+872
-414
lines changed

.github/workflows/ci.yaml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'master'
8+
- 'starling-v*-release'
9+
- 'v*-release'
10+
tags:
11+
- 'v*'
12+
- 'starling-v*'
13+
14+
jobs:
15+
16+
windows:
17+
strategy:
18+
matrix:
19+
include:
20+
- {env: "MSVC", arch: "Win32"}
21+
- {env: "MSVC", arch: "x64"}
22+
- {env: "MinGW"}
23+
24+
runs-on: windows-2019
25+
26+
steps:
27+
28+
- name: Checkout source
29+
uses: actions/checkout@v2
30+
with:
31+
submodules: recursive
32+
ssh-key: ${{ secrets.SSH_KEY }}
33+
34+
- name: Install CMake
35+
run: |
36+
choco install -y --no-progress cmake
37+
38+
- name: Downgrade MinGW to 6.4.0 (MinGW)
39+
if: matrix.env == 'MinGW'
40+
run: |
41+
choco install -y --no-progress --allow-downgrade --version=6.4.0 mingw
42+
43+
- name: Install msys2 packages (MinGW)
44+
if: matrix.env == 'MinGW'
45+
uses: msys2/setup-msys2@v2
46+
with:
47+
msystem: MINGW64
48+
install: git base-devel
49+
update: true
50+
51+
- name: Run build (MSVC)
52+
if: matrix.env == 'MSVC'
53+
env:
54+
CMAKE_GENERATOR: "Visual Studio 16 2019"
55+
run: |
56+
cmake -G "$env:CMAKE_GENERATOR" -A ${{ matrix.arch }} -S . -B build;
57+
cmake --build build --config Release;
58+
bash -c "ls -la ./build/Release/swiftnav.lib || exit 1"
59+
60+
- name: Run build (MinGW)
61+
if: matrix.env == 'MinGW'
62+
env:
63+
CMAKE_GENERATOR: "MinGW Makefiles"
64+
CC: gcc
65+
CXX: g++
66+
run: |
67+
cmake -B build -S . -G "$env:CMAKE_GENERATOR";
68+
cmake --build build
69+
70+
unix:
71+
strategy:
72+
matrix:
73+
include:
74+
- {os: ubuntu-18.04, cc: "gcc-6", cxx: "g++-6", test_suite: "unit"}
75+
- {os: ubuntu-18.04, cc: "clang-6.0", cxx: "clang++-6.0", test_suite: "lint"}
76+
- {os: macos-10.15, cc: "clang", cxx: "clang++", test_suite: "unit"}
77+
78+
runs-on: ${{ matrix.os }}
79+
80+
steps:
81+
82+
- name: Checkout source
83+
uses: actions/checkout@v2
84+
with:
85+
submodules: recursive
86+
ssh-key: ${{ secrets.SSH_KEY }}
87+
88+
- name: Add base packages and toolchain repository (Linux)
89+
if: matrix.os == 'ubuntu-18.04'
90+
run: |
91+
sudo apt-get update
92+
sudo apt-get install build-essential software-properties-common -y
93+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
94+
sudo apt-get update
95+
96+
- name: Install gcc-6 (Linux)
97+
if: matrix.os == 'ubuntu-18.04' && matrix.cc == 'gcc-6'
98+
run: |
99+
sudo apt-get install -y gcc-6 g++-6
100+
101+
- name: Install clang-6.0 (Linux)
102+
if: matrix.os == 'ubuntu-18.04' && matrix.cc == 'clang-6.0'
103+
run: |
104+
sudo apt-get install -y clang-6.0 libc++-dev libc++abi-dev
105+
106+
- name: Install clang-{format,tidy} (Linux)
107+
if: matrix.os == 'ubuntu-18.04' && matrix.cc == 'clang-6.0' && matrix.test_suite == 'lint'
108+
run: |
109+
sudo apt-get install -y clang-format-6.0 clang-tidy-6.0
110+
111+
- name: Run build
112+
env:
113+
CC: ${{ matrix.cc }}
114+
CXX: ${{ matrix.cxx }}
115+
TEST_SUITE: ${{ matrix.test_suite }}
116+
run: |
117+
bash ./ci-build.sh

.travis.yml

Lines changed: 0 additions & 124 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ set(SRCS
9494

9595
add_library(swiftnav ${HDRS} ${SRCS})
9696
swift_set_language_standards(swiftnav)
97-
swift_set_compile_options(swiftnav REMOVE -Wconversion -Wstack-protector)
97+
swift_set_compile_options(swiftnav ADD -pedantic REMOVE -Wconversion -Wstack-protector)
9898

9999
target_code_coverage(swiftnav AUTO ALL)
100100
target_include_directories(swiftnav PUBLIC ${PROJECT_SOURCE_DIR}/include)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Base image is created by https://github.com/swift-nav/docker-recipes
2-
FROM 571934480752.dkr.ecr.us-west-2.amazonaws.com/swift-build:2020-08-31
2+
FROM 571934480752.dkr.ecr.us-west-2.amazonaws.com/swift-build:2021-04-15
33

44
# Add anything that's specific to this repo's build environment here.
55
COPY tools/requirements.txt /tmp/libswiftnav_requirements.txt

travis.sh renamed to ci-build.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/bin/bash
22

3-
# Copyright (C) 2018 Swift Navigation Inc.
3+
# Copyright (C) 2018-2021 Swift Navigation Inc.
44
# Contact: Swift Navigation <dev@swiftnav.com>
55

6-
# Run Travis setup
7-
86
set -ex
97
set -o errexit
108
set -o pipefail
@@ -20,7 +18,7 @@ check_format_errors() {
2018
echo ""
2119
echo "This should be formatted locally and pushed again..."
2220
git --no-pager diff
23-
travis_terminate 1
21+
exit 1
2422
fi
2523
}
2624

@@ -31,19 +29,18 @@ check_tidy_errors() {
3129
echo "####################################################"
3230
echo ""
3331
echo " ^^ Please see and correct the clang-tidy warnings found above ^^"
34-
travis_terminate 1
32+
exit 1
3533
fi
3634
}
3735

3836
function build() {
3937
# Create and enter build directory.
4038
mkdir -p build && cd build
41-
$CMAKE ../
39+
cmake ../
4240
make -j4 VERBOSE=1
4341
if [ "$TEST_SUITE" == "lint" ]; then
4442
make clang-format-all && check_format_errors
45-
## keep clang-tidy disabled until the findings are addressed
46-
# make clang-tidy-all && check_tidy_errors
43+
make clang-tidy-all && check_tidy_errors
4744
fi
4845
cd ../
4946
}

include/swiftnav/bits.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ extern "C" {
5151
u8 parity(u32 x);
5252
u16 bytes_interleave(const u8 x, const u8 y);
5353
u32 getbitu(const u8 *buff, u32 pos, u8 len);
54+
u64 getbitul(const u8 *buff, u32 pos, u8 len);
5455
s32 getbits(const u8 *buff, u32 pos, u8 len);
56+
s64 getbitsl(const u8 *buff, u32 pos, u8 len);
5557
void setbitu(u8 *buff, u32 pos, u32 len, u32 data);
5658
void setbits(u8 *buff, u32 pos, u32 len, s32 data);
5759
void bitcopy(

0 commit comments

Comments
 (0)