fenris 0.0.21

A library for advanced finite element computations in Rust
Documentation
name: Build and test

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  cargo-fmt-check:
    
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Check format
        run: cargo fmt -- --check

  cargo-check:
    
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.toml') }}
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Check
        run: cargo check --verbose
      - name: Check tests
        run: cargo check --tests --verbose
      - name: Check examples
        run: cargo check --examples --verbose

  cargo-doc:
    
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.toml') }}
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Build and check doc
        run: RUSTDOCFLAGS='-D warnings --html-in-header assets/doc-header.html' cargo doc --all-features --no-deps

  cargo-test-basic:
    
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Build all tests (cargo build --tests --workspace --all-targets)
        run: cargo build --tests --workspace --all-targets
      - name: Build tests, release (cargo build --tests --workspace --all-targets --release)
        run: cargo build --tests --workspace --all-targets --release
      - name: Run tests without convergence tests
        run: cargo test --workspace --all-targets -- --skip "convergence_tests::"
      - name: Run tests without convergence tests, release
        run: cargo test --workspace --all-targets --release -- --skip "convergence_tests::"

  cargo-test-convergence:
    
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Build all tests (cargo build --tests --workspace --all-targets)
        run: cargo build --tests --workspace --all-targets
      - name: Build tests, release (cargo build --tests --workspace --all-targets --release)
        run: cargo build --tests --workspace --all-targets --release
      - name: Run convergence tests, release
        run: cargo test --workspace --release --test convergence