Skip to content

Commit

Permalink
Add autogenerated files to build umat_binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
TeroFrondelius committed Oct 11, 2019
1 parent 9193ac1 commit 30d2711
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
products/
downloads/
build/
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
language: julia
os:
- linux
julia:
- 1.0
notifications:
email: false
git:
depth: 99999999
cache:
timeout: 1000
directories:
- downloads
env:
global:
- BINARYBUILDER_DOWNLOADS_CACHE=downloads
- BINARYBUILDER_AUTOMATIC_APPLE=false
sudo: required

# Before anything else, get the latest versions of things
before_script:
- julia -e 'using Pkg; pkg"add BinaryProvider"; pkg"add BinaryBuilder#master"; Pkg.build()'

script:
- julia build_tarballs.jl


deploy:
provider: releases
api_key:
# Note; this api_key is only valid for TeroFrondelius/umat_binaries_builder; you need
# to make your own: https://docs.travis-ci.com/user/deployment/releases/
secure: dhN4pop/DhUHXhQnjcnLXhFO9eM5YO10y+jceaGh8oCkKtYb3L5j9HBgTzrUe0obTYU53zmspeeg04G3vL5Mq6LbDaH0579J/n9YvaFfXrWSBCHnU2C7TwYwo9W5OyH+5I6IaJg1xCJhFPYwwbfd96fQ8dxreG+WTweQL8FuvoFt9eRC10qbxSgtYu2s6LvwXdiOjSfQyJ8m3v71zxBhfQ8Pa9xfvJz+HYlk0FfXZnN89RNB+03uM4uPtvrmU4HzV2rZjFqZ3UPnZt0wYnu91aWnFwC5Enrn2TM4ToPSSBBSQ7+fWX4gV+ZsN8NbdUr5AP0fnwn5e0PGOpXkfTiIV4HA7BVBdDvcspiJFZ/FBiimCN9ea2QFx4Pe0kweoBEvfesjf0pKT594ZTVyWyNCylfqKDCNauuPV+5TSa47g+CQufPxrburGE3ScZwTtJB1ePhGLSnXauXjmNfseLfTcW+R7Il5jmCPVGUrrR6txrlWfnEb2gAqx+7eTOIfhEUto3cQNe3OX9jOzZ0BXY9FRMlg2Ie9PFeDWIwpa1IkQ6pYjl7uf/9HwRFeyLeOm+eCCRk0fh2I+Scyk8AS1cMiaq4NsExA/K9kfR1pJV+9s6cXUm9HVZT6TANUW0V1yft7r8ZKy//9knxkei7ChJSV0HpHvDUYlaSle/ghZt3nQAE=
file_glob: true
file: products/*
skip_cleanup: true
on:
repo: TeroFrondelius/umat_binaries_builder
tags: true
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# umat_binaries_builder

[![Build Status](https://travis-ci.org/TeroFrondelius/umat_binaries_builder.svg?branch=master)](https://travis-ci.org/TeroFrondelius/umat_binaries_builder)

This repository builds binary artifacts for the umat_binaries project. Binary artifacts are automatically uploaded to
[this repository's GitHub releases page](https://github.com/TeroFrondelius/umat_binaries_builder/releases) whenever a tag is created
on this repository.

This repository was created using [BinaryBuilder.jl](https://github.com/JuliaPackaging/BinaryBuilder.jl)
66 changes: 66 additions & 0 deletions build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder

name = "umat_binaries"
version = v"0.1.0"

# Collection of sources required to build umat_binaries
sources = [
"https://raw.githubusercontent.com/KratosMultiphysics/Kratos/master/applications/constitutive_laws_application/custom_external_libraries/umat/mises_umat.f" =>
"bfb0f46ae0c9cef0cc91c1dbf78943dd7afd24a5a757dd3224ed66cdd71e7ec6",

"https://raw.githubusercontent.com/KratosMultiphysics/Kratos/master/applications/constitutive_laws_application/custom_external_libraries/umat/ABA_PARAM.INC" =>
"b7d74a332dda559e06720db8b7f907aedb72f58b8ed957c7c67ba7007a8e93a8",

]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
cat >CMakeLists.txt <<EOL
cmake_minimum_required(VERSION 3.5)
project(Umat)
set(VERSION 0.1.0)
enable_language(Fortran)
set(SOURCE_FILES mises_umat.f)
set(LIBRARY_NAME mises_umat)
add_library(\${LIBRARY_NAME} SHARED \${SOURCE_FILES})
install(TARGETS mises_umat DESTINATION lib)
EOL
cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=/opt/$target/$target.toolchain
make
make install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:i686, libc=:glibc),
Linux(:x86_64, libc=:glibc),
Linux(:aarch64, libc=:glibc),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Linux(:powerpc64le, libc=:glibc),
Linux(:i686, libc=:musl),
Linux(:x86_64, libc=:musl),
Linux(:aarch64, libc=:musl),
Linux(:armv7l, libc=:musl, call_abi=:eabihf),
FreeBSD(:x86_64)
]

# The products that we will ensure are always built
products(prefix) = [
LibraryProduct(prefix, "libmises_umat", :mises_umat)
]

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

]

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

0 comments on commit 30d2711

Please sign in to comment.