Skip to content

Commit

Permalink
Merge pull request #104 from giordano/jll_pkg
Browse files Browse the repository at this point in the history
Use JLL package to provide GSL binary library
  • Loading branch information
ViralBShah authored Mar 31, 2020
2 parents b98c48d + f031c34 commit e2b9eb3
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ task:
name: FreeBSD
env:
matrix:
- JULIA_VERSION: 1.0
- JULIA_VERSION: 1.1
- JULIA_VERSION: 1.3
- JULIA_VERSION: 1.4
- JULIA_VERSION: nightly
install_script:
- sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)"
Expand Down
35 changes: 28 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
language: julia
os:
- linux
- osx
- linux
- osx
- windows
arch:
- x64
- x86
- arm64
julia:
- 1.0
- 1.1
- nightly
- 1.3
- 1.4
- nightly
jobs:
allow_failures:
- julia: nightly
exclude:
- os: osx
arch: x86
- os: osx
arch: arm64
- os: windows
arch: arm64
- julia: nightly
arch: arm64
notifications:
email: false
email: false

cache:
directories:
- $HOME/.julia/artifacts

after_success:
- julia -e 'using Pkg; Pkg.add("Coverage"); cd(Pkg.dir("GSL")); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())'
- julia -e 'using Pkg; Pkg.add("Coverage"); cd(Pkg.dir("GSL")); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())'
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ uuid = "92c85e6c-cbff-5e0c-80f7-495c94daaecd"
version = "0.6.0"

[deps]
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
GSL_jll = "1b77fbbe-d8ee-58f0-85f9-836ddc23a7a4"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"

[compat]
BinaryProvider = "^0.5.2"
SpecialFunctions = "^0.8.0"
julia = "^1.0.0"
SpecialFunctions = "0.8.0"
GSL_jll = "2.6"
julia = "1.3.0"

[extras]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
6 changes: 5 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
environment:
matrix:
- julia_version: 1
- julia_version: 1.3
- julia_version: 1.4
- julia_version: nightly

platform:
Expand All @@ -24,6 +25,9 @@ notifications:
on_build_failure: false
on_build_status_changed: false

cache:
- '%USERPROFILE%\.julia\artifacts'

install:
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

Expand Down
53 changes: 0 additions & 53 deletions deps/build.jl

This file was deleted.

16 changes: 6 additions & 10 deletions src/GSL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@ module GSL

using Markdown


# BEGIN MODULE C
# low-level interface
module C
# Deps
const depsfile = joinpath(dirname(@__DIR__), "deps", "deps.jl")
if isfile(depsfile)
include(depsfile)
else
error("GSL is not properly installed. Please build it first.")
end

using Markdown
using Libdl
using GSL_jll

const libgslcblas = joinpath(dirname(GSL_jll.libgsl_path),
"libgslcblas" * (Sys.iswindows() ? "-0." : "." ) * dlext)

# Generated code
include("gen/gsl_export.jl")
include("gen/gsl_types.jl")
Expand All @@ -24,8 +22,6 @@ include("gen/gsl_global_vars.jl")
include("error_handling.jl")

function __init__()
# Load library
check_deps()
# Seems we need to load BLAS with this RTLD_GLOBAL
flags = Libdl.RTLD_LAZY | Libdl.RTLD_DEEPBIND | Libdl.RTLD_GLOBAL
if Libdl.dlopen_e(libgslcblas, flags) in (C_NULL, nothing)
Expand Down

0 comments on commit e2b9eb3

Please sign in to comment.