Skip to content

Set up pedantic Clippy warnings #390

Set up pedantic Clippy warnings

Set up pedantic Clippy warnings #390

Workflow file for this run

---
name: CI
on:
pull_request:
push:
branches:
- "master"
schedule:
- cron: "0 16 * * 1" # 8am PST every Monday
jobs:
lint:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: extractions/setup-just@v3
- name: Install rust
run: |
rustup -V
rustup set profile minimal
rustup toolchain install stable
rustup show
- name: Check Formatting
run: just fmt-check
- name: Clippy
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
run: just docs
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Ubuntus
- os: ubuntu-latest
binary_target: x86_64-unknown-linux-musl
needs_musl: true
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
toolchain: 1.85.0
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: extractions/setup-just@v3
- name: Install musl tools
if: matrix.needs_musl
run: |
sudo apt-get install musl-tools
sudo ln -s /usr/bin/musl-gcc /usr/bin/musl-g++
# Required for bindgen on Windows
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
if: matrix.os == 'windows-latest'
with:
version: "10.0"
directory: ${{ runner.temp }}/llvm-10.0/
- name: Set CMake generator
if: matrix.os == 'windows-latest'
run: |
echo "CMAKE_GENERATOR=NMake Makefiles" >> $env:GITHUB_ENV
echo "${{ env.CMAKE_GENERATOR }}"
echo $env:CMAKE_GENERATOR
- name: Install rust ${{ matrix.binary_target }}
run: |
rustup -V
rustup set profile minimal
rustup default ${{ matrix.toolchain }}
rustup target add ${{ matrix.binary_target }}
rustup show
- name: Build
env:
CARGO_BUILD_TARGET: ${{ matrix.binary_target }}
run: just build
- name: Test
env:
CARGO_BUILD_TARGET: ${{ matrix.binary_target }}
run: just test