Skip to content

Commit

Permalink
Add test JLL
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Dec 20, 2021
1 parent b68dc44 commit 72f6a5f
Show file tree
Hide file tree
Showing 60 changed files with 2,100 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/LAMMPS_jll/.pkg/platform_augmentation.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Base.BinaryPlatforms
using Preferences

function known_abis()
return (:MicrosoftMPI, :MPICH, :MPItrampoline)
end

const LAMMPS_UUID = parse(Base.UUID, "5b3ab26d-9607-527c-88ea-8fe5ba57cafe")

const abi = load_preference(LAMMPS_UUID, "abi", Sys.iswindows() ? :MicrosoftMPI : :MPICH)

function set_abi(abi)
if abi known_abis()
error("""
The MPI ABI $abi is not supported.
Please set the MPI ABI to one of the following:
$(known_abis())
""")
end
set_preferences!(LAMMPS_UUID, "abi" => string(abi), force=true)
@warn "The MPI abi has changed, you will need to restart Julia for the change to take effect" abi
return abi
end

function augment_platform!(platform)
BinaryPlatforms.add_tag!(platform.tags, "mpi", string(abi))
return platform
end




20 changes: 20 additions & 0 deletions test/LAMMPS_jll/.pkg/select_artifacts.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
empty!(Base.LOAD_PATH)
pushfirst!(Base.LOAD_PATH, "@stdlib")
pushfirst!(Base.LOAD_PATH, dirname(@__DIR__))

using TOML, Artifacts, Base.BinaryPlatforms
include("./platform_augmentation.jl")
artifacts_toml = joinpath(dirname(@__DIR__), "Artifacts.toml")

# Get "target triplet" from ARGS, if given (defaulting to the host triplet otherwise)
target_triplet = get(ARGS, 1, Base.BinaryPlatforms.host_triplet())

# Augment this platform object with any special tags we require
platform = augment_platform!(HostPlatform(parse(Platform, target_triplet)))

# Select all downloadable artifacts that match that platform
artifacts = select_downloadable_artifacts(artifacts_toml; platform)

#Output the result to `stdout` as a TOML dictionary
TOML.print(stdout, artifacts)

Loading

0 comments on commit 72f6a5f

Please sign in to comment.