Skip to content

Clean up CI pipelines #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 35 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,43 @@
---
name: CI
"on":
on:
pull_request:
push:
branches:
- "master"
schedule:
- cron: "0 16 * * 1" # 8am PST every Monday
jobs:
ci:
name: Format, lint, and test
lint:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install rust
run: |
rustup -V
rustup set profile minimal
rustup toolchain install stable
rustup show

- name: Check Formatting
run: cargo fmt --check --all --verbose

- name: Clippy
run: cargo clippy --workspace --all-features --verbose -- -Dwarnings

# Check for docs warnings
# Only do this for the swiftnav crate since swiftnav-sys has some errors
# in the bindgen output
- name: Docs
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --package swiftnav --all-features --no-deps --verbose

build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -19,25 +47,18 @@ jobs:
binary_target: x86_64-unknown-linux-musl
needs_musl: true
toolchain: stable
- os: ubuntu-20.04
binary_target: x86_64-unknown-linux-gnu
toolchain: stable

# MacOS ARM
- os: macos-latest
binary_target: aarch64-apple-darwin
toolchain: stable

# Windows
- os: windows-latest
binary_target: x86_64-pc-windows-msvc
toolchain: stable

# Nightly Rust
- os: ubuntu-latest
binary_target: x86_64-unknown-linux-gnu
toolchain: nightly

# MSRV
- os: ubuntu-latest
binary_target: x86_64-unknown-linux-gnu
Expand All @@ -46,7 +67,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: davidB/rust-cargo-make@v1

- name: Install musl tools
if: matrix.needs_musl
Expand Down Expand Up @@ -77,4 +97,7 @@ jobs:
rustup show

- name: Build
run: cargo make --no-workspace workspace-ci-flow
run: cargo build --workspace --all-features --verbose

- name: Test
run: cargo test --workspace --all-features --verbose
26 changes: 0 additions & 26 deletions Makefile.toml

This file was deleted.

10 changes: 5 additions & 5 deletions swiftnav/src/coords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
//! the more common algortihms based on the Newton-Raphson method.
//!
//! # References
//! * "A comparison of methods used in rectangular to Geodetic Coordinates
//! Transformations", Burtch R. R. (2006), American Congress for Surveying
//! and Mapping Annual Conference. Orlando, Florida.
//! * "Transformation from Cartesian to Geodetic Coordinates Accelerated by
//! Halley’s Method", T. Fukushima (2006), Journal of Geodesy.
//! * "A comparison of methods used in rectangular to Geodetic Coordinates
//! Transformations", Burtch R. R. (2006), American Congress for Surveying
//! and Mapping Annual Conference. Orlando, Florida.
//! * "Transformation from Cartesian to Geodetic Coordinates Accelerated by
//! Halley’s Method", T. Fukushima (2006), Journal of Geodesy.

use std::ops::{Add, AddAssign, Mul, MulAssign, Sub, SubAssign};

Expand Down
18 changes: 9 additions & 9 deletions swiftnav/src/reference_frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
//! This module provides several types and functions to help transform a set of coordinates
//! from one reference frame to another, and from one epoch to another. Several sets of
//! transformation parameters are included for converting between common reference frames.
//! To start out, you must have a [`Coordinate`](crate::coords::Coordinate) that you want to
//! transform. This consists of a position, an epoch, and a reference frame as well as an optional
//! velocity. You then need to get the [`Transformation`](crate::reference_frame::Transformation)
//! object that describes the transformation from the reference frame of the coordinate to the
//! desired reference frame. You can then call the `transform` method on the transformation object
//! to get a new coordinate in the desired reference frame. This transformation will change the
//! position and velocity of the coordinate, but it does not the change the epoch of the coordinate.
//! If you need to change the epoch of the coordinate you will need to use the [`Coordinate::adjust_epoch`](crate::coords::Coordinate::adjust_epoch)
//! To start out, you must have a [`Coordinate`] that you want to transform. This consists of a
//! position, an epoch, and a reference frame as well as an optional velocity. You then need to
//! get the [`Transformation`] object that describes the transformation from the reference
//! frame of the coordinate to the desired reference frame. You can then call the `transform`
//! method on the transformation object to get a new coordinate in the desired reference frame.
//! This transformation will change the position and velocity of the coordinate, but it does
//! not the change the epoch of the coordinate. If you need to change the epoch of the
//! coordinate you will need to use the [`Coordinate::adjust_epoch`](crate::coords::Coordinate::adjust_epoch)
//! method which uses the velocity of the coordinate to determine the position at the new epoch.
//!
//! # Example
Expand Down Expand Up @@ -304,7 +304,7 @@ pub fn get_transformation(

/// A helper type for finding transformations between reference frames that require multiple steps
///
/// This object can be used to determine which calls to [`get_transformation`](crate::reference_frame::get_transformation)
/// This object can be used to determine which calls to [`get_transformation`]
/// are needed when a single transformation does not exist between two reference frames.
pub struct TransformationGraph {
graph: HashMap<ReferenceFrame, HashSet<ReferenceFrame>>,
Expand Down
4 changes: 2 additions & 2 deletions swiftnav/src/troposphere.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
//! parameters are hardcoded into the library, unlike the ionosphere model.
//!
//! # References
//! * UNB Neutral Atmosphere Models: Development and Performance. R Leandro,
//! M Santos, and R B Langley
//! * UNB Neutral Atmosphere Models: Development and Performance. R Leandro,
//! M Santos, and R B Langley

/// Calculate tropospheric delay using UNM3m model.
///
Expand Down