Skip to content

Commit d61be80

Browse files
committed
flambda2 ci
1 parent d00eeba commit d61be80

File tree

3 files changed

+277
-2
lines changed

3 files changed

+277
-2
lines changed

.github/workflows/flambda2.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: flambda2
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
13+
env:
14+
J: "3"
15+
16+
steps:
17+
- name: Checkout the Flambda backend repo
18+
uses: actions/checkout@master
19+
with:
20+
path: 'flambda_backend'
21+
22+
- name: Cache dune build compiler install directory
23+
uses: actions/cache@v1
24+
id: cache
25+
with:
26+
path: ${{ github.workspace }}/dune_build_compiler/_install
27+
key: ${{ matrix.os }}-cache-dune-build-compiler
28+
29+
- name: Checkout OCaml 4.12 (dune build compiler)
30+
uses: actions/checkout@master
31+
if: steps.cache.outputs.cache-hit != 'true'
32+
with:
33+
repository: 'ocaml/ocaml'
34+
path: 'dune_build_compiler'
35+
ref: '4.12'
36+
37+
- name: Build and install dune build compiler
38+
if: steps.cache.outputs.cache-hit != 'true'
39+
working-directory: dune_build_compiler
40+
run: |
41+
./configure --prefix=$GITHUB_WORKSPACE/dune_build_compiler/_install
42+
make -j $J world.opt
43+
make install
44+
45+
- name: Checkout dune github repo
46+
uses: actions/checkout@master
47+
with:
48+
repository: 'ocaml-flambda/dune'
49+
ref: 'special_dune'
50+
path: 'dune'
51+
52+
- name: Build dune
53+
working-directory: dune
54+
run: |
55+
PATH=$GITHUB_WORKSPACE/dune_build_compiler/_install/bin:$PATH make release
56+
57+
- name: Run autoconf for Flambda backend
58+
working-directory: flambda_backend
59+
run: autoconf
60+
61+
- name: Configure Flambda backend (Flambda 2 mode)
62+
working-directory: flambda_backend
63+
run: |
64+
./configure \
65+
--prefix=$GITHUB_WORKSPACE/_install \
66+
--enable-middle-end=flambda2 \
67+
--with-dune=$GITHUB_WORKSPACE/dune/dune.exe
68+
69+
- name: Build, install and test Flambda backend (Flambda 2 mode)
70+
working-directory: flambda_backend
71+
run: make -j $J ci

Makefile.in

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,28 @@ runtest-upstream:
367367
# We should build the native ocamltest too.
368368
cp _build1/default/ocaml/ocamltest/ocamltest.byte \
369369
_runtest/ocamltest/ocamltest
370+
grep -v '^#' testsuite/flambda2-test-list > _runtest/flambda2-test-list
371+
if _build2/install/default/bin/ocamlopt.opt -config \
372+
| grep "flambda2: true" > /dev/null; \
373+
then touch _runtest/is-flambda2; \
374+
else rm -f _runtest/is-flambda2; \
375+
fi
370376
(export OCAMLSRCDIR=$$(pwd)/_runtest; \
371377
export CAML_LD_LIBRARY_PATH=$$(pwd)/_runtest/lib/ocaml/stublibs; \
372378
cd _runtest/testsuite \
373379
&& if $$(which parallel > /dev/null 2>&1); \
374-
then make parallel; \
375-
else make all; \
380+
then \
381+
if [ -f ../is-flambda2 ]; then \
382+
make parallel-list FILE=$(pwd)/../flambda2-test-list; \
383+
else \
384+
make parallel; \
385+
fi \
386+
else \
387+
if [ -f ../is-flambda2 ]; then \
388+
make list FILE=$(pwd)/../flambda2-test-list; \
389+
else \
390+
make all; \
391+
fi \
376392
fi)
377393

378394
# Compare the Flambda backend installation tree against the upstream one.

