Skip to content

Commit 8205420

Browse files
authored
Run the testsuite for the build_upstream 32-bit target (oxcaml#811)
1 parent a47ca6d commit 8205420

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128

129129
- name: Install GCC 32-bit libraries
130130
if: matrix.name == 'build_upstream-32-bit'
131-
run: sudo apt-get install gcc-multilib
131+
run: sudo apt-get install gcc-multilib gfortran-multilib
132132

133133
- name: Configure Flambda backend
134134
working-directory: flambda_backend
@@ -144,7 +144,7 @@ jobs:
144144
run: |
145145
if [ $run_testsuite = true ]; then target=ci; else target=compiler; fi
146146
export PATH=$GITHUB_WORKSPACE/ocaml-412/_install/bin:$PATH
147-
if [ $build_upstream = true ]; then make -j$J build_upstream; else make $target; fi
147+
if [ $build_upstream = true ]; then make -j$J build_and_test_upstream; else make $target; fi
148148
env:
149149
BUILD_OCAMLPARAM: ${{ matrix.ocamlparam }}
150150

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,21 @@ install_upstream: build_upstream
437437
(cd _build_upstream && $(MAKE) install)
438438
cp ocaml/VERSION $(prefix)/lib/ocaml/
439439

440+
.PHONY: build_and_test_upstream
441+
build_and_test_upstream: build_upstream
442+
if $$(which gfortran > /dev/null 2>&1); then \
443+
export LIBRARY_PATH=$$(dirname $$(gfortran -print-file-name=libgfortran.a)); \
444+
fi; \
445+
cd _build_upstream/testsuite \
446+
&& if $$(which parallel > /dev/null 2>&1); \
447+
then \
448+
echo "Running testsuite in parallel (nproc=$$(nproc))"; \
449+
make --no-print-directory parallel; \
450+
else \
451+
echo "Running testsuite sequentially"; \
452+
make --no-print-directory all; \
453+
fi
454+
440455
.PHONY: coverage
441456
coverage: boot-runtest
442457
rm -rf _coverage

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ AC_SUBST([coverage])
5454
AC_DISABLE_OPTION_CHECKING
5555

5656
AX_SUBDIRS_CONFIGURE([ocaml],
57-
[$middle_end_arg,-C,--disable-ocamldoc,--disable-stdlib-manpages],
57+
[$middle_end_arg,-C,--disable-ocamldoc,--disable-stdlib-manpages,--enable-ocamltest],
5858
[],
5959
[],
6060
[])

0 commit comments

Comments
 (0)