Skip to content

Commit 374a792

Browse files
jbangeloJason Mobarak
andauthored
Install the leap seconds header (#28)
* Install the leap seconds header * trigger build * bump swift build * ci fixes from internal repo * debug --------- Co-authored-by: Jason Mobarak <jason@swift-nav.com>
1 parent 5eb306d commit 374a792

File tree

4 files changed

+47
-42
lines changed

4 files changed

+47
-42
lines changed

.github/workflows/ci.yaml

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,30 @@ on:
1414
jobs:
1515

1616
ubuntu-codecov:
17-
runs-on: ubuntu-18.04
17+
runs-on: ubuntu-latest
18+
container: ubuntu:18.04
19+
1820
steps:
1921

22+
- name: Setup container
23+
run: |
24+
apt-get update
25+
apt-get install -y gpg wget curl software-properties-common unzip
26+
add-apt-repository -y ppa:git-core/ppa
27+
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - \
28+
| tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
29+
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic-rc main' \
30+
| tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
31+
apt-get update
32+
apt-get install -y git cmake build-essential clang llvm
33+
2034
- name: Checkout source
2135
uses: actions/checkout@v2
2236
with:
2337
fetch-depth: 0
2438
submodules: recursive
2539
ssh-key: ${{ secrets.SSH_KEY }}
2640

27-
- name: Install llvm-cov
28-
run: |
29-
sudo apt-get update && sudo apt-get install llvm -y
30-
3141
- name: Run build
3242
env:
3343
CC: clang
@@ -36,8 +46,8 @@ jobs:
3646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3747
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3848
SONAR_ORGANIZATION: swift-nav
39-
SONAR_PROJECT_KEY: swift-nav_libswiftnav
40-
SONAR_PROJECT_NAME: libswiftnav
49+
SONAR_PROJECT_KEY: swift-nav_libswiftnav-private
50+
SONAR_PROJECT_NAME: libswiftnav-private
4151
SONAR_HOST_URL: https://sonarcloud.io
4252
SONAR_SCANNER_VERSION: 4.2.0.1873
4353

@@ -102,49 +112,41 @@ jobs:
102112
strategy:
103113
matrix:
104114
include:
105-
- {os: ubuntu-18.04, cc: "gcc-6", cxx: "g++-6", test_suite: "unit"}
106-
- {os: ubuntu-18.04, cc: "clang-6.0", cxx: "clang++-6.0", test_suite: "lint"}
107-
- {os: ubuntu-18.04, cc: "gcc-11", cxx: "g++-11", test_suite: "unit"}
108-
- {os: macos-10.15, cc: "clang", cxx: "clang++", test_suite: "unit"}
109-
110-
runs-on: ${{ matrix.os }}
115+
- {cc: "gcc-6", cxx: "g++-6", test_suite: "unit",
116+
package: "gcc-6 g++-6", runs_on: "ubuntu-latest", container: "ubuntu:18.04"}
117+
- {cc: "clang-6.0", cxx: "clang++-6.0", test_suite: "lint",
118+
package: "clang-6.0 libc++-dev libc++abi-dev clang-format-6.0 clang-tidy-6.0",
119+
runs_on: "ubuntu-latest", container: "ubuntu:18.04"}
120+
- {cc: "gcc-11", cxx: "g++-11", test_suite: "unit",
121+
package: "gcc-11 g++-11", runs_on: "ubuntu-latest", container: "ubuntu:18.04"}
122+
- {cc: "clang", cxx: "clang++", test_suite: "unit",
123+
runs_on: "macos-11", container: ~}
124+
125+
runs-on: ${{ matrix.runs_on }}
126+
container: ${{ matrix.container }}
111127

112128
steps:
113129

130+
- name: Setup container
131+
if: matrix.container == 'ubuntu:18.04'
132+
run: |
133+
apt-get update
134+
apt-get install -y gpg wget curl software-properties-common zip
135+
add-apt-repository ppa:ubuntu-toolchain-r/test -y
136+
add-apt-repository -y ppa:git-core/ppa
137+
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
138+
| gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
139+
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic-rc main' \
140+
| tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
141+
apt-get update
142+
apt-get install -y libeigen3-dev libserialport-dev git cmake build-essential ${{ matrix.package }}
143+
114144
- name: Checkout source
115145
uses: actions/checkout@v2
116146
with:
117147
submodules: recursive
118148
ssh-key: ${{ secrets.SSH_KEY }}
119149

120-
- name: Add base packages and toolchain repository (Linux)
121-
if: matrix.os == 'ubuntu-18.04'
122-
run: |
123-
sudo apt-get update
124-
sudo apt-get install build-essential software-properties-common -y
125-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
126-
sudo apt-get update
127-
128-
- name: Install gcc-6 (Linux)
129-
if: matrix.os == 'ubuntu-18.04' && matrix.cc == 'gcc-6'
130-
run: |
131-
sudo apt-get install -y gcc-6 g++-6
132-
133-
- name: Install gcc-11 (Linux)
134-
if: matrix.os == 'ubuntu-18.04' && matrix.cc == 'gcc-11'
135-
run: |
136-
sudo apt-get install -y gcc-11 g++-11
137-
138-
- name: Install clang-6.0 (Linux)
139-
if: matrix.os == 'ubuntu-18.04' && matrix.cc == 'clang-6.0'
140-
run: |
141-
sudo apt-get install -y clang-6.0 libc++-dev libc++abi-dev
142-
143-
- name: Install clang-{format,tidy} (Linux)
144-
if: matrix.os == 'ubuntu-18.04' && matrix.cc == 'clang-6.0' && matrix.test_suite == 'lint'
145-
run: |
146-
sudo apt-get install -y clang-format-6.0 clang-tidy-6.0
147-
148150
- name: Run build
149151
env:
150152
CC: ${{ matrix.cc }}

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ set(HDRS
6161
include/swiftnav/gnss_capabilities.h
6262
include/swiftnav/gnss_time.h
6363
include/swiftnav/ionosphere.h
64+
include/swiftnav/leap_seconds.h
6465
include/swiftnav/linear_algebra.h
6566
include/swiftnav/logging.h
6667
include/swiftnav/macro_overload.h

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:2021-04-15
2+
FROM 571934480752.dkr.ecr.us-west-2.amazonaws.com/swift-build:2023-04-24
33

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

ci-build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ function build_codecov() {
9393
-Dsonar.cfamily.cache.enabled=false \
9494
-Dsonar.sourceEncoding=UTF-8"
9595

96+
set -x
97+
9698
# shellcheck disable=SC2086
9799
sonar-scanner \
98100
"-Dsonar.cfamily.llvm-cov.reportPath=./build/ccov/coverage.txt" \

0 commit comments

Comments
 (0)