131 lines
5.0 KiB
YAML
131 lines
5.0 KiB
YAML
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
|
||
run: cd nalgebra-sparse; cargo build;
|
||
# 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:
|
||
# Needed because the --all-features build which enables cuda support.
|
||
- uses: Jimver/cuda-toolkit@v0.2.4
|
||
- 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:
|
||
- uses: actions/checkout@v2
|
||
- name: test
|
||
run: cargo test --features arbitrary,rand,serde-serialize,abomonation-serialize,sparse,debug,io,compare,libm,proptest-support,slow-tests;
|
||
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,abomonation-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
|
||
- 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,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;
|
||
build-cuda:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: Jimver/cuda-toolkit@v0.2.4
|
||
- name: Install nightly-2021-12-04
|
||
uses: actions-rs/toolchain@v1
|
||
with:
|
||
toolchain: nightly-2021-12-04
|
||
override: true
|
||
- uses: actions/checkout@v2
|
||
- run: rustup target add nvptx64-nvidia-cuda
|
||
- run: cargo build --no-default-features --features cuda
|
||
- run: cargo build --no-default-features --features cuda --target=nvptx64-nvidia-cuda |