-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.jl
150 lines (113 loc) · 4.17 KB
/
main.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import TOML, Pkg, JSON, GitHubActions
project_content = TOML.parsefile("Project.toml")
julia_compat_bound = project_content["compat"]["julia"]
version_spec = Pkg.Types.semver_spec(julia_compat_bound)
versions = Set{VersionNumber}()
all_existing_versions = [
v"1.0.5",
v"1.1.1",
v"1.2.0",
v"1.3.1",
v"1.4.2",
v"1.5.4",
v"1.6.7",
v"1.7.3",
v"1.8.5",
v"1.9.4",
v"1.10.7",
v"1.11.2"
]
all_compatible_versions = filter(i -> i in version_spec, all_existing_versions)
if ENV["INCLUDE_RELEASE_VERSIONS"] == "true"
push!(versions, v"1.11.2")
end
if ENV["INCLUDE_LTS_VERSIONS"] == "true"
push!(versions, v"1.10.7")
end
if ENV["INCLUDE_ALL_COMPATIBLE_MINOR_VERSIONS"] == "true"
for i in all_compatible_versions
push!(versions, i)
end
end
if ENV["INCLUDE_SMALLEST_COMPATIBLE_MINOR_VERSIONS"] == "true"
smallest_compatible_version = first(sort(all_compatible_versions))
push!(versions, smallest_compatible_version)
end
filter!(i -> i in version_spec, versions)
function add_matrix_entries!(results, v)
if ENV["INCLUDE_WINDOWS_X64"] == "true"
push!(results, Dict("os" => "windows-latest", "juliaup-channel" => "$v~x64"))
end
if ENV["INCLUDE_WINDOWS_X86"] == "true"
push!(results, Dict("os" => "windows-latest", "juliaup-channel" => "$v~x86"))
end
if ENV["INCLUDE_LINUX_X64"] == "true"
push!(results, Dict("os" => "ubuntu-latest", "juliaup-channel" => "$v~x64"))
end
if ENV["INCLUDE_LINUX_X86"] == "true"
push!(results, Dict("os" => "ubuntu-latest", "juliaup-channel" => "$v~x86"))
end
if ENV["INCLUDE_MACOS_X64"] == "true"
# There is currently no known way to run Julia 1.4 on a Mac GitHub runner, so we skip
if v != v"1.4.2"
push!(results, Dict("os" => "macos-13", "juliaup-channel" => "$v~x64"))
end
end
if ENV["INCLUDE_MACOS_AARCH64"] == "true" && v>=v"1.8.0"
push!(results, Dict("os" => "macos-latest", "juliaup-channel" => "$v~aarch64"))
end
end
results = []
for v in versions
add_matrix_entries!(results, v)
end
if ENV["INCLUDE_RC_VERSIONS"] == "true"
# if ENV["INCLUDE_WINDOWS_X64"] == "true"
# push!(results, Dict("os" => "windows-latest", "juliaup-channel" => "rc~x64"))
# end
# if ENV["INCLUDE_WINDOWS_X86"] == "true"
# push!(results, Dict("os" => "windows-latest", "juliaup-channel" => "rc~x86"))
# end
# if ENV["INCLUDE_LINUX_X64"] == "true"
# push!(results, Dict("os" => "ubuntu-latest", "juliaup-channel" => "rc~x64"))
# end
# if ENV["INCLUDE_LINUX_X86"] == "true"
# push!(results, Dict("os" => "ubuntu-latest", "juliaup-channel" => "rc~x86"))
# end
# if ENV["INCLUDE_MACOS_X64"] == "true"
# push!(results, Dict("os" => "macos-13", "juliaup-channel" => "rc~x64"))
# end
# if ENV["INCLUDE_MACOS_AARCH64"] == "true"
# push!(results, Dict("os" => "macos-latest", "juliaup-channel" => "rc~aarch64"))
# end
end
if ENV["INCLUDE_BETA_VERSIONS"] == "true"
end
if ENV["INCLUDE_ALPHA_VERSIONS"] == "true"
end
if ENV["INCLUDE_NIGHTLY_VERSIONS"] == "true"
if ENV["INCLUDE_WINDOWS_X64"] == "true"
push!(results, Dict("os" => "windows-latest", "juliaup-channel" => "nightly~x64"))
end
if ENV["INCLUDE_WINDOWS_X86"] == "true"
push!(results, Dict("os" => "windows-latest", "juliaup-channel" => "nightly~x86"))
end
if ENV["INCLUDE_LINUX_X64"] == "true"
push!(results, Dict("os" => "ubuntu-latest", "juliaup-channel" => "nightly~x64"))
end
if ENV["INCLUDE_LINUX_X86"] == "true"
push!(results, Dict("os" => "ubuntu-latest", "juliaup-channel" => "nightly~x86"))
end
if ENV["INCLUDE_MACOS_X64"] == "true"
push!(results, Dict("os" => "macos-13", "juliaup-channel" => "nightly~x64"))
end
if ENV["INCLUDE_MACOS_AARCH64"] == "true"
push!(results, Dict("os" => "macos-latest", "juliaup-channel" => "nightly~aarch64"))
end
end
# flat_versions = [
# Dict("os" => "ubuntu-latest", "juliaup-channel" => "release"),
# Dict("os" => "macos-latest", "juliaup-channel" => "release"),
# ]
JSON.print(results)
GitHubActions.set_output("test-matrix", results)