Add EIGENRAND_BUILD_BENCHMARK cmake option #93
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: Pull Request Test | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_linux: | |
name: Build for linux | |
if: "!contains(github.event.head_commit.message, '[skip linux]')" | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
max-parallel: 4 | |
fail-fast: false | |
matrix: | |
arch: [DEIGEN_DONT_VECTORIZE, msse2, mssse3, mavx, mavx2] | |
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0] | |
os: [ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
git clone https://gitlab.com/libeigen/eigen | |
pushd eigen | |
git checkout tags/${{ matrix.eigenversion }} | |
popd | |
mv eigen include | |
- name: Build | |
continue-on-error: true | |
run: | | |
cmake --preset default -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }}" | |
cmake --build --preset default | |
ctest --preset default -N | |
- name: Tests | |
run: | | |
ctest --preset default -R test | |
ctest --preset default -R accuracy | |
build_linux_avx512: | |
name: Build for linux AVX512 | |
if: "!contains(github.event.head_commit.message, '[skip avx]')" | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
max-parallel: 4 | |
matrix: | |
arch: [mavx512dq] | |
eigenversion: [3.4.0] | |
os: [ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
git clone https://gitlab.com/libeigen/eigen | |
pushd eigen | |
git checkout tags/${{ matrix.eigenversion }} | |
popd | |
mv eigen include | |
- name: Build | |
continue-on-error: true | |
run: | | |
cmake --preset default -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }}" | |
cmake --build --preset default | |
ctest --preset default -N | |
- name: Tests | |
run: | | |
ctest --preset default -R test | |
ctest --preset default -R accuracy | |
build_macos: | |
name: Build for macOS | |
if: "!contains(github.event.head_commit.message, '[skip macos]')" | |
runs-on: macOS-latest | |
continue-on-error: true | |
strategy: | |
max-parallel: 4 | |
matrix: | |
arch: [DEIGEN_DONT_VECTORIZE, msse2, mssse3, mavx] | |
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
wget https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz | |
tar -zxvf eigen-${{ matrix.eigenversion }}.tar.gz | |
mv eigen-${{ matrix.eigenversion }} include | |
- name: Build | |
continue-on-error: true | |
run: | | |
cmake --preset default -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }}" | |
cmake --build --preset default | |
ctest --preset default -N | |
- name: Tests | |
run: | | |
ctest --preset default -R test | |
ctest --preset default -R accuracy | |
build_windows: | |
name: Build for Windows | |
if: "!contains(github.event.head_commit.message, '[skip windows]')" | |
runs-on: windows-latest | |
continue-on-error: true | |
strategy: | |
max-parallel: 4 | |
matrix: | |
arch: ['/D EIGEN_DONT_VECTORIZE', '/arch:SSE2', '/arch:AVX', '/arch:AVX2'] | |
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
Invoke-WebRequest -OutFile eigen.tar.gz https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz | |
tar -zxvf eigen.tar.gz | |
mv eigen-${{ matrix.eigenversion }} include | |
echo "EIGEN_PATH=$(Get-Location)\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
- name: Build | |
continue-on-error: true | |
run: | | |
cmake --preset windows -DEIGENRAND_CXX_FLAGS="${{ matrix.arch }}" | |
cmake --build --preset windows | |
ctest --preset windows -N | |
- name: Tests | |
run: | | |
ctest --preset windows -R test | |
ctest --preset windows -R accuracy | |
build_windows_avx512: | |
name: Build for Windows | |
if: "!contains(github.event.head_commit.message, '[skip windows-avx]')" | |
runs-on: windows-latest | |
continue-on-error: true | |
strategy: | |
max-parallel: 4 | |
matrix: | |
arch: ['/arch:AVX512 /bigobj'] | |
eigenversion: [3.4.0] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
Invoke-WebRequest -OutFile eigen.tar.gz https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz | |
tar -zxvf eigen.tar.gz | |
mv eigen-${{ matrix.eigenversion }} include | |
echo "EIGEN_PATH=$(Get-Location)\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
- name: Build | |
continue-on-error: true | |
run: | | |
cmake --preset windows -DEIGENRAND_CXX_FLAGS="${{ matrix.arch }}" | |
cmake --build --preset windows | |
ctest --preset windows -N | |
- name: Tests | |
run: | | |
ctest --preset windows -R test | |
ctest --preset windows -R accuracy | |
reference: | |
name: Reference | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 4 | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python3 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
architecture: x64 | |
- name: Test Reference | |
run: | | |
pip install scipy | |
python benchmark/comp_scipy.py |