custos 0.7.0

A minimal OpenCL, WGPU, CUDA and host CPU array manipulation engine.
Documentation
name: Rust

on:
  push:
    branches: [ '**' ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable

    - uses: Swatinem/rust-cache@v1
    - name: Build
      run: cargo build --verbose --no-default-features
    - name: Build (opt-cache)
      run: cargo build --verbose --no-default-features --features opt-cache,cpu
    - name: Build (realloc)
      run: cargo build --verbose --no-default-features --features realloc,cpu
    - name: Build (stack)
      run: cargo build --verbose --no-default-features --features stack,cpu
      
  test:
  
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable

    - uses: Swatinem/rust-cache@v1

    - name: Run tests
      run: cargo test --verbose --no-default-features --features cpu

  test-realloc:
  
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable

    - uses: Swatinem/rust-cache@v1

    - name: Run 'realloc' tests
      run: cargo test --verbose --no-default-features --features realloc,cpu

  test-opt-cache:
  
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable

    - uses: Swatinem/rust-cache@v1

    - name: Run 'opt-cache' tests
      run: cargo test --verbose --no-default-features --features opt-cache,cpu

  test-stack:
  
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable

    - uses: Swatinem/rust-cache@v1

    - name: Run 'stack' tests
      run: cargo test --no-default-features --features stack,cpu

  test-static-api:
  
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable

    - uses: Swatinem/rust-cache@v1

    - name: Run 'static-api' tests
      run: cargo test --no-default-features --features static-api,cpu

  test-autograd:
  
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable

    - uses: Swatinem/rust-cache@v1

    - name: Run 'autograd' tests
      run: cargo test --no-default-features --features autograd,cpu,macro

  test-no-std:
  
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable

    - uses: Swatinem/rust-cache@v1

    - name: Run 'autograd' tests
      run: cargo test --no-default-features --features no-std
  

  miri:
    name: "Miri"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install Miri
        run: |
          rustup toolchain install nightly --component miri
          rustup override set nightly
          cargo miri setup
      - name: Test with Miri
        run: cargo miri test --no-default-features --features cpu
      - name: Test 'realloc' with Miri
        run: cargo miri test --no-default-features --features realloc,cpu
      - name: Test 'opt-cache' with Miri
        run: cargo miri test --no-default-features --features opt-cache,cpu
      - name: Test 'stack' with Miri
        run: cargo miri test --no-default-features --features stack,cpu
      - name: Test 'static-api' with Miri
        run: cargo miri test --no-default-features --features static-api,cpu
      - name: Test 'autograd' with Miri
        run: cargo miri test --no-default-features --features autograd,cpu,macro

#  bench:
#  
#    runs-on: ubuntu-latest
#    
#    steps:
#    - uses: actions/checkout@v3
#
#    - uses: actions-rs/toolchain@v1
#      with:
#        profile: minimal
#        toolchain: stable
#
#    - uses: Swatinem/rust-cache@v1
#
#    - name: Run benchmarks
#      run: cargo bench --verbose --no-default-features