Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Git_jll instead of relying on system install #10

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ 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"
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"]
19 changes: 15 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,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*"))

Expand All @@ -25,10 +39,7 @@ 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)
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"
Expand Down