From 5d9562f7d8de4f00113fdb553b4189a478099583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Tue, 23 Nov 2021 13:57:30 +0100 Subject: [PATCH] nalgebra-glm: add a cuda feature --- .github/workflows/nalgebra-ci-build.yml | 22 ++++++++++++---------- nalgebra-glm/Cargo.toml | 1 + 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/nalgebra-ci-build.yml b/.github/workflows/nalgebra-ci-build.yml index 80921551..362b30c3 100644 --- a/.github/workflows/nalgebra-ci-build.yml +++ b/.github/workflows/nalgebra-ci-build.yml @@ -29,8 +29,6 @@ jobs: # env: # RUSTFLAGS: -D warnings steps: - # Needed for the --all-features build which enables cuda support. - - uses: Jimver/cuda-toolkit@v0.2.4 - uses: actions/checkout@v2 - name: Build --no-default-feature run: cargo build --no-default-features; @@ -38,14 +36,20 @@ jobs: run: cargo build; - name: Build --features serde-serialize run: cargo build --features serde-serialize - - name: Build --all-features - run: cargo build --all-features; - - name: Build nalgebra-glm - run: cargo build -p nalgebra-glm --all-features; - 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: @@ -118,7 +122,5 @@ jobs: - uses: Jimver/cuda-toolkit@v0.2.4 - uses: actions/checkout@v2 - run: rustup target add nvptx64-nvidia-cuda - - name: build --no-default-features --features cuda - run: cargo build --no-default-features --features cuda - - name: build --no-default-features --features cuda --target=nvptx64-nvidia-cuda - run: cargo build --no-default-features --features cuda --target=nvptx64-nvidia-cuda \ No newline at end of file + - run: cargo build --no-default-features --features cuda + - run: cargo build --no-default-features --features cuda --target=nvptx64-nvidia-cuda \ No newline at end of file diff --git a/nalgebra-glm/Cargo.toml b/nalgebra-glm/Cargo.toml index edad31d7..cfe83bdc 100644 --- a/nalgebra-glm/Cargo.toml +++ b/nalgebra-glm/Cargo.toml @@ -22,6 +22,7 @@ std = [ "nalgebra/std", "simba/std" ] arbitrary = [ "nalgebra/arbitrary" ] serde-serialize = [ "nalgebra/serde-serialize-no-std" ] abomonation-serialize = [ "nalgebra/abomonation-serialize" ] +cuda = [ "nalgebra/cuda" ] # Conversion convert-mint = [ "nalgebra/mint" ]