feat: diffusion.cpp bindings #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
cargo-fmt: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Ubuntu build dependencies | |
run: apt update && apt install -y clang cmake | |
- name: Check Style | |
run: cargo fmt --check | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Ubuntu build dependencies | |
if: matrix.platform == 'ubuntu-latest' | |
run: apt update && apt install -y clang cmake | |
- name: Build | |
run: cargo build | |
build-metal: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Build | |
run: cargo build --features metal | |
build-cuda: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-22.04, windows-2019] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install cuda toolkit | |
uses: Jimver/[email protected] | |
- name: Install Windows dependencies | |
if: matrix.platform == 'windows-2019' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Ubuntu build dependencies | |
if: matrix.platform == 'ubuntu-22.04' | |
run: apt update && apt install -y clang cmake | |
- name: Build | |
env: | |
CUDA_COMPUTE_CAP: "75" | |
run: cargo build --features cublas | |