From 6279019a946f401ec882a88eb595a2f5ec312f9c Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Thu, 4 Mar 2021 12:08:14 -0600 Subject: [PATCH 1/3] Use Git_jll instead of relying on system install --- Project.toml | 4 +++- test/runtests.jl | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index a9d79b0..a70dd4c 100644 --- a/Project.toml +++ b/Project.toml @@ -20,6 +20,7 @@ AWSCore = "0.5.2, 0.6" AWSSDK = "0.2, 0.3, 0.4, 0.5" AWSTools = "0.3.1, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1" AutoHashEquals = "0.2.0" +Git_jll = "2.27" HTTP = "0.8.1" Memento = "0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 1" Mocking = "0.7" @@ -27,8 +28,9 @@ OrderedCollections = "1.4" julia = "1" [extras] +Git_jll = "f8c6e375-362e-5223-8a59-34ff63f689eb" HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["HTTP", "Test"] +test = ["Git_jll", "HTTP", "Test"] diff --git a/test/runtests.jl b/test/runtests.jl index d1c84e7..e374084 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,6 +6,7 @@ using AWSSDK.CloudWatchLogs: get_log_events using AWSTools.CloudFormation: stack_output using AWSTools.EC2: instance_region using Dates +using Git_jll using HTTP: HTTP using Memento using Memento.TestUtils: @test_log, @test_nolog @@ -25,9 +26,14 @@ const JOB_TIMEOUT = 900 const LOG_TIMEOUT = 30 const JULIA_BAKED_IMAGE = let - output = read(`git ls-remote --tags https://github.com/JuliaLang/julia`, String) + # Note: We currently cannot use HTTPS remotes + # https://github.com/JuliaPackaging/Yggdrasil/issues/1299 + output = git() do git_path + read(`$git_path ls-remote --tags git@github.com:JuliaLang/julia.git`, String) + end tags = split(replace(output, r".*\/" => "")) versions = VersionNumber.(filter(v -> !endswith(v, "^{}"), tags)) + latest_version = maximum(versions) docker_tag = VERSION > latest_version ? "nightly" : "$VERSION" From daba7c1b211a2334885d61f307b2b84625b48220 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Thu, 4 Mar 2021 13:48:34 -0600 Subject: [PATCH 2/3] Use HTTPS --- test/runtests.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index e374084..af91b56 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -26,10 +26,8 @@ const JOB_TIMEOUT = 900 const LOG_TIMEOUT = 30 const JULIA_BAKED_IMAGE = let - # Note: We currently cannot use HTTPS remotes - # https://github.com/JuliaPackaging/Yggdrasil/issues/1299 output = git() do git_path - read(`$git_path ls-remote --tags git@github.com:JuliaLang/julia.git`, String) + read(`$git_path ls-remote --tags https://github.com/JuliaLang/julia`, String) end tags = split(replace(output, r".*\/" => "")) versions = VersionNumber.(filter(v -> !endswith(v, "^{}"), tags)) From d921d55c7e1ee26039a1d07867a76e21cbb5055e Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Thu, 4 Mar 2021 19:41:03 -0600 Subject: [PATCH 3/3] Setup git properly --- test/runtests.jl | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index af91b56..18e2a40 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -15,6 +15,19 @@ using Test Mocking.activate() +function julia_versions() + output = withenv( + "GIT_SSL_CAINFO" => joinpath(dirname(Sys.BINDIR), "share", "julia", "cert.pem"), + "GIT_EXEC_PATH" => joinpath(Git_jll.artifact_dir, "libexec", "git-core"), + ) do + git() do git_path + read(`$git_path ls-remote --tags https://github.com/JuliaLang/julia`, String) + end + end + tags = split(replace(output, r".*\/" => "")) + return VersionNumber.(filter!(v -> !endswith(v, "^{}"), tags)) +end + # Controls the running of various tests: "local", "batch" const TESTS = strip.(split(get(ENV, "TESTS", "local"), r"\s*,\s*")) @@ -26,13 +39,7 @@ const JOB_TIMEOUT = 900 const LOG_TIMEOUT = 30 const JULIA_BAKED_IMAGE = let - output = git() do git_path - read(`$git_path ls-remote --tags https://github.com/JuliaLang/julia`, String) - end - tags = split(replace(output, r".*\/" => "")) - versions = VersionNumber.(filter(v -> !endswith(v, "^{}"), tags)) - - latest_version = maximum(versions) + latest_version = maximum(julia_versions()) docker_tag = VERSION > latest_version ? "nightly" : "$VERSION" "468665244580.dkr.ecr.us-east-1.amazonaws.com/julia-baked:$docker_tag"