2021-03-01 17:39:20 +08:00
|
|
|
|
name: nalgebra CI build
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
2021-03-01 17:43:08 +08:00
|
|
|
|
branches: [ dev, master ]
|
2021-03-01 17:39:20 +08:00
|
|
|
|
pull_request:
|
2021-03-01 17:43:08 +08:00
|
|
|
|
branches: [ dev, master ]
|
2021-03-01 17:39:20 +08:00
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
check-fmt:
|
2021-03-01 19:16:10 +08:00
|
|
|
|
runs-on: ubuntu-latest
|
2021-03-01 17:39:20 +08:00
|
|
|
|
steps:
|
2024-06-23 17:29:28 +08:00
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: Check formatting
|
|
|
|
|
run: cargo fmt -- --check
|
2021-03-01 17:39:20 +08:00
|
|
|
|
clippy:
|
2021-03-01 19:16:10 +08:00
|
|
|
|
runs-on: ubuntu-latest
|
2021-03-01 17:39:20 +08:00
|
|
|
|
steps:
|
2024-06-23 17:29:28 +08:00
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: Install clippy
|
|
|
|
|
run: rustup component add clippy
|
|
|
|
|
- name: Run clippy
|
|
|
|
|
run: cargo clippy
|
2021-03-01 19:54:50 +08:00
|
|
|
|
build-nalgebra:
|
2021-03-01 19:16:10 +08:00
|
|
|
|
runs-on: ubuntu-latest
|
2024-06-23 17:29:28 +08:00
|
|
|
|
# env:
|
|
|
|
|
# RUSTFLAGS: -D warnings
|
2021-11-23 20:16:28 +08:00
|
|
|
|
steps:
|
2024-06-23 17:29:28 +08:00
|
|
|
|
- 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;
|
2021-11-23 20:57:30 +08:00
|
|
|
|
# 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;
|
2021-03-01 19:54:50 +08:00
|
|
|
|
test-nalgebra:
|
2021-03-01 19:16:10 +08:00
|
|
|
|
runs-on: ubuntu-latest
|
2024-06-23 17:29:28 +08:00
|
|
|
|
# env:
|
|
|
|
|
# RUSTFLAGS: -D warnings
|
2021-03-01 17:39:20 +08:00
|
|
|
|
steps:
|
2024-06-23 17:29:28 +08:00
|
|
|
|
# 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
|
2021-03-01 17:39:20 +08:00
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: test
|
2023-01-14 22:59:11 +08:00
|
|
|
|
run: cargo test --features arbitrary,rand,serde-serialize,sparse,debug,io,compare,libm,proptest-support,slow-tests,rkyv-safe-deser,rayon;
|
2021-03-01 19:54:50 +08:00
|
|
|
|
test-nalgebra-glm:
|
2021-03-01 19:57:12 +08:00
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2021-03-01 19:54:50 +08:00
|
|
|
|
- uses: actions/checkout@v2
|
2021-03-01 17:39:20 +08:00
|
|
|
|
- name: test nalgebra-glm
|
2022-02-06 06:05:59 +08:00
|
|
|
|
run: cargo test -p nalgebra-glm --features arbitrary,serde-serialize;
|
2021-03-01 19:54:50 +08:00
|
|
|
|
test-nalgebra-sparse:
|
2021-03-01 19:57:12 +08:00
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2021-03-01 19:54:50 +08:00
|
|
|
|
- uses: actions/checkout@v2
|
2021-03-01 17:39:20 +08:00
|
|
|
|
- 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
|
2021-12-10 04:47:59 +08:00
|
|
|
|
run: PROPTEST_CASES=10000 cargo test --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,io,serde-serialize
|
2021-03-01 17:39:20 +08:00
|
|
|
|
- name: test nalgebra-sparse (slow tests)
|
|
|
|
|
# Unfortunately, the "slow-tests" take so much time that we need to run them with --release
|
2021-12-10 04:47:59 +08:00
|
|
|
|
run: PROPTEST_CASES=10000 cargo test --release --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,io,serde-serialize,slow-tests slow
|
2021-04-30 23:16:18 +08:00
|
|
|
|
test-nalgebra-macros:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: test nalgebra-macros
|
|
|
|
|
run: cargo test -p nalgebra-macros
|
2021-03-01 17:39:20 +08:00
|
|
|
|
build-wasm:
|
2021-03-01 19:16:10 +08:00
|
|
|
|
runs-on: ubuntu-latest
|
2024-06-23 17:29:28 +08:00
|
|
|
|
# env:
|
|
|
|
|
# RUSTFLAGS: -D warnings
|
2021-03-01 17:39:20 +08:00
|
|
|
|
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:
|
2021-03-01 19:16:10 +08:00
|
|
|
|
runs-on: ubuntu-latest
|
2021-03-01 17:39:20 +08:00
|
|
|
|
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;
|
2021-03-02 19:25:12 +08:00
|
|
|
|
- name: build x86_64-unknown-linux-gnu
|
2021-03-01 17:39:20 +08:00
|
|
|
|
run: xargo build --verbose --no-default-features --target=x86_64-unknown-linux-gnu;
|
2021-03-02 19:25:12 +08:00
|
|
|
|
- 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
|
2021-03-01 17:39:20 +08:00
|
|
|
|
run: xargo build --verbose --no-default-features --features alloc --target=x86_64-unknown-linux-gnu;
|
2021-03-02 19:25:12 +08:00
|
|
|
|
- name: build thumbv7em-none-eabihf
|
|
|
|
|
run: xargo build --verbose --no-default-features --target=thumbv7em-none-eabihf;
|
2021-11-22 03:57:02 +08:00
|
|
|
|
- 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;
|
2022-12-12 12:21:23 +08:00
|
|
|
|
docs:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2024-06-23 17:29:28 +08:00
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: Generate documentation
|
|
|
|
|
run: cargo doc
|