Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: QuadBLAS Testing

on:
push:
branches: [ ci ]
pull_request:
workflow_dispatch:

jobs:
test-ubuntu:
name: Test Ubuntu
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential libomp-dev

- name: Build SLEEF
run: |
git clone --branch 3.8 --depth 1 https://github.com/shibatch/sleef.git
cd sleef
cmake -S . -B build -DSLEEF_BUILD_QUAD=ON -DSLEEF_BUILD_SHARED_LIBS=ON
cmake --build build --parallel $(nproc)
sudo cmake --install build --prefix /usr/local

- name: Build QuadBLAS
env:
SLEEF_ROOT: /usr/local
run: |
mkdir build && cd build
cmake ..
make -j$(nproc)

- name: Run tests
run: |
cd build
./quadblas_test

test-macos:
name: Test macOS ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14]

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
brew install cmake libomp

- name: Install SLEEF
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
run: |
git clone --branch 3.8 --depth 1 https://github.com/shibatch/sleef.git
cd sleef
cmake -S . -B build \
-DSLEEF_BUILD_QUAD=ON \
-DSLEEF_BUILD_SHARED_LIBS=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DCMAKE_INSTALL_RPATH="@loader_path/../lib" \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
cmake --build build --clean-first -j
sudo cmake --install build --prefix /usr/local

- name: Build QuadBLAS
env:
SLEEF_ROOT: /usr/local
DYLD_LIBRARY_PATH: "/usr/local/lib:$DYLD_LIBRARY_PATH"
run: |
mkdir build && cd build
cmake ..
make -j$(sysctl -n hw.ncpu)

- name: Run tests
env:
DYLD_LIBRARY_PATH: "/usr/local/lib:$DYLD_LIBRARY_PATH"
run: |
cd build
./quadblas_test
5 changes: 5 additions & 0 deletions include/quadblas/core/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@
// SLEEF includes
#include <sleefquad.h>

// Compatibility for SLEEF_QUAD_C macro
#ifndef SLEEF_QUAD_C
#define SLEEF_QUAD_C(x) Sleef_cast_from_doubleq1(x)
#endif

#endif // QUADBLAS_CORE_PLATFORM_HPP
Loading