Commit 39aaa436 authored by Claudio André's avatar Claudio André

CI: on fresh docker images build using autotools

Do build using autotools (a regular build) when running in an updated
distro.
[skip eslint]
parent 3d3b105e
......@@ -14,14 +14,18 @@ stages:
name: log
when: always
paths:
- $(pwd)/.cache/jhbuild/build/gjs/test-suite.log
- $(pwd)/.cache/jhbuild/build/gjs/config.log
- $(pwd)/.cache/jhbuild/build/gjs/*.log
- $(pwd)/.cache/jhbuild/build/gjs/Makefile
- $(pwd)/.cache/jhbuild/build/gjs/configure
- $(pwd)/coverage/
- $(pwd)/cppcheck/
- $(pwd)/cpplint/
- $(pwd)/eslint/
- $(pwd)/tokei/
- $(pwd)/gjs-1.*/_build/sub/test-suite.log
- $(pwd)/*.log
- $(pwd)/Makefile
- $(pwd)/configure
script:
# CI starts here. Previous messages are GitLab Runner setup.
......@@ -33,11 +37,11 @@ stages:
- echo
# Run static code analysis OR
# Build dependencies and 'make check' gjs
# Build dependencies and 'make' gjs
- 'if [[ -n "${CODECHECK}" ]]; then
$(pwd)/test/test-ci.sh "$CODECHECK";
else
$(pwd)/test/test-ci.sh GJS "$DEV";
$(pwd)/test/test-ci.sh GJS;
fi'
# Run extra tests
......@@ -58,7 +62,6 @@ fedora:
variables:
CC: gcc
DEV: devel
TEST: "fast"
ubuntu_gcc:
<<: *build
......@@ -67,6 +70,7 @@ ubuntu_gcc:
variables:
CC: gcc
DEV: devel
TEST: "distcheck"
BUILD_OPTS: "--enable-installed-tests"
only:
- master@GNOME/gjs
......@@ -78,6 +82,7 @@ ubuntu_clang:
variables:
CC: clang
DEV: devel
TEST: "distcheck"
BUILD_OPTS: "--enable-installed-tests"
only:
- master@GNOME/gjs
......@@ -89,6 +94,7 @@ fedora_gcc:
variables:
CC: gcc
DEV: devel
TEST: "distcheck"
BUILD_OPTS: "--enable-ubsan"
coverage:
......
......@@ -199,6 +199,7 @@ EXTRA_DIST += \
TAG_PREFIX=GJS_
COMPRESSION=.bz2
DISTCLEANFILES=gjs-*.syscap installed-tests/scripts/*.test installed-tests/js/*.test
PACKAGE=@PACKAGE@
VERSION=@VERSION@
......
......@@ -41,6 +41,7 @@ function do_Configure_MainBuild(){
if [[ -n "${BUILD_OPTS}" ]]; then
autogenargs="$autogenargs $BUILD_OPTS"
fi
export ci_autogenargs="$autogenargs"
cat <<EOFILE > ~/.config/jhbuildrc
module_autogenargs['gjs'] = "$autogenargs"
......
......@@ -33,6 +33,7 @@ function do_Show_Info(){
echo '--------------------------------'
echo 'Useful build system information'
echo -n "Processors: "; grep -c ^processor /proc/cpuinfo
id; uname -a
printenv
echo '--------------------------------'
......@@ -108,7 +109,7 @@ if [[ $1 == "GJS" ]]; then
do_Set_Env
do_Show_Info
if [[ $2 != "devel" ]]; then
if [[ "$DEV" != "devel" ]]; then
do_Get_JHBuild
do_Build_JHBuild
do_Configure_JHBuild
......@@ -123,15 +124,36 @@ if [[ $1 == "GJS" ]]; then
# Javascript Bindings for GNOME (gjs)
echo
echo '-- gjs status --'
cp -r ./ ~/jhbuild/checkout/gjs
cd ~/jhbuild/checkout/gjs
git log --pretty=format:"%h %cd %s" -1
echo
echo '-- gjs build --'
echo
jhbuild make --check
if [[ "$DEV" != "devel" ]]; then
cp -r ./ ~/jhbuild/checkout/gjs
cd ~/jhbuild/checkout/gjs
jhbuild make --check
else
# Ignore JHBuild "chroot" and do a system wide (regular) setup
export PKG_CONFIG_PATH=/root/jhbuild/install/lib/pkgconfig
export LD_LIBRARY_PATH=/root/jhbuild/install/lib
export AM_DISTCHECK_CONFIGURE_FLAGS="--enable-compile-warnings=error --with-xvfb-tests"
# Regular (autotools only) build
echo "Autogen options: $ci_autogenargs"
eval ./autogen.sh "$ci_autogenargs"
if [[ $TEST == "build" ]]; then
make -sj
elif [[ $TEST == "distcheck" ]]; then
make -sj distcheck
else
make -sj check
fi
make -sj install
fi
elif [[ $1 == "GJS_EXTRA" ]]; then
# Extra testing. It doesn't (re)build, just run the 'Installed Tests'
......@@ -140,7 +162,11 @@ elif [[ $1 == "GJS_EXTRA" ]]; then
do_Set_Env
PATH=$PATH:~/.local/bin
xvfb-run jhbuild run dbus-run-session -- gnome-desktop-testing-runner gjs
if [[ "$DEV" != "devel" ]]; then
xvfb-run jhbuild run dbus-run-session -- gnome-desktop-testing-runner gjs
else
xvfb-run dbus-run-session -- gnome-desktop-testing-runner gjs
fi
elif [[ $1 == "GJS_COVERAGE" ]]; then
# Code coverage test. It doesn't (re)build, just run the 'Coverage Tests'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment