Don't include versions lower than the minimum in CI suites (#190)

This commit is contained in:
Chris de Graaf 2020-06-11 18:41:26 -05:00 committed by GitHub
parent 5f22493a03
commit f61215823a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 11 deletions

View File

@ -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)
custom = map(v -> v isa VersionNumber ? format_version(v) : string(v), versions)
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))
end

View File

@ -1,7 +1,6 @@
# Documentation: https://github.com/JuliaCI/Appveyor.jl
environment:
matrix:
- julia_version: 1.1
- julia_version: 1.2
platform:
- x64

View File

@ -5,8 +5,8 @@ task:
artifacts_cache:
folder: ~/.julia/artifacts
env:
JULIA_VERSION: 1.1
JULIA_VERSION: 1.2
JULIA_VERSION: 1.3
install_script:
- sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)"
build_script:

View File

@ -1,7 +1,7 @@
def main(ctx):
pipelines = []
for arch in ["arm", "arm64"]:
for julia in ["1.1", "1.2"]:
for julia in ["1.2", "1.3"]:
pipelines.append(pipeline(arch, julia))
return pipelines

View File

@ -9,7 +9,6 @@ jobs:
strategy:
matrix:
version:
- '1.0'
- '1.2'
- '1.4'
- 'nightly'

View File

@ -5,10 +5,6 @@
using Pkg
Pkg.build()
Pkg.test()'
Julia 0.6:
image: julia:0.6
extends:
- .script
Julia 1.2:
image: julia:1.2
extends:

View File

@ -3,7 +3,6 @@ language: julia
notifications:
email: false
julia:
- 1.1
- 1.2
os:
- linux

View File

@ -40,6 +40,13 @@ PT.user_view(::FileTest, ::Template, ::AbstractString) = Dict("X" => 1, "Z" => 3
@test_logs tpl(; julia=v"1.3", plugins=[p])
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
a = FileTest("foo", true)
b = FileTest("foo", true)

View File

@ -108,7 +108,7 @@ end
@testset "Wacky options" begin
test_all("WackyOptions"; authors=USER, julia=v"1.2", host="x.com", plugins=[
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),
Codecov(; file=STATIC_FILE),
CompatHelper(; cron="0 0 */3 * *"),
@ -118,7 +118,7 @@ end
makedocs_kwargs=Dict(:foo => "bar", :bar => "baz"),
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),
GitHubActions(; x86=true, linux=false, coverage=false),
GitLabCI(; coverage=false, extra_versions=[v"0.6"]),