25
25
26
26
env :
27
27
OCAMLRUNPARAM : b
28
+ DUNE_PROFILE : release
28
29
29
30
steps :
30
31
- name : " Windows: Set git to use LF"
45
46
opam-pin : false
46
47
opam-depext : false
47
48
49
+ - name : " Install OPAM dependencies"
50
+ run : opam install . --deps-only
51
+
52
+ - name : " Build compiler"
53
+ run : |
54
+ opam exec -- dune build
55
+ ./scripts/copyExes.js
56
+
57
+ - name : Use Node.js
58
+ uses : actions/setup-node@v3
59
+ with :
60
+ node-version : 16
61
+
62
+ - name : Install npm packages
63
+ run : npm ci --ignore-scripts
64
+
48
65
- name : " Check if syntax subfolder has changed"
49
66
id : syntax-diff
50
67
shell : bash
@@ -55,25 +72,13 @@ jobs:
55
72
echo "syntax_status=changed" >> $GITHUB_ENV
56
73
fi
57
74
58
- - name : " Syntax: install OPAM dependencies"
59
- if : env.syntax_status == 'changed'
60
- run : opam install . --deps-only
61
- working-directory : res_syntax
62
-
63
- - name : " Syntax: build CLI"
64
- if : env.syntax_status == 'changed'
65
- run : opam exec -- dune build
66
- working-directory : res_syntax
67
-
68
75
- name : " Syntax: Run roundtrip tests"
69
76
if : ${{ env.syntax_status == 'changed' && runner.os != 'Windows' }}
70
- run : opam exec -- make roundtrip-test
71
- working-directory : res_syntax
77
+ run : opam exec -- make test-syntax-roundtrip
72
78
73
79
- name : " Syntax: Run tests (Windows)"
74
80
if : ${{ env.syntax_status == 'changed' && runner.os == 'Windows' }}
75
- run : opam exec -- make test
76
- working-directory : res_syntax
81
+ run : opam exec -- make test-syntax
77
82
78
83
# Required for ninja build
79
84
- name : " Windows: Use MSVC"
@@ -85,26 +90,27 @@ jobs:
85
90
- name : Build ninja
86
91
run : node scripts/buildNinjaBinary.js
87
92
88
- - name : Use Node.js
89
- uses : actions/setup-node@v3
90
- with :
91
- node-version : 16
93
+ - name : Build runtime/stdlib
94
+ if : runner.os != 'Windows'
95
+ run : |
96
+ opam exec -- dune exec -- node ./scripts/ninja.js config
97
+ opam exec -- dune exec -- node ./scripts/ninja.js build
92
98
93
- - name : NPM install
94
- run : opam exec -- npm ci
95
- env :
96
- RESCRIPT_FORCE_REBUILD : 1
99
+ - name : Check for changes in lib folder
100
+ run : git diff --exit-code lib/js lib/es6
97
101
98
102
- name : Run tests
99
103
if : runner.os != 'Windows'
100
- run : opam exec -- node scripts/ciTest.js -all
104
+ run : opam exec -- dune exec -- node scripts/ciTest.js -all
101
105
102
106
- name : Run tests (Windows)
103
107
if : runner.os == 'Windows'
104
- run : opam exec -- node scripts/ciTest.js -mocha -theme -format
108
+ run : opam exec -- dune exec -- node scripts/ciTest.js -mocha -theme -format
105
109
106
- - name : Get artifact info
107
- run : node .github/workflows/get_artifact_info.js
110
+ - name : Prepare artifact upload
111
+ run : |
112
+ ./scripts/prebuilt.js
113
+ node .github/workflows/get_artifact_info.js
108
114
109
115
- name : " Upload artifacts: binaries"
110
116
uses : actions/upload-artifact@v3
@@ -119,19 +125,14 @@ jobs:
119
125
name : lib-ocaml
120
126
path : lib/ocaml
121
127
122
- # Important: the ninja build must run after the artifact upload because for some reason
123
- # the bsc.exe created by the ninja build does not find the Pervasives module.
124
- # So this is run here just to test the normal dev workflow, too.
125
- - name : ninja config
126
- if : runner.os != 'Windows'
127
- run : opam exec -- node ./scripts/ninja.js config
128
-
129
- - name : ninja build
130
- if : runner.os != 'Windows'
131
- run : opam exec -- node ./scripts/ninja.js build
132
-
133
- - name : Check for changes in lib folder
134
- run : git diff --exit-code lib/js lib/es6
128
+ - name : " Upload artifacts: cmi cache"
129
+ if : runner.os == 'Linux'
130
+ uses : actions/upload-artifact@v3
131
+ with :
132
+ name : cmij-cache
133
+ path : |
134
+ lib/cmi_cache.bin
135
+ lib/cmj_cache.bin
135
136
136
137
package :
137
138
needs : build
@@ -157,9 +158,6 @@ jobs:
157
158
- name : Move artifacts
158
159
run : ./scripts/moveArtifacts.sh
159
160
160
- - name : Create ninja.tar.gz
161
- run : git -C ninja archive --format=tar.gz HEAD -o ../vendor/ninja.tar.gz
162
-
163
161
- name : Check artifact list
164
162
run : node ./scripts/makeArtifactList.js -check
165
163
0 commit comments