-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* copy CI setup from Bempp-rs * fix warnings * clippy * clippy * no s * clippy * add example finder
- Loading branch information
Showing
15 changed files
with
397 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: 📖 | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
merge_group: | ||
|
||
jobs: | ||
build-docs: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: "nightly" | ||
- name: Set up MPI | ||
uses: mpi4py/setup-mpi@v1 | ||
with: | ||
mpi: "mpich" | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build docs | ||
run: RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --no-deps -Zunstable-options -Zrustdoc-scrape-examples --features "strict" | ||
|
||
build-and-deploy-docs: | ||
name: Build and deploy docs | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
if: github.ref == 'refs/heads/main' | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
steps: | ||
- name: Set up Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: "nightly" | ||
components: rustfmt | ||
- name: Set up MPI | ||
uses: mpi4py/setup-mpi@v1 | ||
with: | ||
mpi: "mpich" | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build docs | ||
run: RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --no-deps -Zunstable-options -Zrustdoc-scrape-examples | ||
|
||
- name: Set file permissions | ||
run: | | ||
rm target/doc/.lock | ||
chmod -c -R +rX target/doc | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact for docs | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: 'target/doc' | ||
- name: Deploy docs to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
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: ['--features "strict"'] | ||
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 -y libopenblas-dev liblapack-dev | ||
|
||
- name: Run unit tests | ||
run: cargo test ${{ matrix.feature-flags }} | ||
- name: Run unit tests in release mode | ||
run: cargo test --release ${{ matrix.feature-flags }} | ||
- name: Run tests | ||
run: cargo test --examples --release ${{ matrix.feature-flags }} | ||
- name: Run examples | ||
run: | | ||
python3 find_examples.py | ||
chmod +x examples.sh | ||
./examples.sh | ||
check-dependencies: | ||
name: Check dependencies | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust-version: ["stable"] | ||
steps: | ||
- name: Set up Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust-version }} | ||
components: rustfmt | ||
- name: Install cargo-upgrades | ||
run: cargo install cargo-upgrades | ||
- uses: actions/checkout@v3 | ||
- name: Check that dependencies are up to date | ||
run: | ||
cargo upgrades |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: 🧪 | ||
|
||
on: | ||
schedule: | ||
- cron: "0 7 * * 1" | ||
|
||
jobs: | ||
run-tests-rust: | ||
name: Run Rust tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust-version: ["stable", "beta", "nightly"] | ||
mpi: [ 'mpich', 'openmpi'] | ||
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 -y libopenblas-dev liblapack-dev | ||
|
||
- name: Build rust library | ||
run: cargo build --features "strict" | ||
- name: Build rust library in release mode | ||
run: cargo build --release --features "strict" | ||
|
||
- name: Run unit tests | ||
run: cargo test --features "strict" | ||
- name: Run unit tests in release mode | ||
run: cargo test --release --features "strict" | ||
- name: Run tests | ||
run: cargo test --examples --release --features "strict" | ||
- name: Run examples | ||
run: | | ||
python3 find_examples.py | ||
chmod +x examples.sh | ||
./examples.sh | ||
- name: Build docs | ||
run: cargo doc --features "strict" --no-deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: ✨ | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
branches: | ||
- main | ||
merge_group: | ||
|
||
jobs: | ||
style-checks: | ||
name: Rust style checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
feature-flags: ['--features "strict"', ''] | ||
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 -y libopenblas-dev liblapack-dev | ||
|
||
- name: Style checks | ||
run: | | ||
cargo fmt -- --check | ||
cargo clippy ${{ matrix.feature-flags }} -- -D warnings | ||
cargo clippy --tests ${{ matrix.feature-flags }} -- -D warnings | ||
cargo clippy --examples ${{ matrix.feature-flags }} -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.