Skip to content
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
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RUSTDOCFLAGS="--html-in-header katex-header.html -D warnings"
RUSTFLAGS="-D warnings"
17 changes: 10 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
- uses: actions/checkout@v5
with:
submodules: recursive

- uses: extractions/setup-just@v3

- name: Install rust
run: |
rustup -V
Expand All @@ -23,18 +26,16 @@ jobs:
rustup show

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

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

# 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
run: just docs

build:
name: Build and test
Expand Down Expand Up @@ -68,6 +69,8 @@ jobs:
with:
submodules: recursive

- uses: extractions/setup-just@v3

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

- name: Build
run: cargo build --workspace --all-features --verbose
run: just build

- name: Test
run: cargo test --workspace --all-features --verbose
run: just test
36 changes: 36 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
set dotenv-load

# What is run by default when no command is given
default: fmt lint test

# Build
build:
@cargo build --workspace --all-features

# Run tests
test:
@cargo test --workspace --all-features

# Run cargo check
check:
@cargo check --workspace --all-features

# Format code
fmt:
@cargo fmt --all

# Check formatting without making changes
fmt-check:
@cargo fmt --all --check

# Lint code
lint:
@cargo clippy --workspace --all-features

# Generate docs
docs:
@cargo doc --workspace --all-features --no-deps

# Generate and open docs
open-docs:
@cargo doc --workspace --all-features --no-deps --open
1 change: 1 addition & 0 deletions swiftnav-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(deref_nullptr)]
#![allow(rustdoc::broken_intra_doc_links)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
Loading