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
38 changes: 38 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Basic Validation

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '26 3 20 * *'

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"

jobs:
build-and-test:

name: Build and Test

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Prepare environment
run: |
rustup update stable
cargo clean
- name: Build with cargo
run: |
cargo build --features "double_precision"
cargo build --features "debug"
cargo build --release
cargo clean
- name: Test with cargo
run: |
cargo test
cargo test --features "double_precision"
cargo test --features "debug"
cargo clean
19 changes: 19 additions & 0 deletions .github/workflows/clippy-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on: pull_request

name: Cargo Clippy

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"

jobs:
clippy_check:
name: Check

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clippy
run: |
rustup component add clippy
cargo clippy -- -D warnings
45 changes: 45 additions & 0 deletions .github/workflows/doc-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Cargo Doc

on:
pull_request

jobs:
pr-comment:
name: Check Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Fetch base
run: git fetch origin ${{ github.event.pull_request.base.sha }}
- name: Checkout base
run: git checkout ${{ github.event.pull_request.base.sha }}
- name: Calculate base doc coverage
uses: bewee/rustdoc-coverage-action@v1
- name: Fetch head
run: git fetch origin ${{ github.event.pull_request.head.sha }}
- name: Checkout head
run: git checkout ${{ github.event.pull_request.head.sha }}
- name: Calculate doc coverage
id: coverage
uses: bewee/rustdoc-coverage-action@v1
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "## Documentation Coverage:"
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Documentation Coverage:
${{ steps.coverage.outputs.table }}
edit-mode: replace
46 changes: 0 additions & 46 deletions .github/workflows/rust.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![License](https://img.shields.io/github/license/ScaleWeather/floccus)](https://choosealicense.com/licenses/apache-2.0/)
[![Crates.io](https://img.shields.io/crates/v/floccus)](https://crates.io/crates/floccus)
[![dependency status](https://deps.rs/repo/github/ScaleWeather/floccus/status.svg)](https://deps.rs/repo/github/ScaleWeather/floccus)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ScaleWeather/floccus/rust.yml?branch=main&label=cargo%20build)](https://github.com/ScaleWeather/floccus/actions)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ScaleWeather/floccus/basic.yml?branch=main&label=cargo%20build)](https://github.com/ScaleWeather/floccus/actions)

Rust crate providing formulae for air thermodynamic calculations.

Expand Down