diff --git a/.cirrus.yml b/.cirrus.yml index 968e0ab..87698c6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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://github.com/raw/ararslan/CirrusCI.jl/master/bin/install.sh -o -)" diff --git a/.travis.yml b/.travis.yml index 1328ee5..0012315 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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())' diff --git a/Project.toml b/Project.toml index 1ec017c..a7b70dc 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/appveyor.yml b/appveyor.yml index a509137..532cefe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,7 @@ environment: matrix: - - julia_version: 1 + - julia_version: 1.3 + - julia_version: 1.4 - julia_version: nightly platform: @@ -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://github.com/raw/JuliaCI/Appveyor.jl/version-1/bin/install.ps1")) diff --git a/deps/build.jl b/deps/build.jl deleted file mode 100644 index ec363a2..0000000 --- a/deps/build.jl +++ /dev/null @@ -1,53 +0,0 @@ -# Build script by Mosè Giordano -# https://github.com/giordano/GSLBuilder.jl - -using BinaryProvider # requires BinaryProvider 0.3.0 or later - -# Parse some basic command-line arguments -const verbose = "--verbose" in ARGS -const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) -products = [ - # work around for https://github.com/JuliaPackaging/BinaryProvider.jl/issues/133 - LibraryProduct(prefix, [Sys.iswindows() ? "libgsl" : "libgsl."], :libgsl), - LibraryProduct(prefix, [Sys.iswindows() ? "libgslcblas" : "libgslcblas."], :libgslcblas), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/GSL_jll.jl/releases/download/GSL-v2.6.0+0" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc=:glibc) => ("$bin_prefix/GSL.v2.6.0.aarch64-linux-gnu.tar.gz", "07bf1a0f50692421e99f6325843b6beb2e02d12659cb4a316bd15cd414b03f46"), - Linux(:aarch64, libc=:musl) => ("$bin_prefix/GSL.v2.6.0.aarch64-linux-musl.tar.gz", "97619f82228e966f62881ab51ba83b52502df2cc57d94b78d3dac8c450cbd35c"), - Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/GSL.v2.6.0.arm-linux-gnueabihf.tar.gz", "6af7eb831a58e9422fadffe90d5590d4c3e946dc4ff69a2421ac87fff8467f4d"), - Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/GSL.v2.6.0.arm-linux-musleabihf.tar.gz", "d8e149d1d9c784186349cbfcf60eab854c99dbee35506a2b569bd12b0a01b8c6"), - Linux(:i686, libc=:glibc) => ("$bin_prefix/GSL.v2.6.0.i686-linux-gnu.tar.gz", "c56cdad16df1bf1e22c21a92ec30b88b06178eb7832f340eec5d1d5e3d1ed17a"), - Linux(:i686, libc=:musl) => ("$bin_prefix/GSL.v2.6.0.i686-linux-musl.tar.gz", "a6cbf55b8009a5f42f044adfe926f16f6ab8557ce3ba302467f3a059b1d7374c"), - Windows(:i686) => ("$bin_prefix/GSL.v2.6.0.i686-w64-mingw32.tar.gz", "5f6d1c8e04897e06d156a867caae2d630948128dca9122f3f46e96fcc7e70a8a"), - Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/GSL.v2.6.0.powerpc64le-linux-gnu.tar.gz", "457f4363377c73406964e5afb98db9bb6e66a1e2273babfe95df76d43d2e0550"), - MacOS(:x86_64) => ("$bin_prefix/GSL.v2.6.0.x86_64-apple-darwin14.tar.gz", "249506bd5780fec01ce8c86a7642b762092733a0524766241acb8743439b93b2"), - Linux(:x86_64, libc=:glibc) => ("$bin_prefix/GSL.v2.6.0.x86_64-linux-gnu.tar.gz", "a63a7ba98fa623bf304a13d03a217358ddc339326ebccb9656af3f505a3e5a87"), - Linux(:x86_64, libc=:musl) => ("$bin_prefix/GSL.v2.6.0.x86_64-linux-musl.tar.gz", "3a2e4fea75f1c9891c0fff37b5b960dcbb79be9f1eebcbcb6e28c5242496d1e1"), - FreeBSD(:x86_64) => ("$bin_prefix/GSL.v2.6.0.x86_64-unknown-freebsd11.1.tar.gz", "141f3cd1be872837bcd2f1cf787015af756f3b2b160bea96a5bf11437c3d7252"), - Windows(:x86_64) => ("$bin_prefix/GSL.v2.6.0.x86_64-w64-mingw32.tar.gz", "362e54af69f27311592b7b8d5f3e9c1231f8432fea8b802a658467d908dc5d39"), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -dl_info = choose_download(download_info, platform_key_abi()) -if dl_info === nothing && unsatisfied - # If we don't have a compatible .tar.gz to download, complain. - # Alternatively, you could attempt to install from a separate provider, - # build from source or something even more ambitious here. - error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!") -end - -# If we have a download, and we are unsatisfied (or the version we're -# trying to install is not itself installed) then load it up! -if unsatisfied || !isinstalled(dl_info...; prefix=prefix) - # Download and install binaries - install(dl_info...; prefix=prefix, force=true, verbose=verbose) -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose) diff --git a/src/GSL.jl b/src/GSL.jl index 39931c4..7a6941b 100644 --- a/src/GSL.jl +++ b/src/GSL.jl @@ -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") @@ -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)