|
| 1 | +name: nalgebra CI build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ dev, master ] |
| 6 | + pull_request: |
| 7 | + branches: [ dev, master ] |
| 8 | + |
| 9 | +env: |
| 10 | + CARGO_TERM_COLOR: always |
| 11 | + |
| 12 | +jobs: |
| 13 | + check-fmt: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - name: Check formatting |
| 18 | + run: cargo fmt -- --check |
| 19 | + clippy: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v2 |
| 23 | + - name: Install clippy |
| 24 | + run: rustup component add clippy |
| 25 | + - name: Run clippy |
| 26 | + run: cargo clippy |
| 27 | + build-nalgebra: |
| 28 | + runs-on: ubuntu-latest |
| 29 | + # env: |
| 30 | + # RUSTFLAGS: -D warnings |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v2 |
| 33 | + - name: Build --no-default-feature |
| 34 | + run: cargo build --no-default-features; |
| 35 | + - name: Build (default features) |
| 36 | + run: cargo build; |
| 37 | + - name: Build --features serde-serialize |
| 38 | + run: cargo build --features serde-serialize |
| 39 | + - name: Build nalgebra-lapack |
| 40 | + run: cd nalgebra-lapack; cargo build; |
| 41 | + - name: Build nalgebra-sparse --no-default-features |
| 42 | + run: cd nalgebra-sparse; cargo build --no-default-features; |
| 43 | + - name: Build nalgebra-sparse (default features) |
| 44 | + run: cd nalgebra-sparse; cargo build; |
| 45 | + - name: Build nalgebra-sparse --all-features |
| 46 | + run: cd nalgebra-sparse; cargo build --all-features; |
| 47 | + # Run this on it’s own job because it alone takes a lot of time. |
| 48 | + # So it’s best to let it run in parallel to the other jobs. |
| 49 | + build-nalgebra-all-features: |
| 50 | + runs-on: ubuntu-latest |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v2 |
| 53 | + - run: cargo build --all-features; |
| 54 | + - run: cargo build -p nalgebra-glm --all-features; |
| 55 | + test-nalgebra: |
| 56 | + runs-on: ubuntu-latest |
| 57 | + # env: |
| 58 | + # RUSTFLAGS: -D warnings |
| 59 | + steps: |
| 60 | + # Tests are run with a specific version of the compiler to avoid |
| 61 | + # trybuild errors when a new compiler version is out. This can be |
| 62 | + # bumped as needed after running the tests with TRYBUILD=overwrite |
| 63 | + # to re-generate the error reference. |
| 64 | + - name: Select rustc version |
| 65 | + uses: actions-rs/toolchain@v1 |
| 66 | + with: |
| 67 | + toolchain: 1.79.0 |
| 68 | + override: true |
| 69 | + - uses: actions/checkout@v2 |
| 70 | + - name: test |
| 71 | + run: cargo test --features arbitrary,rand,serde-serialize,sparse,debug,io,compare,libm,proptest-support,slow-tests,rkyv-safe-deser,rayon; |
| 72 | + test-nalgebra-glm: |
| 73 | + runs-on: ubuntu-latest |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v2 |
| 76 | + - name: test nalgebra-glm |
| 77 | + run: cargo test -p nalgebra-glm --features arbitrary,serde-serialize; |
| 78 | + test-nalgebra-sparse: |
| 79 | + runs-on: ubuntu-latest |
| 80 | + steps: |
| 81 | + - uses: actions/checkout@v2 |
| 82 | + - name: test nalgebra-sparse |
| 83 | + # Manifest-path is necessary because cargo otherwise won't correctly forward features |
| 84 | + # We increase number of proptest cases to hopefully catch more potential bugs |
| 85 | + run: PROPTEST_CASES=10000 cargo test --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,io,serde-serialize |
| 86 | + - name: test nalgebra-sparse (slow tests) |
| 87 | + # Unfortunately, the "slow-tests" take so much time that we need to run them with --release |
| 88 | + run: PROPTEST_CASES=10000 cargo test --release --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,io,serde-serialize,slow-tests slow |
| 89 | + test-nalgebra-macros: |
| 90 | + runs-on: ubuntu-latest |
| 91 | + steps: |
| 92 | + - uses: actions/checkout@v2 |
| 93 | + - name: test nalgebra-macros |
| 94 | + run: cargo test -p nalgebra-macros |
| 95 | + build-wasm: |
| 96 | + runs-on: ubuntu-latest |
| 97 | + # env: |
| 98 | + # RUSTFLAGS: -D warnings |
| 99 | + steps: |
| 100 | + - uses: actions/checkout@v2 |
| 101 | + - run: rustup target add wasm32-unknown-unknown |
| 102 | + - name: build nalgebra |
| 103 | + run: cargo build --verbose --target wasm32-unknown-unknown; |
| 104 | + - name: build nalgebra-glm |
| 105 | + run: cargo build -p nalgebra-glm --verbose --target wasm32-unknown-unknown; |
| 106 | + build-no-std: |
| 107 | + runs-on: ubuntu-latest |
| 108 | + steps: |
| 109 | + - uses: actions/checkout@v2 |
| 110 | + - name: Install latest nightly |
| 111 | + uses: actions-rs/toolchain@v1 |
| 112 | + with: |
| 113 | + toolchain: nightly |
| 114 | + override: true |
| 115 | + components: rustfmt |
| 116 | + - name: install xargo |
| 117 | + run: cp .github/Xargo.toml .; rustup component add rust-src; cargo install -f xargo; |
| 118 | + - name: build x86_64-unknown-linux-gnu |
| 119 | + run: xargo build --verbose --no-default-features --target=x86_64-unknown-linux-gnu; |
| 120 | + - name: build x86_64-unknown-linux-gnu --features rand-no-std |
| 121 | + run: xargo build --verbose --no-default-features --target=x86_64-unknown-linux-gnu; |
| 122 | + - name: build x86_64-unknown-linux-gnu --features alloc |
| 123 | + run: xargo build --verbose --no-default-features --features alloc --target=x86_64-unknown-linux-gnu; |
| 124 | + - name: build thumbv7em-none-eabihf |
| 125 | + run: xargo build --verbose --no-default-features --target=thumbv7em-none-eabihf; |
| 126 | + - name: build x86_64-unknown-linux-gnu nalgebra-glm |
| 127 | + run: xargo build --verbose --no-default-features -p nalgebra-glm --target=x86_64-unknown-linux-gnu; |
| 128 | + - name: build thumbv7em-none-eabihf nalgebra-glm |
| 129 | + run: xargo build --verbose --no-default-features -p nalgebra-glm --target=thumbv7em-none-eabihf; |
| 130 | + docs: |
| 131 | + runs-on: ubuntu-latest |
| 132 | + steps: |
| 133 | + - uses: actions/checkout@v2 |
| 134 | + - name: Generate documentation |
| 135 | + run: cargo doc |
0 commit comments