Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FMUComplianceChecker] Add builder #4284

Merged
merged 19 commits into from
Jan 21, 2022
Merged
Changes from 2 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
54 changes: 54 additions & 0 deletions F/FMUComplianceChecker/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "FMUComplianceChecker"
version = v"2.0.4"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/modelica-tools/FMUComplianceChecker/releases/download/2.0.4/FMUChecker-2.0.4-linux64.zip", "02f6d1a175fe4c51d5840ef40fcd05ca7fb3ceec170d7825d9c946d75eae12eb"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ArchiveSource("https://github.com/modelica-tools/FMUComplianceChecker/releases/download/2.0.4/FMUChecker-2.0.4-linux64.zip", "02f6d1a175fe4c51d5840ef40fcd05ca7fb3ceec170d7825d9c946d75eae12eb"),
ArchiveSource("https://github.com/modelica-tools/FMUComplianceChecker/releases/download/$(version)/FMUChecker-$(version)-linux64.zip", "02f6d1a175fe4c51d5840ef40fcd05ca7fb3ceec170d7825d9c946d75eae12eb"),

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this binary would work on a Musl-based system

ArchiveSource("https://github.com/modelica-tools/FMUComplianceChecker/releases/download/2.0.4/FMUChecker-2.0.4-win64.zip", "4932a46624a7ff84235bb49df7827c7b03684f6d67318ad272bd25548cb1dc8f")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
mkdir ${bindir}/

if [[ "${target}" == *linux* ]]; then
cd FMUChecker-2.0.4-linux64/
mv ./fmuCheck.linux64 ${bindir}/fmuCheck
chmod +x ${bindir}/*
fi

if [[ "${target}" == *mingw* ]]; then
cd FMUChecker-2.0.4-win64/
mv ./fmuCheck.win64.exe ${bindir}/fmuCheck.exe
fi

LIC_DIR="${prefix}/share/licenses/${SRC_NAME}"
mkdir -p "${LIC_DIR}"
mv "./LICENCE.md" "${LIC_DIR}/LICENSE.md"
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Platform("x86_64", "windows"; ),
Platform("x86_64", "linux"; libc = "glibc"),
Platform("x86_64", "linux"; libc = "musl")
]


# The products that we will ensure are always built
products = [
LibraryProduct("fmuCheck", :libFMUCheck)
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")