OpenBLAS test on Windows #139
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- uses: actions/checkout@v4 | |
- uses: dprint/check@v2.2 | |
- uses: pre-commit/action@v3.0.1 | |
build-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, macos-14] | |
backend: [ruy, accelerate] | |
feature: ["", "flash-attention"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install OpenBLAS | |
if: ${{ matrix.backend == 'openblas' }} | |
run: | | |
brew install openblas | |
PREFIX=$(brew --prefix openblas) | |
echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build -vv --no-default-features -F "whisper,hub,${{ matrix.backend }},${{ matrix.feature }}" | |
- name: Run tests | |
run: cargo test -vv --no-default-features -F "whisper,hub,${{ matrix.backend }},${{ matrix.feature }}" -- --include-ignored | |
build-linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
backend: [ruy, mkl, openblas] | |
feature: ["", "flash-attention"] | |
runs-on: ubuntu-latest | |
env: | |
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu | |
steps: | |
- name: Install MKL | |
if: ${{ matrix.backend == 'mkl' }} | |
run: | | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' | |
sudo apt-get update | |
sudo apt-get install -y intel-mkl-64bit-2020.4-912 | |
echo "LD_LIBRARY_PATH=/opt/intel/lib/intel64:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
- name: Install OpenBLAS | |
if: ${{ matrix.backend == 'openblas' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake libclang-dev libopenblas-dev | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build -vv --no-default-features -F "whisper,hub,${{ matrix.backend }},${{ matrix.feature }}" | |
- name: Run tests | |
run: cargo test -vv --no-default-features -F "whisper,hub,${{ matrix.backend }},${{ matrix.feature }}" -- --include-ignored | |
if: ${{ matrix.backend != 'mkl' }} | |
build-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
backend: [openblas, ruy] | |
feature: ["", "flash-attention"] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/cache@v4 | |
with: | |
path: C:/vcpkg/installed | |
key: cache-vcpkg-packages | |
- name: Install OpenBLAS | |
if: ${{ matrix.backend == 'openblas' }} | |
run: | | |
vcpkg install openblas:x64-windows-static | |
Remove-Item -Recurse -Force "$env:VCPKG_INSTALLATION_ROOT/downloads" | |
echo "CMAKE_INCLUDE_PATH=$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows-static/include/openblas;$env:CMAKE_INCLUDE_PATH" >> $env:GITHUB_ENV | |
echo "CMAKE_LIBRARY_PATH=$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows-static/lib;$env:CMAKE_LIBRARY_PATH" >> $env:GITHUB_ENV | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build -vv --no-default-features -F "whisper,hub,${{ matrix.backend }},${{ matrix.feature }}" | |
- name: Run tests | |
run: cargo test -vv --no-default-features -F "whisper,hub,${{ matrix.backend }},${{ matrix.feature }}" -- --include-ignored --test-threads=1 |