Skip to content

Commit cccb0b7

Browse files
committed
open source code release
0 parents  commit cccb0b7

File tree

2,817 files changed

+931112
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,817 files changed

+931112
-0
lines changed

.gitignore

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
build.xml
2+
.classpath
3+
.factorypath
4+
.project
5+
com.oracle.graal.python.iml
6+
com.oracle.graal.python.test.iml
7+
*.settings
8+
nbproject
9+
*.jar
10+
*.zip
11+
*.sha1
12+
env
13+
*.pyc
14+
currentAnnotationProcessors
15+
mxbuild/mx.graalpython/savedDeps
16+
mxbuild
17+
workingsets.xml
18+
.idea
19+
GRAALPYTHON.dist
20+
GRAALPYTHON_UNIT_TESTS.dist
21+
mx.graalpython/eclipse-launches
22+
asv
23+
*.json
24+
language
25+
*.bc
26+
*.iml
27+
/.metadata
28+
/dumps
29+
/graalpython/testfiles/
30+
/hs_err*.log
31+
*.dist
32+
.cache
33+
/scripts/setup_active_library_branch.sh
34+
/*.py
35+
*.o
36+
*.so
37+
/graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/antlr/Python3.g4.stamp
38+
/mx.imports
39+
.pydevproject
40+
## local dev and debug files
41+
/snapshots/
42+
/testpkg/
43+
/vcrlog
44+
/out
45+
/out?
46+
/*.py
47+
/*.c
48+
/request_cache/
49+
/org.eclipse.jdt.core.prefs
50+
Python3.g4.stamp
51+
*.orig
52+
/graalpython/com.oracle.graal.python.test/src/tests/cpyext/Py*.c
53+
/*.diff
54+
## generated from: pyhocon -i ci.hocon -f json -o ci.json
55+
/ci.json
56+
/*.err

LICENSE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
For licensing information, including licenses of potentially included components
2+
from 3rd party software, see
3+
mx.graalpython/GraalCE_Python_license_3rd_party_license.txt

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Graal.Python
2+
3+
A Python implementation on Graal in the early stages.
4+
5+
For additional information, consult the `doc` directory.

ci.jsonnet

Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
{
2+
overlay: "fe68531f163967a8bef53a3c5569dc675133ef96",
3+
4+
// ======================================================================================================
5+
//
6+
// help:
7+
// 1) to get the json out of the jsonnet configuration make sure the `jsonnet` executable is in path
8+
// 2) execute the following command: jsonnet ci.jsonnet > ci.json
9+
// 3) a helper script which does just that is located in: ./scripts/jsonnet_json.sh
10+
//
11+
// ======================================================================================================
12+
13+
// ======================================================================================================
14+
//
15+
// locals (will not appear in the generated json)
16+
//
17+
// ======================================================================================================
18+
19+
// timelimit
20+
local TIME_LIMIT = {
21+
"30m": "00:30:00",
22+
"1h": "1:00:00",
23+
"2h": "2:00:00",
24+
"3h": "3:00:00",
25+
"4h": "4:00:00",
26+
"10h": "10:00:00"
27+
},
28+
TIME_LIMIT: TIME_LIMIT,
29+
30+
// targets
31+
local TARGET = {
32+
onDemand: ["bench"],
33+
postMerge: ["post-merge"],
34+
weekly: ["weekly"],
35+
gate: ["gate"],
36+
},
37+
TARGET: TARGET,
38+
39+
// ------------------------------------------------------------------------------------------------------
40+
//
41+
// utility funcs
42+
//
43+
// ------------------------------------------------------------------------------------------------------
44+
local utils = {
45+
download: function(name, version, platformspecific = true)
46+
{name: name, version: version, platformspecific: platformspecific},
47+
48+
getValue: function(object, field)
49+
if (!std.objectHas(object, field)) then
50+
error "unknown field: "+field+" in "+object+", valid choices are: "+std.objectFields(object)
51+
else
52+
object[field],
53+
},
54+
55+
// ------------------------------------------------------------------------------------------------------
56+
//
57+
// platform mixins
58+
//
59+
// ------------------------------------------------------------------------------------------------------
60+
local linuxMixin = {
61+
capabilities +: ["linux", "amd64"],
62+
packages +: {
63+
"maven": "==3.3.9",
64+
"git": ">=1.8.3",
65+
"mercurial": ">=3.2.4",
66+
"gcc": "==4.9.1",
67+
"llvm": ">=4.0",
68+
"python": "==3.4.1",
69+
"libffi": ">=3.2.1",
70+
"bzip2": ">=1.0.6",
71+
},
72+
downloads +: {
73+
LIBGMP: utils.download("libgmp", "6.1.0"),
74+
},
75+
},
76+
linuxMixin: linuxMixin,
77+
78+
local linuxBenchMixin = linuxMixin + {
79+
capabilities +: ["no_frequency_scaling", "tmpfs25g", "x62"],
80+
},
81+
linuxBenchMixin: linuxBenchMixin,
82+
83+
local darwinMixin = {
84+
capabilities +: ["darwin_sierra", "amd64"],
85+
packages +: {
86+
"pip:astroid": "==1.1.0",
87+
"pip:pylint": "==1.1.0",
88+
"llvm": "==4.0.1",
89+
},
90+
},
91+
92+
local getPlatform = function(platform)
93+
local PLATFORMS = {
94+
"linux": linuxMixin,
95+
"linuxBench": linuxBenchMixin,
96+
"darwin": darwinMixin,
97+
};
98+
utils.getValue(PLATFORMS, platform),
99+
100+
// ------------------------------------------------------------------------------------------------------
101+
//
102+
// mixins
103+
//
104+
// ------------------------------------------------------------------------------------------------------
105+
local pypyMixin = {
106+
downloads +: {
107+
PYPY_HOME: utils.download("pypy3", "5.8.0-minimal"),
108+
},
109+
},
110+
pypyMixin: pypyMixin,
111+
112+
local eclipseMixin = {
113+
downloads +: {
114+
ECLIPSE: utils.download("eclipse", "4.5.2.1"),
115+
JDT: utils.download("ecj", "4.6.1", false),
116+
},
117+
environment +: {
118+
ECLIPSE_EXE: "$ECLIPSE/eclipse",
119+
},
120+
},
121+
122+
local labsjdk8Mixin = {
123+
downloads +: {
124+
JAVA_HOME: utils.download("labsjdk", "8u161-jvmci-0.42"),
125+
EXTRA_JAVA_HOMES : { pathlist: [utils.download("oraclejdk", "9.0.4+11")] },
126+
},
127+
environment +: {
128+
CI: "true",
129+
PATH: "$JAVA_HOME/bin:$PATH",
130+
},
131+
},
132+
labsjdk8Mixin: labsjdk8Mixin,
133+
134+
local graalMixin = labsjdk8Mixin + {
135+
environment +: {
136+
HOST_VM: "server",
137+
},
138+
},
139+
140+
local graalCoreMixin = graalMixin + {
141+
environment +: {
142+
HOST_VM_CONFIG: "graal-core",
143+
},
144+
},
145+
146+
local sulongMixin = labsjdk8Mixin + {
147+
environment +: {
148+
CPPFLAGS: "-I$LIBGMP/include",
149+
LD_LIBRARY_PATH: "$LIBGMP/lib:$LLVM/lib:$LD_LIBRARY_PATH",
150+
}
151+
},
152+
sulongMixin: sulongMixin,
153+
154+
// ------------------------------------------------------------------------------------------------------
155+
//
156+
// the build templates
157+
//
158+
// ------------------------------------------------------------------------------------------------------
159+
local baseBuilder = {
160+
downloads: {},
161+
environment: {},
162+
setup: [],
163+
logs: ["dumps/*/*"],
164+
timelimit: TIME_LIMIT["30m"],
165+
packages: {},
166+
capabilities: [],
167+
name: null,
168+
targets: [],
169+
run: [],
170+
},
171+
172+
local commonBuilder = baseBuilder + labsjdk8Mixin + {
173+
dynamicImports:: "sulong,/compiler",
174+
175+
setup +: [
176+
["mx", "sforceimport"],
177+
["mx", "-v", "--dynamicimports", self.dynamicImports, "build"],
178+
]
179+
},
180+
commonBuilder: commonBuilder,
181+
182+
// ------------------------------------------------------------------------------------------------------
183+
//
184+
// the gate templates
185+
//
186+
// ------------------------------------------------------------------------------------------------------
187+
local baseGate = commonBuilder + {
188+
tags: "tags must be defined",
189+
190+
targets: TARGET.gate,
191+
run +: [
192+
["mx", "--strict-compliance", "--dynamicimports", super.dynamicImports, "--primary", "gate", "--tags", self.tags, "-B=--force-deprecation-as-warning-for-dependencies"],
193+
]
194+
},
195+
196+
local baseGraalGate = baseGate + sulongMixin + graalCoreMixin,
197+
baseGraalGate: baseGraalGate,
198+
199+
// specific gates
200+
local testGate = function(type, platform)
201+
baseGraalGate + {tags:: "python-"+type} + getPlatform(platform) + {name: "python-"+ type +"-"+platform},
202+
203+
local styleGate = baseGraalGate + eclipseMixin + linuxMixin + {
204+
tags:: "style,fullbuild,license",
205+
name: "python-style",
206+
207+
timelimit: TIME_LIMIT["1h"],
208+
},
209+
210+
local svmImportGate = function(source, platform="linux")
211+
local type = (if (source == true) then "source" else "binary");
212+
baseGate + getPlatform(platform) + {name: "python-svm-"+ type + "-import", tags:: "python-svm-" + type},
213+
214+
// ------------------------------------------------------------------------------------------------------
215+
//
216+
// the deploy templates
217+
//
218+
// ------------------------------------------------------------------------------------------------------
219+
local deployGate = function(platform)
220+
baseBuilder + graalCoreMixin + sulongMixin + getPlatform(platform) + {
221+
targets: TARGET.postMerge,
222+
setup +: [
223+
["mx", "sversions"],
224+
["mx", "build", "--force-javac"],
225+
],
226+
run +: [
227+
["mx", "deploy-binary-if-master", "python-public-snapshots"],
228+
],
229+
name: "deploy-binaries-"+platform,
230+
},
231+
232+
// ------------------------------------------------------------------------------------------------------
233+
//
234+
// the gates
235+
//
236+
// ------------------------------------------------------------------------------------------------------
237+
local gates = [
238+
// unittests
239+
testGate(type="unittest", platform="linux"),
240+
testGate(type="unittest", platform="darwin"),
241+
242+
// junit
243+
testGate(type="junit", platform="linux"),
244+
testGate(type="junit", platform="darwin"),
245+
246+
// style
247+
styleGate,
248+
249+
// svm builder gates
250+
svmImportGate(source=true),
251+
// TODO temporarily disabled
252+
// svmImportGate(source=false),
253+
254+
// deploy binaries
255+
deployGate(platform="linux"),
256+
deployGate(platform="darwin"),
257+
],
258+
259+
// ======================================================================================================
260+
//
261+
// the builds (the public section)
262+
//
263+
// ======================================================================================================
264+
builds: gates,
265+
}

0 commit comments

Comments
 (0)