Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into mscroggs/implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Feb 23, 2024
2 parents 2078a1c + 7eabc06 commit 08bb6fa
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 🧪

on:
push:
branches:
- "**"
pull_request:
branches:
- main
merge_group:

jobs:
run-tests-rust:
name: Run Rust tests
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: ["stable"]
# mpi: ['mpich', 'openmpi']
feature-flags: ['']
steps:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt
#- name: Set up MPI
# uses: mpi4py/setup-mpi@v1
# with:
# mpi: ${{ matrix.mpi }}
#- name: Install cargo-mpirun
# run: cargo install cargo-mpirun
- uses: actions/checkout@v3
#- name: Install LAPACK & OpenBLAS
# run:
# sudo apt-get install libopenblas-dev liblapack-dev

- name: Run unit tests
run: cargo test --lib ${{ matrix.feature-flags }}
- name: Run unit tests in release mode
run: cargo test --lib --release ${{ matrix.feature-flags }}
- name: Run tests
run: cargo test --examples --release ${{ matrix.feature-flags }}
36 changes: 36 additions & 0 deletions .github/workflows/style-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name:

on:
push:
branches:
- "**"
pull_request:
branches:
- main
merge_group:

jobs:
style-checks:
name: Rust style checks
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt,clippy
#- name: Set up MPI
# uses: mpi4py/setup-mpi@v1
# with:
# mpi: mpich
- uses: actions/checkout@v3
#- name: Install LAPACK & OpenBLAS
# run:
# sudo apt-get install libopenblas-dev liblapack-dev

- name: Style checks
run: |
cargo fmt -- --check
cargo clippy -- -D warnings
cargo clippy --tests -- -D warnings
cargo clippy --examples -- -D warnings
2 changes: 1 addition & 1 deletion src/traits/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub trait ReferenceCell {
/// The vertices of the cell
///
/// The first dim components represent the first vertex, the next dim the second vertex, and so on.
fn vertices<'a>(&'a self) -> std::slice::Iter<'a, usize>;
fn vertices(&self) -> std::slice::Iter<'_, usize>;

/// Ths midpoint of the cell
fn midpoint(&self, midpoint: &mut [Self::T]);
Expand Down

0 comments on commit 08bb6fa

Please sign in to comment.