Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Split builds across multiple travis jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Dec 2, 2017
1 parent 5497e7d commit c735966
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ cache:
env:
global:
- BINARYBUILDER_DOWNLOADS_CACHE=downloads
# Our build takes so long, we split the targets across multiple runs in our matrix
matrix:
- TARGET=x86_64-linux-gnu
- TARGET=i686-linux-gnu
- TARGET=aarch64-linux-gnu
- TARGET=arm-linux-gnueabihf
- TARGET=powerpc64le-linux-gnu
- TARGET=x86_64-apple-darwin14
- TARGET=x86_64-w64-mingw32
- TARGET=i686-w64-mingw32
sudo: required

# Before anything else, get the latest versions of things
Expand All @@ -21,7 +31,7 @@ before_script:
- julia -e 'Pkg.clone("https://github.com/JuliaPackaging/BinaryBuilder.jl"); Pkg.build()'

script:
- julia build_tarballs.jl
- julia --color=yes build_tarballs.jl $TARGET

deploy:
provider: releases
Expand Down
10 changes: 9 additions & 1 deletion build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ platform_data = Dict(k => (v[1] * " CROSS_SUFFIX=$(triplet(k))- ", v[2]) for (k,
# Add common_flags to each platform
platform_data = Dict(k => (v[1] * common_flags, v[2]) for (k, v) in platform_data)

for platform in keys(platform_data)
# Choose which platforms to build for; if we've got an argument use that one,
# otherwise default ot just building all of them!
build_platforms = keys(platform_data)
if length(ARGS) > 0
build_platforms = platform_key.(split(ARGS[1], ","))
end

println("Building for $(triplet.(build_platforms))")
for platform in build_platforms
platform_flags, libname = platform_data[platform]

# Construct our script
Expand Down

0 comments on commit c735966

Please sign in to comment.