File tree Expand file tree Collapse file tree 9 files changed +34
-58
lines changed Expand file tree Collapse file tree 9 files changed +34
-58
lines changed Original file line number Diff line number Diff line change 5353 node-version : 14.4.0
5454
5555 - run : npm ci
56+ - run : opam install dune
5657 - run : npm run compile
5758
5859 # These 2 runs (or just the second?) are for when you have opam dependencies. We don't.
6970 run : |
7071 cd analysis
7172 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}}
7374 tar -cvf binary.tar ${{matrix.artifact-folder}}
7475
7576 - uses : actions/upload-artifact@v2
Original file line number Diff line number Diff line change @@ -4,12 +4,5 @@ node_modules
44examples /* /lib
55analysis /tests /lib
66analysis /tests /.bsb.lock
7+ analysis /_build
78analysis /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 11SHELL = /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
42
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
85
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
349
3510tests/node_modules/.bin/rescript :
3611 @cd tests && npm install
@@ -39,9 +14,10 @@ test: build-native tests/node_modules/.bin/rescript
3914 @cd tests && node_modules/.bin/rescript
4015 ./test.sh
4116
42- clean :
43- git clean -dfx .
17+ clean : tests/node_modules/.bin/rescript
18+ @cd tests && node_modules/.bin/rescript clean
19+ dune clean
4420
4521.DEFAULT_GOAL := build-native
4622
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 11for file in tests/src/* .{res,resi}; do
22 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
44 # CI. We use LF, and the CI OCaml fork prints CRLF. Convert.
55 if [ " $RUNNER_OS " == " Windows" ]; then
66 perl -pi -e ' s/\r\n/\n/g' -- $output
You can’t perform that action at this time.
0 commit comments