Merge pull request #32 from jkawamoto/ruy #101
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: Rust library | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-13, macos-14 ] | |
feature: [ "", mkl, openblas ] | |
exclude: | |
- os: macos-13 | |
feature: mkl | |
- os: macos-14 | |
feature: mkl | |
- os: macos-13 | |
feature: openblas | |
- os: macos-14 | |
feature: openblas | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install MKL | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.feature == '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 | |
- name: Install OpenBLAS | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.feature == '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 -F "${{ matrix.feature }}" | |
env: | |
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu | |
CXXFLAGS: -std=c++17 | |
- name: Run tests | |
run: cargo test -vv -F "${{ matrix.feature }}" | |
env: | |
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu | |
LD_LIBRARY_PATH: /opt/intel/lib/intel64 |