testsuite/flambda2-test-list

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# commented test | status | reason for not running / failure
2+
# ------------------------------------------------------------------------------------------------
3+
tests/afl-instrumentation
4+
tests/arch-power
5+
tests/array-functions
6+
# tests/asmcomp FAIL
7+
# tests/asmgen FAIL
8+
tests/ast-invariants
9+
# tests/backtrace FAIL (FIXME) there is practically no backtrace info
10+
tests/basic
11+
tests/basic-float
12+
tests/basic-io
13+
tests/basic-io-2
14+
tests/basic-manyargs
15+
# tests/basic-modules FAIL (FIXME) PR#8948 not merged yet in trunk
16+
tests/basic-more
17+
tests/basic-multdef
18+
tests/basic-private
19+
tests/callback
20+
tests/compatibility
21+
tests/compiler-libs
22+
tests/c-api
23+
tests/embedded
24+
tests/ephe-c-api
25+
tests/exotic-syntax
26+
tests/extension-constructor
27+
tests/flambda2
28+
tests/flambda2-aliases
29+
tests/flambda
30+
tests/flambda-specialization
31+
tests/flambda-unboxing
32+
# tests/float-unboxing FAIL (FIXME) 'float_subst_boxed_number.ml' see flambdatest/mlexamples/float_unboxing.ml for a simplified error example
33+
tests/fma
34+
tests/formats-transition
35+
tests/formatting
36+
tests/functors
37+
tests/gc-roots
38+
tests/generalized-open
39+
# tests/int64-unboxing FAIL (FIXME) 'test.ml' (unboxing of recursive continuation parameter)
40+
tests/lazy
41+
tests/letrec-check
42+
tests/letrec-compilation
43+
tests/let-syntax
44+
tests/lexing
45+
tests/lib-arg
46+
tests/lib-array
47+
tests/lib-bigarray
48+
tests/lib-bigarray-2
49+
tests/lib-bigarray-file
50+
tests/lib-bool
51+
tests/lib-buffer
52+
tests/lib-bytes
53+
tests/lib-digest
54+
tests/lib-dynlink-bytecode
55+
tests/lib-dynlink-csharp
56+
tests/lib-dynlink-initializers
57+
tests/lib-dynlink-native
58+
tests/lib-dynlink-packed
59+
tests/lib-dynlink-pr4229
60+
tests/lib-dynlink-pr4839
61+
tests/lib-dynlink-pr6950
62+
tests/lib-dynlink-private
63+
tests/lib-filename
64+
tests/lib-float
65+
tests/lib-floatarray
66+
tests/lib-format
67+
tests/lib-fun
68+
tests/lib-hashtbl
69+
tests/lib-int
70+
tests/lib-int32
71+
tests/lib-int64
72+
tests/lib-internalformat
73+
tests/lib-list
74+
tests/lib-marshal
75+
tests/lib-obj
76+
tests/lib-option
77+
tests/lib-printf
78+
tests/lib-queue
79+
tests/lib-random
80+
tests/lib-result
81+
tests/lib-scanf
82+
tests/lib-scanf-2
83+
tests/lib-seq
84+
tests/lib-set
85+
tests/lib-stack
86+
tests/lib-stdlabels
87+
tests/lib-stdlib
88+
tests/lib-str
89+
tests/lib-stream
90+
tests/lib-string
91+
tests/lib-sys
92+
tests/lib-systhreads
93+
tests/lib-threads
94+
tests/lib-uchar
95+
tests/lib-unix
96+
tests/link-test
97+
tests/locale
98+
tests/local-functions
99+
tests/loops
100+
tests/manual-intf-c
101+
tests/match-exception
102+
tests/match-exception-warnings
103+
tests/messages
104+
tests/misc
105+
tests/misc-kb
106+
tests/misc-unsafe
107+
tests/no-alias-deps
108+
# tests/opaque FAIL 'test.ml' (cmx file loading)
109+
tests/output-complete-obj
110+
tests/parsetree
111+
tests/parse-errors
112+
tests/parsing
113+
tests/ppx-attributes
114+
tests/ppx-contexts
115+
tests/prim-bigstring
116+
tests/prim-bswap
117+
tests/prim-revapply
118+
tests/printing-types
119+
tests/raise-counts
120+
tests/regression
121+
tests/required-external
122+
tests/runtime-C-exceptions
123+
tests/runtime-errors
124+
tests/runtime-objects
125+
tests/self-contained-toplevel
126+
tests/shadow_include
127+
tests/tool-caml-tex
128+
tests/tool-command-line
129+
tests/tool-debugger
130+
tests/tool-expect-test
131+
tests/tool-lexyacc
132+
tests/tool-ocaml
133+
tests/tool-ocamlc-compat32
134+
tests/tool-ocamlc-error-cleanup
135+
tests/tool-ocamlc-open
136+
tests/tool-ocamlc-stop-after
137+
tests/tool-ocamldep-modalias
138+
tests/tool-ocamldep-shadowing
139+
tests/tool-ocamldoc
140+
tests/tool-ocamldoc-open
141+
tests/tool-ocamlobjinfo
142+
tests/tool-ocaml-annot
143+
tests/tool-toplevel
144+
tests/tool-toplevel-invocation
145+
tests/translprim
146+
tests/typing-core-bugs
147+
tests/typing-deprecated
148+
tests/typing-extensions
149+
tests/typing-extension-constructor
150+
tests/typing-fstclassmod
151+
tests/typing-gadts
152+
tests/typing-immediate
153+
tests/typing-implicit_unpack
154+
tests/typing-labels
155+
tests/typing-misc
156+
tests/typing-misc-bugs
157+
tests/typing-missing-cmi
158+
tests/typing-missing-cmi-2
159+
tests/typing-missing-cmi-3
160+
tests/typing-modules
161+
tests/typing-modules-bugs
162+
tests/typing-multifile
163+
tests/typing-objects
164+
tests/typing-objects-bugs
165+
tests/typing-ocamlc-i
166+
tests/typing-poly
167+
tests/typing-polyvariants-bugs
168+
tests/typing-polyvariants-bugs-2
169+
tests/typing-poly-bugs
170+
tests/typing-private
171+
tests/typing-private-bugs
172+
tests/typing-recmod
173+
tests/typing-recordarg
174+
tests/typing-rectypes-bugs
175+
tests/typing-safe-linking
176+
tests/typing-shadowing-of-pervasives-submodules
177+
tests/typing-short-paths
178+
tests/typing-signatures
179+
tests/typing-sigsubst
180+
tests/typing-typeparam
181+
tests/typing-unboxed
182+
tests/typing-unboxed-types
183+
tests/typing-warnings
184+
tests/unboxed-primitive-args
185+
tests/unwind
186+
tests/utils
187+
# tests/warnings FAIL 'w55.ml' (@inline attribute), 'w59.ml' (missing warnings when using Obj functions)
188+
tests/win-unicode

0 commit comments

Comments
 (0)