Skip to content

Commit b8132d2

Browse files
committed
fixing CI
1 parent f29095e commit b8132d2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ jobs:
6666
cmake -S . -B build -DSLEEF_BUILD_QUAD:BOOL=ON -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
6767
cmake --build build/ --clean-first -j
6868
sudo cmake --install build --prefix /usr
69-
export SLEEF_PATH=/usr
7069
- name: Install quaddtype
7170
working-directory: quaddtype
7271
run: |
73-
LDFLAGS="-Wl,-rpath,/usr/lib" python -m pip install . -v --no-build-isolation -Cbuilddir=build -C'compile-args=-v' -Csetup-args="-Dbuildtype=debug"
72+
LDFLAGS="-Wl,-rpath,/usr/lib" python -m pip install . -v --no-build-isolation -Cbuilddir=build -C'compile-args=-v' -Csetup-args="-Dbuildtype=debug -Dsleef_path=/usr"
7473
- name: Run quaddtype tests
7574
working-directory: quaddtype
7675
run: |

quaddtype/meson.build

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,18 @@ if is_windows
2525
sleef_dep = declare_dependency(include_directories: include_directories(sleef_include_dir),
2626
dependencies: [sleef_lib, sleefquad_lib])
2727
else
28-
# Linux and macOS configuration
29-
sleef_path = run_command('bash', '-c', 'echo $SLEEF_PATH', check: false).stdout().strip()
28+
sleef_path = get_option('sleef_path')
29+
if sleef_path == ''
30+
sleef_path = run_command('bash', '-c', 'echo $SLEEF_PATH', check: false).stdout().strip()
31+
endif
3032
if sleef_path == ''
3133
sleef_path = run_command('bash', '-c', 'echo $CONDA_PREFIX', check: false).stdout().strip()
3234
endif
3335
if sleef_path == ''
34-
error('SLEEF_PATH or CONDA_PREFIX environment variable is not set')
36+
error('SLEEF_PATH or CONDA_PREFIX environment variable is not set, and sleef_path option is not provided')
3537
endif
3638

37-
add_project_link_arguments('-L' + sleef_path + '/lib', language: ['c', 'cpp'])
39+
message('Using SLEEF path: ' + sleef_path)
3840

3941
sleef_include_dir = sleef_path + '/include'
4042
sleef_library_dir = sleef_path + '/lib'
@@ -47,9 +49,10 @@ else
4749
endif
4850

4951
if not sleef_dep.found() or (not is_windows and not sleefquad_dep.found())
50-
error('SLEEF library not found. Please ensure it is installed in your conda environment.')
52+
error('SLEEF library not found. Please ensure it is installed in your conda environment or specify the correct path.')
5153
endif
5254

55+
5356
# Try to get NumPy include path from environment variable first
5457
if incdir_numpy == ''
5558
incdir_numpy = run_command(py,

0 commit comments

Comments
 (0)