File tree 9 files changed +34
-58
lines changed 9 files changed +34
-58
lines changed Original file line number Diff line number Diff line change 53
53
node-version : 14.4.0
54
54
55
55
- run : npm ci
56
+ - run : opam install dune
56
57
- run : npm run compile
57
58
58
59
# These 2 runs (or just the second?) are for when you have opam dependencies. We don't.
69
70
run : |
70
71
cd analysis
71
72
mkdir ${{matrix.artifact-folder}}
72
- mv rescript-editor-analysis.exe ${{matrix.artifact-folder}}
73
+ mv _build/install/default/bin/ rescript-editor-analysis.exe ${{matrix.artifact-folder}}
73
74
tar -cvf binary.tar ${{matrix.artifact-folder}}
74
75
75
76
- uses : actions/upload-artifact@v2
Original file line number Diff line number Diff line change @@ -4,12 +4,5 @@ node_modules
4
4
examples /* /lib
5
5
analysis /tests /lib
6
6
analysis /tests /.bsb.lock
7
+ analysis /_build
7
8
analysis /tests /.merlin
8
- # artifacts from binary compilation
9
- * .exe
10
- * .cmi
11
- * .cmt
12
- * .cmti
13
- * .cmx
14
- * .o
15
- * .install
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
SHELL = /bin/bash
2
- MAKEFLAGS += --jobs 4
3
- INCLUDES = -I src -I src/vendor/res_outcome_printer -I src/vendor -I src/vendor/compiler-libs-406
4
2
5
- OCAMLOPT = ocamlopt.opt
6
- OCAMLFLAGS = -g -w +26+27+32+33+39 -bin-annot $(INCLUDES )
7
- OCAMLDEP = ocamldep.opt
3
+ build-native :
4
+ dune build
8
5
9
- OUTPUT = rescript-editor-analysis.exe
10
-
11
- % .cmi : % .mli
12
- @echo Building $@
13
- @$(OCAMLOPT ) $(OCAMLFLAGS ) -c $<
14
- % .cmx : % .ml
15
- @echo Building $@
16
- @$(OCAMLOPT ) $(OCAMLFLAGS ) -c $<
17
-
18
- include .depend
19
- depend :
20
- @$(OCAMLDEP ) -native $(INCLUDES ) ` find src -name " *.ml" -o -name " *.mli" ` > .depend
21
-
22
- SOURCE_FILES = $(shell $(OCAMLDEP ) -sort `find src -name "* .ml"` | sed -E "s/\.ml/.cmx/g")
23
-
24
- $(OUTPUT ) : $(SOURCE_FILES )
25
- @echo Linking...
26
- @$(OCAMLOPT ) $(OCAMLFLAGS ) -O2 -o $(OUTPUT ) \
27
- unix.cmxa str.cmxa $(INCLUDES ) $(SOURCE_FILES )
28
- @echo Done!
29
-
30
- build-native : $(OUTPUT ) depend
31
-
32
- dce : build-native
33
- ../../reanalyze/_build/install/default/bin/reanalyze.exe -dce-cmt src -suppress src/vendor
6
+ dce :
7
+ dune build @check @all
8
+ ../../reanalyze/_build/install/default/bin/reanalyze.exe -dce-cmt _build -suppress src/vendor
34
9
35
10
tests/node_modules/.bin/rescript :
36
11
@cd tests && npm install
@@ -39,9 +14,10 @@ test: build-native tests/node_modules/.bin/rescript
39
14
@cd tests && node_modules/.bin/rescript
40
15
./test.sh
41
16
42
- clean :
43
- git clean -dfx .
17
+ clean : tests/node_modules/.bin/rescript
18
+ @cd tests && node_modules/.bin/rescript clean
19
+ dune clean
44
20
45
21
.DEFAULT_GOAL := build-native
46
22
47
- .PHONY : depend clean build-native dce test
23
+ .PHONY : clean build-native dce test
Original file line number Diff line number Diff line change
1
+ (dirs :standard \ examples tests)
Original file line number Diff line number Diff line change
1
+ (lang dune 1 .7)
2
+ (name rescript-vscode)
3
+
Original file line number Diff line number Diff line change
1
+ (copy_files# vendor/*.{ml,mli})
2
+ (copy_files# vendor/compiler-libs-406/*.{ml,mli})
3
+ (copy_files# vendor/res_outcome_printer/*.{ml,mli})
4
+ (
5
+ executable
6
+ (public_name rescript-editor-analysis.exe)
7
+
8
+ ; The main module that will become the binary.
9
+ (name Cli)
10
+
11
+ (flags "-w" "+26+27+32+33+39")
12
+
13
+ ; Depends on:
14
+ (libraries unix str)
15
+
16
+ (modules_without_implementation asttypes outcometree parsetree)
17
+ )
Original file line number Diff line number Diff line change 1
1
for file in tests/src/* .{res,resi}; do
2
2
output=" $( dirname $file ) /expected/$( basename $file ) .txt"
3
- ./rescript-editor-analysis.exe test $file & > $output
3
+ ./_build/install/default/bin/ rescript-editor-analysis.exe test $file & > $output
4
4
# CI. We use LF, and the CI OCaml fork prints CRLF. Convert.
5
5
if [ " $RUNNER_OS " == " Windows" ]; then
6
6
perl -pi -e ' s/\r\n/\n/g' -- $output
You can’t perform that action at this time.
0 commit comments