Skip to content

Conv2D Layer Implementation and Tests #416

Conv2D Layer Implementation and Tests

Conv2D Layer Implementation and Tests #416

Workflow file for this run

name: core
on:
push:
branches:
- master
pull_request:
branches:
- master
paths-ignore:
- "**/README.md"
- "**/LICENSE"
- "**/CONTRIBUTING.md"
- "**/.gitignore"
- "**/.github/ISSUE_TEMPLATE/**"
- "**/.config/**"
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install Rust
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true
- name: Cache Cargo Dependencies
uses: actions/[email protected]
with:
path: |
~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Clippy
run: cargo clippy --all-targets
build:
name: Build
runs-on: ubuntu-latest
needs: clippy
steps:
- uses: actions/[email protected]
- name: Install Rust
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
- name: Cache Cargo Dependencies
uses: actions/[email protected]
with:
path: |
~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Project
run: cargo build --release
test:
name: Tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/[email protected]
- name: Install Rust
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
- name: Cache Cargo Dependencies
uses: actions/[email protected]
with:
path: |
~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Download and Cache Datasets
uses: actions/[email protected]
id: datasets-cache
with:
path: |
${{ github.workspace }}/.cache/dataset/cifar10
${{ github.workspace }}/.cache/dataset/cifar100
${{ github.workspace }}/.cache/dataset/imagenetv2
${{ github.workspace }}/.cache/dataset/mnist
key: ${{ runner.os }}-datasets-${{ hashFiles('**/Cargo.lock') }}
- name: Download Datasets
if: steps.datasets-cache.outputs.cache-hit != 'true'
run: |
mkdir -p .cache/dataset/cifar10
mkdir -p .cache/dataset/cifar100
mkdir -p .cache/dataset/imagenetv2
mkdir -p .cache/dataset/mnist
cd .cache/dataset
curl -L -o cifar10/cifar-10-binary.tar.gz https://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz
curl -L -o cifar100/cifar-100-binary.tar.gz https://www.cs.toronto.edu/~kriz/cifar-100-binary.tar.gz
curl -L -o imagenetv2/variant_0.tar.gz https://huggingface.co/datasets/vaishaal/ImageNetV2/resolve/main/imagenetv2-matched-frequency.tar.gz
curl -L -o mnist/train-images-idx3-ubyte.gz https://storage.googleapis.com/cvdf-datasets/mnist/train-images-idx3-ubyte.gz
curl -L -o mnist/train-labels-idx1-ubyte.gz https://storage.googleapis.com/cvdf-datasets/mnist/train-labels-idx1-ubyte.gz
curl -L -o mnist/t10k-images-idx3-ubyte.gz https://storage.googleapis.com/cvdf-datasets/mnist/t10k-images-idx3-ubyte.gz
curl -L -o mnist/t10k-labels-idx1-ubyte.gz https://storage.googleapis.com/cvdf-datasets/mnist/t10k-labels-idx1-ubyte.gz
- name: Run Tests
run: cargo test
coverage:
name: Code Coverage
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/[email protected]
- name: Install Rust
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
- name: Install Tarpaulin
run: cargo install cargo-tarpaulin
- name: Run Coverage
run: cargo tarpaulin --out Html
- name: Upload Coverage Report
uses: actions/[email protected]
with:
name: coverage-report
path: ./tarpaulin-report.html