Skip to content

Commit 4aae2af

Browse files
committed
linux test
1 parent 75ca73b commit 4aae2af

1 file changed

Lines changed: 60 additions & 58 deletions

File tree

.github/workflows/build.yaml

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -10,80 +10,82 @@ env:
1010
CXXFLAGS: "-std=c++17"
1111

1212
jobs:
13-
build-macos:
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
os: [ macos-13, macos-14 ]
18-
backends: [ ruy, openblas, accelerate ]
19-
openmp: [ "", openmp ]
20-
exclude:
21-
- os: macos-13
22-
backends: openblas
23-
openmp: ""
24-
- os: macos-14
25-
backends: openblas
26-
openmp: ""
27-
runs-on: ${{ matrix.os }}
28-
29-
steps:
30-
- name: Install OpenBLAS
31-
if: ${{ matrix.backends == 'openblas' }}
32-
run: |
33-
brew install openblas
34-
PREFIX=$(brew --prefix openblas)
35-
echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV
36-
echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV
37-
- name: Install OpenMP
38-
if: ${{ matrix.openmp == 'openmp' }}
39-
run: |
40-
brew install libomp
41-
PREFIX=$(brew --prefix libomp)
42-
echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV
43-
echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV
44-
- uses: actions/checkout@v4
45-
with:
46-
submodules: recursive
47-
- uses: dtolnay/rust-toolchain@stable
48-
- uses: Swatinem/rust-cache@v2
49-
- name: Build
50-
run: cargo build -vv --no-default-features -F "${{ matrix.backends }} ${{ matrix.openmp }}"
51-
- name: Run tests
52-
run: cargo test -vv --no-default-features -F "${{ matrix.backends }} ${{ matrix.openmp }}"
53-
54-
# build-linux:
13+
# build-macos:
5514
# strategy:
5615
# fail-fast: false
5716
# matrix:
58-
# feature: [ ruy, mkl, openblas ]
59-
# runs-on: ubuntu-latest
17+
# os: [ macos-13, macos-14 ]
18+
# backends: [ ruy, openblas, accelerate ]
19+
# openmp: [ "", openmp ]
20+
# exclude:
21+
# - os: macos-13
22+
# backends: openblas
23+
# - os: macos-14
24+
# backends: openblas
25+
# openmp: ""
26+
# runs-on: ${{ matrix.os }}
6027
#
6128
# steps:
62-
# - name: Install MKL
63-
# if: ${{ matrix.feature == 'mkl' }}
64-
# run: |
65-
# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
66-
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
67-
# sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
68-
# sudo apt-get update
69-
# sudo apt-get install -y intel-mkl-64bit-2020.4-912
7029
# - name: Install OpenBLAS
71-
# if: ${{ matrix.feature == 'openblas' }}
30+
# if: ${{ matrix.backends == 'openblas' }}
7231
# run: |
73-
# sudo apt-get update
74-
# sudo apt-get install -y cmake libclang-dev libopenblas-dev
32+
# brew install openblas
33+
# PREFIX=$(brew --prefix openblas)
34+
# echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV
35+
# echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV
36+
# - name: Install OpenMP
37+
# if: ${{ matrix.openmp == 'openmp' }}
38+
# run: |
39+
# brew install libomp
40+
# PREFIX=$(brew --prefix libomp)
41+
# echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV
42+
# echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV
7543
# - uses: actions/checkout@v4
7644
# with:
7745
# submodules: recursive
7846
# - uses: dtolnay/rust-toolchain@stable
7947
# - uses: Swatinem/rust-cache@v2
8048
# - name: Build
81-
# run: cargo build -vv --no-default-features -F "${{ matrix.feature }}"
49+
# run: cargo build -vv --no-default-features -F "${{ matrix.backends }} ${{ matrix.openmp }}"
50+
# - name: Run tests
51+
# run: cargo test -vv --no-default-features -F "${{ matrix.backends }} ${{ matrix.openmp }}"
52+
53+
build-linux:
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
feature: [ ruy, mkl, openblas ]
58+
runs-on: ubuntu-latest
59+
env:
60+
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu
61+
62+
steps:
63+
- name: Install MKL
64+
if: ${{ matrix.feature == 'mkl' }}
65+
run: |
66+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
67+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
68+
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
69+
sudo apt-get update
70+
sudo apt-get install -y intel-mkl-64bit-2020.4-912
71+
pkg-config intel-mkl-64bit-2020.4-912
72+
- name: Install OpenBLAS
73+
if: ${{ matrix.feature == 'openblas' }}
74+
run: |
75+
sudo apt-get update
76+
sudo apt-get install -y cmake libclang-dev libopenblas-dev
77+
- uses: actions/checkout@v4
78+
with:
79+
submodules: recursive
80+
- uses: dtolnay/rust-toolchain@stable
81+
- uses: Swatinem/rust-cache@v2
82+
- name: Build
83+
run: cargo build -vv --no-default-features -F "${{ matrix.feature }}"
8284
# env:
8385
# LIBRARY_PATH: /usr/lib/x86_64-linux-gnu
8486
# CXXFLAGS: -std=c++17
85-
# - name: Run tests
86-
# run: cargo test -vv --no-default-features -F "${{ matrix.feature }}"
87+
- name: Run tests
88+
run: cargo test -vv --no-default-features -F "${{ matrix.feature }}"
8789
# env:
8890
# LIBRARY_PATH: /usr/lib/x86_64-linux-gnu
8991
# LD_LIBRARY_PATH: /opt/intel/lib/intel64

0 commit comments

Comments
 (0)