Skip to content

Commit

Permalink
Merge pull request #1977 from lqd/nalgebra
Browse files Browse the repository at this point in the history
Add `nalgrebra-0.33.0` benchmark
  • Loading branch information
Kobzol committed Sep 21, 2024
2 parents 4cc8511 + cf0d79a commit bd9cb8e
Show file tree
Hide file tree
Showing 243 changed files with 60,203 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collector/compile-benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ They mostly consist of real-world crates.
- **libc-0.2.124**: An interface to `libc`. Contains many declarations of
types, constants, and functions, but relatively little normal code. Stresses
the parser. A very widely-used crate.
- **nalgebra-0.33.0**: A linear algebra library. It exercises the new trait solver
in different ways than the old solver.
- **regex-1.5.5**: A regular expression parser. Used by many Rust programs.
- **ripgrep-13.0.0**: A line-oriented search tool. A widely-used utility, and a
binary crate.
Expand Down
5 changes: 5 additions & 0 deletions collector/compile-benchmarks/REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ path = "match-stress/**"
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
SPDX-License-Identifier = "MIT"

[[annotations]]
path = "nalgebra-0.33.0/**"
SPDX-FileCopyrightText = "Sébastien Crozet"
SPDX-License-Identifier = "Apache-2.0"

[[annotations]]
path = "piston-image/**"
SPDX-FileCopyrightText = "piston contributors"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"git": {
"sha1": "48c8f6a5053fac48e305f5e5e0004a332811d092"
},
"path_in_vcs": ""
}
12 changes: 12 additions & 0 deletions collector/compile-benchmarks/nalgebra-0.33.0/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [ "dimforge" ] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[target.x86_64-unknown-linux-gnu.dependencies]
alloc = {}

[target.thumbv7em-none-eabihf.dependencies]
alloc = {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: nalgebra CI build

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

env:
CARGO_TERM_COLOR: always

jobs:
check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check formatting
run: cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install clippy
run: rustup component add clippy
- name: Run clippy
run: cargo clippy
build-nalgebra:
runs-on: ubuntu-latest
# env:
# RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v2
- name: Build --no-default-feature
run: cargo build --no-default-features;
- name: Build (default features)
run: cargo build;
- name: Build --features serde-serialize
run: cargo build --features serde-serialize
- name: Build nalgebra-lapack
run: cd nalgebra-lapack; cargo build;
- name: Build nalgebra-sparse --no-default-features
run: cd nalgebra-sparse; cargo build --no-default-features;
- name: Build nalgebra-sparse (default features)
run: cd nalgebra-sparse; cargo build;
- name: Build nalgebra-sparse --all-features
run: cd nalgebra-sparse; cargo build --all-features;
# Run this on it’s own job because it alone takes a lot of time.
# So it’s best to let it run in parallel to the other jobs.
build-nalgebra-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cargo build --all-features;
- run: cargo build -p nalgebra-glm --all-features;
test-nalgebra:
runs-on: ubuntu-latest
# env:
# RUSTFLAGS: -D warnings
steps:
# Tests are run with a specific version of the compiler to avoid
# trybuild errors when a new compiler version is out. This can be
# bumped as needed after running the tests with TRYBUILD=overwrite
# to re-generate the error reference.
- name: Select rustc version
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79.0
override: true
- uses: actions/checkout@v2
- name: test
run: cargo test --features arbitrary,rand,serde-serialize,sparse,debug,io,compare,libm,proptest-support,slow-tests,rkyv-safe-deser,rayon;
test-nalgebra-glm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: test nalgebra-glm
run: cargo test -p nalgebra-glm --features arbitrary,serde-serialize;
test-nalgebra-sparse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: test nalgebra-sparse
# Manifest-path is necessary because cargo otherwise won't correctly forward features
# We increase number of proptest cases to hopefully catch more potential bugs
run: PROPTEST_CASES=10000 cargo test --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,io,serde-serialize
- name: test nalgebra-sparse (slow tests)
# Unfortunately, the "slow-tests" take so much time that we need to run them with --release
run: PROPTEST_CASES=10000 cargo test --release --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,io,serde-serialize,slow-tests slow
test-nalgebra-macros:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: test nalgebra-macros
run: cargo test -p nalgebra-macros
build-wasm:
runs-on: ubuntu-latest
# env:
# RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v2
- run: rustup target add wasm32-unknown-unknown
- name: build nalgebra
run: cargo build --verbose --target wasm32-unknown-unknown;
- name: build nalgebra-glm
run: cargo build -p nalgebra-glm --verbose --target wasm32-unknown-unknown;
build-no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt
- name: install xargo
run: cp .github/Xargo.toml .; rustup component add rust-src; cargo install -f xargo;
- name: build x86_64-unknown-linux-gnu
run: xargo build --verbose --no-default-features --target=x86_64-unknown-linux-gnu;
- name: build x86_64-unknown-linux-gnu --features rand-no-std
run: xargo build --verbose --no-default-features --target=x86_64-unknown-linux-gnu;
- name: build x86_64-unknown-linux-gnu --features alloc
run: xargo build --verbose --no-default-features --features alloc --target=x86_64-unknown-linux-gnu;
- name: build thumbv7em-none-eabihf
run: xargo build --verbose --no-default-features --target=thumbv7em-none-eabihf;
- name: build x86_64-unknown-linux-gnu nalgebra-glm
run: xargo build --verbose --no-default-features -p nalgebra-glm --target=x86_64-unknown-linux-gnu;
- name: build thumbv7em-none-eabihf nalgebra-glm
run: xargo build --verbose --no-default-features -p nalgebra-glm --target=thumbv7em-none-eabihf;
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate documentation
run: cargo doc
12 changes: 12 additions & 0 deletions collector/compile-benchmarks/nalgebra-0.33.0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.swp
*.html
doc
lib
TODO
target/
*.orig
*.swo
site/
.vscode/
.idea/
proptest-regressions
12 changes: 12 additions & 0 deletions collector/compile-benchmarks/nalgebra-0.33.0/0-println.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/base/matrix.rs b/src/base/matrix.rs
index 6f358a84..6c4eb739 100644
--- a/src/base/matrix.rs
+++ b/src/base/matrix.rs
@@ -225,6 +225,7 @@ where
S: Default,
{
fn default() -> Self {
+ println!("testing");
Matrix {
data: Default::default(),
_phantoms: PhantomData,
Loading

0 comments on commit bd9cb8e

Please sign in to comment.