-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
48 lines (36 loc) · 1.26 KB
/
justfile
File metadata and controls
48 lines (36 loc) · 1.26 KB
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
graalRepo := "git@github.com:heuristic-team/graal.git"
mxRepo := "git@github.com:graalvm/mx.git"
graalJDK := "https://github.com/graalvm/labs-openjdk/releases/download/25.0.2%2B10-jvmci-b01/labsjdk-ce-25.0.2+10-jvmci-b01-linux-amd64.tar.gz"
jdkArchive := "labsjdk-ce-25.0.2+10-jvmci-b01-linux-amd64.tar.gz"
toolsDir := "tools/"
git := require("git")
wget := require("wget")
direnv := require("direnv")
tar := require("tar")
default: clean downloadAll setupEnv cleanArtifacts
downloadAll: setupTools cloneGraal
tools:
-mkdir {{ toolsDir }}
setupTools: tools
(cd {{ toolsDir }} &&\
{{wget}} {{graalJDK}}) &&\
(cd {{toolsDir}} && tar -xf {{ jdkArchive }} &\
(cd {{toolsDir}} &&\
{{git}} clone {{ mxRepo }}) &\
wait)
cloneGraal:
{{git}} clone {{ graalRepo }}
graalJDKDir := "labsjdk-ce-25.0.2-jvmci-b01"
envFile := ".envrc"
setupEnv:
echo "export GRAAL_JDK=\"{{graalJDKDir}}\"" > {{ envFile }} &&\
echo "export GRAAL_DIR=\"$HOME/dev/graal\"" >> {{ envFile }} &&\
echo "export JAVA_HOME=\"$GRAAL_DIR/{{toolsDir}}$GRAAL_JDK\"" >> {{ envFile }} &&\
echo "export PATH=\"$PATH:$GRAAL_DIR/{{toolsDir}}mx\"" >> {{ envFile }} &&\
{{direnv}} allow
cleanArtifacts:
-rm {{ toolsDir }}{{ jdkArchive }}
clean:
rm -rf graal/
rm -rf {{ toolsDir }}
-rm .envrc