Don't include versions lower than the minimum in CI suites (#190)
This commit is contained in:
parent
5f22493a03
commit
f61215823a
@ -394,6 +394,15 @@ This is useful for creating lists of versions to be included in CI configuration
|
|||||||
function collect_versions(t::Template, versions::Vector)
|
function collect_versions(t::Template, versions::Vector)
|
||||||
custom = map(v -> v isa VersionNumber ? format_version(v) : string(v), versions)
|
custom = map(v -> v isa VersionNumber ? format_version(v) : string(v), versions)
|
||||||
vs = map(v -> lstrip(v, 'v'), [format_version(t.julia); custom])
|
vs = map(v -> lstrip(v, 'v'), [format_version(t.julia); custom])
|
||||||
|
filter!(vs) do v
|
||||||
|
# Throw away any versions lower than the template's minimum.
|
||||||
|
try
|
||||||
|
VersionNumber(v) >= t.julia
|
||||||
|
catch e
|
||||||
|
e isa ArgumentError || rethrow()
|
||||||
|
true
|
||||||
|
end
|
||||||
|
end
|
||||||
return sort(unique(vs))
|
return sort(unique(vs))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
1
test/fixtures/WackyOptions/.appveyor.yml
vendored
1
test/fixtures/WackyOptions/.appveyor.yml
vendored
@ -1,7 +1,6 @@
|
|||||||
# Documentation: https://github.com/JuliaCI/Appveyor.jl
|
# Documentation: https://github.com/JuliaCI/Appveyor.jl
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- julia_version: 1.1
|
|
||||||
- julia_version: 1.2
|
- julia_version: 1.2
|
||||||
platform:
|
platform:
|
||||||
- x64
|
- x64
|
||||||
|
2
test/fixtures/WackyOptions/.cirrus.yml
vendored
2
test/fixtures/WackyOptions/.cirrus.yml
vendored
@ -5,8 +5,8 @@ task:
|
|||||||
artifacts_cache:
|
artifacts_cache:
|
||||||
folder: ~/.julia/artifacts
|
folder: ~/.julia/artifacts
|
||||||
env:
|
env:
|
||||||
JULIA_VERSION: 1.1
|
|
||||||
JULIA_VERSION: 1.2
|
JULIA_VERSION: 1.2
|
||||||
|
JULIA_VERSION: 1.3
|
||||||
install_script:
|
install_script:
|
||||||
- sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)"
|
- sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)"
|
||||||
build_script:
|
build_script:
|
||||||
|
2
test/fixtures/WackyOptions/.drone.star
vendored
2
test/fixtures/WackyOptions/.drone.star
vendored
@ -1,7 +1,7 @@
|
|||||||
def main(ctx):
|
def main(ctx):
|
||||||
pipelines = []
|
pipelines = []
|
||||||
for arch in ["arm", "arm64"]:
|
for arch in ["arm", "arm64"]:
|
||||||
for julia in ["1.1", "1.2"]:
|
for julia in ["1.2", "1.3"]:
|
||||||
pipelines.append(pipeline(arch, julia))
|
pipelines.append(pipeline(arch, julia))
|
||||||
return pipelines
|
return pipelines
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- '1.0'
|
|
||||||
- '1.2'
|
- '1.2'
|
||||||
- '1.4'
|
- '1.4'
|
||||||
- 'nightly'
|
- 'nightly'
|
||||||
|
4
test/fixtures/WackyOptions/.gitlab-ci.yml
vendored
4
test/fixtures/WackyOptions/.gitlab-ci.yml
vendored
@ -5,10 +5,6 @@
|
|||||||
using Pkg
|
using Pkg
|
||||||
Pkg.build()
|
Pkg.build()
|
||||||
Pkg.test()'
|
Pkg.test()'
|
||||||
Julia 0.6:
|
|
||||||
image: julia:0.6
|
|
||||||
extends:
|
|
||||||
- .script
|
|
||||||
Julia 1.2:
|
Julia 1.2:
|
||||||
image: julia:1.2
|
image: julia:1.2
|
||||||
extends:
|
extends:
|
||||||
|
1
test/fixtures/WackyOptions/.travis.yml
vendored
1
test/fixtures/WackyOptions/.travis.yml
vendored
@ -3,7 +3,6 @@ language: julia
|
|||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
julia:
|
julia:
|
||||||
- 1.1
|
|
||||||
- 1.2
|
- 1.2
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
|
@ -40,6 +40,13 @@ PT.user_view(::FileTest, ::Template, ::AbstractString) = Dict("X" => 1, "Z" => 3
|
|||||||
@test_logs tpl(; julia=v"1.3", plugins=[p])
|
@test_logs tpl(; julia=v"1.3", plugins=[p])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@testset "CI versions" begin
|
||||||
|
t = tpl(; julia=v"1")
|
||||||
|
@test PT.collect_versions(t, ["1.0", "1.5", "nightly"]) == ["1.0", "1.5", "nightly"]
|
||||||
|
t = tpl(; julia=v"2")
|
||||||
|
@test PT.collect_versions(t, ["1.0", "1.5", "nightly"]) == ["2.0", "nightly"]
|
||||||
|
end
|
||||||
|
|
||||||
@testset "Equality" begin
|
@testset "Equality" begin
|
||||||
a = FileTest("foo", true)
|
a = FileTest("foo", true)
|
||||||
b = FileTest("foo", true)
|
b = FileTest("foo", true)
|
||||||
|
@ -108,7 +108,7 @@ end
|
|||||||
@testset "Wacky options" begin
|
@testset "Wacky options" begin
|
||||||
test_all("WackyOptions"; authors=USER, julia=v"1.2", host="x.com", plugins=[
|
test_all("WackyOptions"; authors=USER, julia=v"1.2", host="x.com", plugins=[
|
||||||
AppVeyor(; x86=true, coverage=true, extra_versions=[v"1.1"]),
|
AppVeyor(; x86=true, coverage=true, extra_versions=[v"1.1"]),
|
||||||
CirrusCI(; image="freebsd-123", coverage=false, extra_versions=["1.1"]),
|
CirrusCI(; image="freebsd-123", coverage=false, extra_versions=["1.3"]),
|
||||||
Citation(; readme=true),
|
Citation(; readme=true),
|
||||||
Codecov(; file=STATIC_FILE),
|
Codecov(; file=STATIC_FILE),
|
||||||
CompatHelper(; cron="0 0 */3 * *"),
|
CompatHelper(; cron="0 0 */3 * *"),
|
||||||
@ -118,7 +118,7 @@ end
|
|||||||
makedocs_kwargs=Dict(:foo => "bar", :bar => "baz"),
|
makedocs_kwargs=Dict(:foo => "bar", :bar => "baz"),
|
||||||
canonical_url=(_t, _pkg) -> "http://example.com",
|
canonical_url=(_t, _pkg) -> "http://example.com",
|
||||||
),
|
),
|
||||||
DroneCI(; amd64=false, arm=true, arm64=true, extra_versions=["1.1"]),
|
DroneCI(; amd64=false, arm=true, arm64=true, extra_versions=["1.3"]),
|
||||||
Git(; ignore=["a", "b", "c"], manifest=true),
|
Git(; ignore=["a", "b", "c"], manifest=true),
|
||||||
GitHubActions(; x86=true, linux=false, coverage=false),
|
GitHubActions(; x86=true, linux=false, coverage=false),
|
||||||
GitLabCI(; coverage=false, extra_versions=[v"0.6"]),
|
GitLabCI(; coverage=false, extra_versions=[v"0.6"]),
|
||||||
|
Loading…
Reference in New Issue
Block a user