Support ARM builds on Travis CI
This commit is contained in:
parent
ab55313ee9
commit
206b7e9ade
@ -30,6 +30,7 @@ end
|
||||
osx=true,
|
||||
windows=true,
|
||||
x86=false,
|
||||
arm=false,
|
||||
coverage=true,
|
||||
extra_versions=$DEFAULT_CI_VERSIONS,
|
||||
)
|
||||
@ -43,6 +44,7 @@ Integrates your packages with [Travis CI](https://travis-ci.com).
|
||||
- `windows::Bool`: Whether or not to run builds on Windows.
|
||||
- `x86::Bool`: Whether or not to run builds on 32-bit systems,
|
||||
in addition to the default 64-bit builds.
|
||||
- `arm::Bool`: Whether or not to run builds on the ARM architecture, in addition to AMD64.
|
||||
- `coverage::Bool`: Whether or not to publish code coverage.
|
||||
Another code coverage plugin such as [`Codecov`](@ref) must also be included.
|
||||
$EXTRA_VERSIONS_DOC
|
||||
@ -53,6 +55,7 @@ $EXTRA_VERSIONS_DOC
|
||||
osx::Bool = true
|
||||
windows::Bool = true
|
||||
x86::Bool = false
|
||||
arm::Bool = false
|
||||
coverage::Bool = true
|
||||
extra_versions::Vector = DEFAULT_CI_VERSIONS
|
||||
end
|
||||
@ -75,11 +78,16 @@ function view(p::TravisCI, t::Template, pkg::AbstractString)
|
||||
versions = collect_versions(t, p.extra_versions)
|
||||
allow_failures = filter(in(versions), ALLOWED_FAILURES)
|
||||
|
||||
x86 = Dict{String, String}[]
|
||||
jobs = Dict{String, String}[]
|
||||
if p.x86
|
||||
foreach(versions) do v
|
||||
p.linux && push!(x86, Dict("JULIA" => v, "OS" => "linux"))
|
||||
p.windows && push!(x86, Dict("JULIA" => v, "OS" => "windows"))
|
||||
p.linux && push!(jobs, Dict("JULIA" => v, "OS" => "linux", "ARCH" => "x86"))
|
||||
p.windows && push!(jobs, Dict("JULIA" => v, "OS" => "windows", "ARCH" => "x86"))
|
||||
end
|
||||
end
|
||||
if p.arm
|
||||
foreach(versions) do v
|
||||
p.linux && push!(jobs, Dict("JULIA" => v, "OS" => "linux", "ARCH" => "arm64"))
|
||||
end
|
||||
end
|
||||
|
||||
@ -90,13 +98,13 @@ function view(p::TravisCI, t::Template, pkg::AbstractString)
|
||||
"HAS_COVERAGE" => p.coverage && hasplugin(t, is_coverage),
|
||||
"HAS_COVERALLS" => hasplugin(t, Coveralls),
|
||||
"HAS_DOCUMENTER" => hasplugin(t, Documenter{TravisCI}),
|
||||
"HAS_JOBS" => p.x86 || hasplugin(t, Documenter{TravisCI}),
|
||||
"HAS_JOBS" => !isempty(jobs) || hasplugin(t, Documenter{TravisCI}),
|
||||
"OS" => os,
|
||||
"PKG" => pkg,
|
||||
"USER" => t.user,
|
||||
"VERSION" => format_version(t.julia),
|
||||
"VERSIONS" => versions,
|
||||
"X86" => x86,
|
||||
"JOBS" => jobs,
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -21,11 +21,11 @@ jobs:
|
||||
{{#HAS_JOBS}}
|
||||
include:
|
||||
{{/HAS_JOBS}}
|
||||
{{#X86}}
|
||||
{{#JOBS}}
|
||||
- julia: {{{JULIA}}}
|
||||
os: {{{OS}}}
|
||||
arch: x86
|
||||
{{/X86}}
|
||||
arch: {{{ARCH}}}
|
||||
{{/JOBS}}
|
||||
{{#HAS_DOCUMENTER}}
|
||||
- stage: Documentation
|
||||
julia: {{{VERSION}}}
|
||||
|
6
test/fixtures/WackyOptions/.travis.yml
vendored
6
test/fixtures/WackyOptions/.travis.yml
vendored
@ -17,3 +17,9 @@ jobs:
|
||||
- julia: 1.2
|
||||
os: linux
|
||||
arch: x86
|
||||
- julia: 1.1
|
||||
os: linux
|
||||
arch: arm64
|
||||
- julia: 1.2
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
@ -45,7 +45,13 @@ end
|
||||
License(; name="ISC"),
|
||||
Readme(; inline_badges=true),
|
||||
Tests(; project=true),
|
||||
TravisCI(; coverage=false, windows=false, x86=true, extra_versions=["1.1"]),
|
||||
TravisCI(;
|
||||
coverage=false,
|
||||
windows=false,
|
||||
x86=true,
|
||||
arm=true,
|
||||
extra_versions=["1.1"],
|
||||
),
|
||||
])
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user