Switch the compiler CI builds from Travis to GitHub actions (#10036)
* Switch compiler builds and tests to GitHub actions * Expose ${cc} in ocamltest * Allow lib-bigarray-2/bigarrfml.ml to run on 32-bit * Simplify environment variables passed to scripts * Reduce matrix to 3 builds * Move minimum build into Jenkins other-configsmaster
parent
2109946e0f
commit
f6279a64b5
|
@ -0,0 +1,71 @@
|
|||
name: main
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
no-naked-pointers:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: configure tree
|
||||
run: ./configure --disable-naked-pointers --disable-stdlib-manpages
|
||||
- name: Build
|
||||
run: |
|
||||
make -j world.opt
|
||||
- name: Run the testsuite
|
||||
run: |
|
||||
make -C testsuite USE_RUNTIME=d all
|
||||
i386-static:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Packages
|
||||
run: |
|
||||
sudo apt install gcc-multilib gfortran-multilib
|
||||
- name: configure tree
|
||||
run: |
|
||||
XARCH=i386 CONFIG_ARG='--disable-stdlib-manpages --disable-shared' bash -xe tools/ci/actions/runner.sh configure
|
||||
- name: Build
|
||||
run: |
|
||||
bash -xe tools/ci/actions/runner.sh build
|
||||
- name: Run the testsuite
|
||||
run: |
|
||||
bash -xe tools/ci/actions/runner.sh test
|
||||
- name: Install
|
||||
run: |
|
||||
bash -xe tools/ci/actions/runner.sh install
|
||||
- name: Other checks
|
||||
run: |
|
||||
bash -xe tools/ci/actions/runner.sh other-checks
|
||||
full-flambda:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Packages
|
||||
run: |
|
||||
sudo apt install texlive-latex-extra texlive-fonts-recommended
|
||||
# Ensure that make distclean can be run from an empty tree
|
||||
- name: distclean
|
||||
run: |
|
||||
MAKE_ARG=-j make distclean
|
||||
- name: configure tree
|
||||
run: |
|
||||
MAKE_ARG=-j XARCH=x64 CONFIG_ARG='--enable-flambda --enable-dependency-generation' OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh configure
|
||||
- name: Build
|
||||
run: |
|
||||
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh build
|
||||
- name: Run the testsuite
|
||||
run: |
|
||||
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh test
|
||||
- name: Build API Documentation
|
||||
run: |
|
||||
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh api-docs
|
||||
- name: Install
|
||||
run: |
|
||||
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh install
|
||||
- name: Other checks
|
||||
run: |
|
||||
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh other-checks
|
|
@ -1,18 +0,0 @@
|
|||
name: main
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
no-naked-pointers:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: configure tree
|
||||
run: ./configure --disable-naked-pointers --disable-stdlib-manpages
|
||||
- name: Build
|
||||
run: |
|
||||
make -j world.opt
|
||||
- name: Run the testsuite
|
||||
run: |
|
||||
make -C testsuite USE_RUNTIME=d all
|
41
.travis.yml
41
.travis.yml
|
@ -20,51 +20,10 @@ git:
|
|||
script: tools/ci/travis/travis-ci.sh
|
||||
matrix:
|
||||
include:
|
||||
- env: >-
|
||||
CI_KIND=build
|
||||
XARCH=x64
|
||||
CONFIG_ARG=--enable-flambda
|
||||
OCAMLRUNPARAM=b,v=0
|
||||
- env: >-
|
||||
CI_KIND=build
|
||||
XARCH=i386
|
||||
CONFIG_ARG=--disable-stdlib-manpages
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- env: >-
|
||||
CI_KIND=build
|
||||
XARCH=x64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- texlive-latex-extra
|
||||
- texlive-fonts-recommended
|
||||
- env: >-
|
||||
CI_KIND=build
|
||||
XARCH=x64
|
||||
CONFIG_ARG=--disable-shared
|
||||
- env: >-
|
||||
CI_KIND=build
|
||||
XARCH=x64
|
||||
MIN_BUILD=1
|
||||
- env: >-
|
||||
CI_KIND=build
|
||||
XARCH=x64
|
||||
CONFIG_ARG=--enable-dependency-generation
|
||||
MAKE_ARG=-j
|
||||
- env: CI_KIND=check-depend
|
||||
- env: CI_KIND=changes
|
||||
- env: CI_KIND=manual
|
||||
- env: CI_KIND=check-typo
|
||||
# - env: CI_KIND=tests
|
||||
# allow_failures:
|
||||
# - env: CI_KIND=tests
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- binutils-dev
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
|
|
@ -1083,6 +1083,7 @@ let config_variables _log env =
|
|||
Sys.getenv_with_default_value "MKDLL" Ocamltest_config.mkdll;
|
||||
Ocaml_variables.mkexe, Ocamltest_config.mkexe;
|
||||
Ocaml_variables.c_preprocessor, Ocamltest_config.c_preprocessor;
|
||||
Ocaml_variables.cc, Ocamltest_config.cc;
|
||||
Ocaml_variables.csc, Ocamltest_config.csc;
|
||||
Ocaml_variables.csc_flags, Ocamltest_config.csc_flags;
|
||||
Ocaml_variables.shared_library_cflags,
|
||||
|
|
|
@ -41,6 +41,9 @@ let bytecc_libs = make ("bytecc_libs",
|
|||
let c_preprocessor = make ("c_preprocessor",
|
||||
"Command to use to invoke the C preprocessor")
|
||||
|
||||
let cc = make ("cc",
|
||||
"Command to use to invoke the C compiler")
|
||||
|
||||
let caml_ld_library_path_name = "CAML_LD_LIBRARY_PATH"
|
||||
|
||||
let export_caml_ld_library_path value =
|
||||
|
|
|
@ -28,6 +28,8 @@ val bytecc_libs : Variables.t
|
|||
|
||||
val c_preprocessor : Variables.t
|
||||
|
||||
val cc : Variables.t
|
||||
|
||||
val caml_ld_library_path : Variables.t
|
||||
|
||||
val compare_programs : Variables.t
|
||||
|
|
|
@ -8,7 +8,7 @@ script = "sh ${test_source_directory}/has-gfortran.sh"
|
|||
|
||||
** setup-ocamlc.byte-build-env
|
||||
*** script
|
||||
script = "gfortran -c bigarrf.f"
|
||||
script = "sh ${test_source_directory}/call-gfortran.sh ${cc} -c bigarrf.f"
|
||||
**** ocamlc.byte
|
||||
all_modules = "bigarrf.o bigarrfstub.c bigarrfml.ml"
|
||||
***** run
|
||||
|
@ -18,7 +18,7 @@ stdout = "${output}"
|
|||
|
||||
** setup-ocamlopt.byte-build-env
|
||||
*** script
|
||||
script = "gfortran -c bigarrf.f"
|
||||
script = "sh ${test_source_directory}/call-gfortran.sh ${cc} -c bigarrf.f"
|
||||
**** ocamlopt.byte
|
||||
all_modules = "bigarrf.o bigarrfstub.c bigarrfml.ml"
|
||||
***** run
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This somewhat hackily passes any extra words in CC to gfortran
|
||||
# This means for a 32-bit build (configured with CC="gcc -m32" the -m32
|
||||
# gets passed to gfortran)
|
||||
shift 1
|
||||
gfortran "$@"
|
|
@ -0,0 +1,133 @@
|
|||
#!/usr/bin/env bash
|
||||
#**************************************************************************
|
||||
#* *
|
||||
#* OCaml *
|
||||
#* *
|
||||
#* Anil Madhavapeddy, OCaml Labs *
|
||||
#* *
|
||||
#* Copyright 2014 Institut National de Recherche en Informatique et *
|
||||
#* en Automatique. *
|
||||
#* *
|
||||
#* All rights reserved. This file is distributed under the terms of *
|
||||
#* the GNU Lesser General Public License version 2.1, with the *
|
||||
#* special exception on linking described in the file LICENSE. *
|
||||
#* *
|
||||
#**************************************************************************
|
||||
|
||||
set -xe
|
||||
|
||||
PREFIX=~/local
|
||||
|
||||
MAKE="make $MAKE_ARG"
|
||||
SHELL=dash
|
||||
|
||||
export PATH=$PREFIX/bin:$PATH
|
||||
|
||||
Configure () {
|
||||
mkdir -p $PREFIX
|
||||
cat<<EOF
|
||||
------------------------------------------------------------------------
|
||||
This test builds the OCaml compiler distribution with your pull request
|
||||
and runs its testsuite.
|
||||
|
||||
Failing to build the compiler distribution, or testsuite failures are
|
||||
critical errors that must be understood and fixed before your pull
|
||||
request can be merged.
|
||||
------------------------------------------------------------------------
|
||||
EOF
|
||||
|
||||
configure_flags="\
|
||||
--prefix=$PREFIX \
|
||||
--enable-flambda-invariants \
|
||||
--enable-ocamltest \
|
||||
--disable-dependency-generation \
|
||||
$CONFIG_ARG"
|
||||
|
||||
case $XARCH in
|
||||
x64)
|
||||
./configure $configure_flags
|
||||
;;
|
||||
i386)
|
||||
./configure --build=x86_64-pc-linux-gnu --host=i386-linux \
|
||||
CC='gcc -m32' AS='as --32' ASPP='gcc -m32 -c' \
|
||||
PARTIALLD='ld -r -melf_i386' \
|
||||
$configure_flags
|
||||
;;
|
||||
*)
|
||||
echo unknown arch
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
Build () {
|
||||
$MAKE world.opt
|
||||
$MAKE ocamlnat
|
||||
echo Ensuring that all names are prefixed in the runtime
|
||||
./tools/check-symbol-names runtime/*.a
|
||||
}
|
||||
|
||||
Test () {
|
||||
cd testsuite
|
||||
echo Running the testsuite with the normal runtime
|
||||
$MAKE all
|
||||
echo Running the testsuite with the debug runtime
|
||||
$MAKE USE_RUNTIME='d' OCAMLTESTDIR="$(pwd)/_ocamltestd" TESTLOG=_logd all
|
||||
cd ..
|
||||
}
|
||||
|
||||
API_Docs () {
|
||||
echo Ensuring that all library documentation compiles
|
||||
$MAKE -C ocamldoc html_doc pdf_doc texi_doc
|
||||
}
|
||||
|
||||
Install () {
|
||||
$MAKE install
|
||||
}
|
||||
|
||||
Checks () {
|
||||
if fgrep 'SUPPORTS_SHARED_LIBRARIES=true' Makefile.config &>/dev/null ; then
|
||||
echo Check the code examples in the manual
|
||||
$MAKE manual-pregen
|
||||
fi
|
||||
# check_all_arches checks tries to compile all backends in place,
|
||||
# we would need to redo (small parts of) world.opt afterwards to
|
||||
# use the compiler again
|
||||
$MAKE check_all_arches
|
||||
# Ensure that .gitignore is up-to-date - this will fail if any untreacked or
|
||||
# altered files exist.
|
||||
test -z "$(git status --porcelain)"
|
||||
# check that the 'clean' target also works
|
||||
$MAKE clean
|
||||
$MAKE -C manual clean
|
||||
# check that the `distclean` target definitely cleans the tree
|
||||
$MAKE distclean
|
||||
# Check the working tree is clean
|
||||
test -z "$(git status --porcelain)"
|
||||
# Check that there are no ignored files
|
||||
test -z "$(git ls-files --others -i --exclude-standard)"
|
||||
}
|
||||
|
||||
CheckManual () {
|
||||
cat<<EOF
|
||||
--------------------------------------------------------------------------
|
||||
This test checks the global structure of the reference manual
|
||||
(e.g. missing chapters).
|
||||
--------------------------------------------------------------------------
|
||||
EOF
|
||||
# we need some of the configuration data provided by configure
|
||||
./configure
|
||||
$MAKE check-stdlib check-case-collision -C manual/tests
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
configure) Configure;;
|
||||
build) Build;;
|
||||
test) Test;;
|
||||
api-docs) API_Docs;;
|
||||
install) Install;;
|
||||
other-checks) Checks;;
|
||||
*) echo "Unknown CI instruction: $1"
|
||||
exit 1;;
|
||||
esac
|
|
@ -22,7 +22,23 @@ set -e
|
|||
mainjob=./tools/ci/inria/main
|
||||
main="${mainjob} -j8"
|
||||
|
||||
${main} -conf --disable-native-compiler -no-native
|
||||
# The "MIN_BUILD" (formerly on Travis) builds with everything disabled (apart
|
||||
# from ocamltest). Its goals:
|
||||
# - Ensure that the system builds correctly without native compilation
|
||||
# - Ensure ocamltest builds correctly with Unix
|
||||
# - Ensure the testsuite runs correctly with everything switched off
|
||||
${main} -conf --disable-native-compiler \
|
||||
-conf --disable-shared \
|
||||
-conf --disable-debug-runtime \
|
||||
-conf --disable-instrumented-runtime \
|
||||
-conf --disable-systhreads \
|
||||
-conf --disable-str-lib \
|
||||
-conf --disable-unix-lib \
|
||||
-conf --disable-bigarray-lib \
|
||||
-conf --disable-ocamldoc \
|
||||
-conf --disable-native-compiler \
|
||||
-conf --disable-dependency-generation \
|
||||
-no-native
|
||||
${main} -conf --disable-naked-pointers
|
||||
${main} -with-bootstrap -conf --disable-flat-float-array
|
||||
${main} -conf --enable-flambda -conf --disable-naked-pointers
|
||||
|
|
Loading…
Reference in New Issue