diff options
Diffstat (limited to 'test/extra')
| -rw-r--r-- | test/extra/Dockerfile.arm64v8.fedora.29 | 11 | ||||
| -rw-r--r-- | test/extra/Dockerfile.fedora.static-analysis | 4 | ||||
| -rw-r--r-- | test/extra/Dockerfile.ppc64le.fedora.29 | 11 | ||||
| -rwxr-xr-x | test/extra/do_basic.sh | 79 | ||||
| -rwxr-xr-x | test/extra/do_docker.sh | 20 | ||||
| -rwxr-xr-x | test/extra/do_environment.sh | 90 | ||||
| -rwxr-xr-x | test/extra/do_mozilla.sh | 39 |
7 files changed, 32 insertions, 222 deletions
diff --git a/test/extra/Dockerfile.arm64v8.fedora.29 b/test/extra/Dockerfile.arm64v8.fedora.29 deleted file mode 100644 index 92a6b03e..00000000 --- a/test/extra/Dockerfile.arm64v8.fedora.29 +++ /dev/null @@ -1,11 +0,0 @@ -FROM arm64v8/fedora:rawhide -MAINTAINER Claudio André (c) 2018 V1.0 - -LABEL architecture="aarch64" -LABEL version="1.0" -LABEL description="Multiarch docker image to run CI for GNOME GJS." - -ADD x86_64_qemu-aarch64-static.tar.gz /usr/bin - -CMD ["/bin/bash"] - diff --git a/test/extra/Dockerfile.fedora.static-analysis b/test/extra/Dockerfile.fedora.static-analysis index 70f62115..05b3d60a 100644 --- a/test/extra/Dockerfile.fedora.static-analysis +++ b/test/extra/Dockerfile.fedora.static-analysis @@ -6,11 +6,9 @@ LABEL version="1.0" LABEL description="Docker image to run CI for GNOME GJS (JavaScript bindings for GNOME)." RUN dnf -y --nogpgcheck upgrade && \ - dnf -y install \ - git cppcheck tokei nodejs python-devel && \ + dnf -y install git python-devel && \ mkdir -p /cwd && \ pip install cpplint && \ - npm install -g eslint && \ dnf -y clean all && \ rm -rf /var/cache/dnf diff --git a/test/extra/Dockerfile.ppc64le.fedora.29 b/test/extra/Dockerfile.ppc64le.fedora.29 deleted file mode 100644 index 400d81c3..00000000 --- a/test/extra/Dockerfile.ppc64le.fedora.29 +++ /dev/null @@ -1,11 +0,0 @@ -FROM ppc64le/fedora:rawhide -MAINTAINER Claudio André (c) 2018 V1.0 - -LABEL architecture="ppc64le" -LABEL version="1.0" -LABEL description="Multiarch docker image to run CI for GNOME GJS." - -ADD x86_64_qemu-ppc64le-static.tar.gz /usr/bin - -CMD ["/bin/bash"] - diff --git a/test/extra/do_basic.sh b/test/extra/do_basic.sh index aa7a6bf2..65b74160 100755 --- a/test/extra/do_basic.sh +++ b/test/extra/do_basic.sh @@ -4,65 +4,22 @@ function do_Install_Dependencies(){ echo echo '-- Installing Base Dependencies --' - if [[ $BASE == "debian" ]]; then - apt-get update - - # Base dependencies - apt-get -y install build-essential git clang patch bison flex \ - meson ninja-build python-dev python3-dev \ - autotools-dev autoconf gettext pkgconf autopoint yelp-tools \ - docbook docbook-xsl libtext-csv-perl \ - zlib1g-dev libdbus-glib-1-dev \ - libtool libicu-dev libnspr4-dev \ - policykit-1 python3-setuptools \ - libgtk-3-dev gir1.2-gtk-3.0 xvfb gnome-desktop-testing dbus-x11 dbus \ - libedit-dev libgl1-mesa-dev lcov libreadline-dev - - elif [[ $BASE == "fedora" ]]; then - if [[ $STATIC == *"qemu"* ]]; then - dnf -y --nogpgcheck upgrade --best --allowerasing - else - dnf -y upgrade --best --allowerasing - fi - - # Base dependencies - dnf -y install @c-development @development-tools clang redhat-rpm-config gnome-common python-devel \ - pygobject2 dbus-python perl-Text-CSV perl-XML-Parser gettext-devel gtk-doc \ - meson ninja-build zlib-devel libffi-devel \ - libtool libicu-devel nspr-devel systemtap-sdt-devel \ - gtk3 gtk3-devel gobject-introspection Xvfb gnome-desktop-testing dbus-x11 \ - cairo intltool libxslt bison nspr python3-devel dbus-glib libicu \ - libxslt libtool flex \ - cairo-devel zlib-devel libffi-devel pcre-devel libxml2-devel libxslt-devel \ - libedit-devel libasan libubsan libtsan compiler-rt \ - sysprof-devel lcov mesa-libGL-devel readline-devel \ - webkit2gtk3 - - if [[ $DEV == "devel" ]]; then - dnf -y install time - fi - else - echo - echo '-- Error: invalid BASE code --' - exit 1 - fi -} - -function do_Install_Extras(){ - echo - echo '-- Installing Extra Dependencies --' - - if [[ $BASE == "debian" ]]; then - # Distros development versions of needed libraries - apt-get -y install libgirepository1.0-dev libwebkit2gtk-4.0-dev notify-osd - - elif [[ $BASE == "fedora" ]]; then - # Distros development versions of needed libraries - dnf -y install gobject-introspection-devel - - if [[ $STATIC != *"qemu"* ]]; then - # Distros debug info of needed libraries - dnf -y debuginfo-install glib2-devel gobject-introspection-devel gtk3-devel expat fontconfig cairo glibc - fi - fi + dnf -y upgrade --best --allowerasing + + # Base dependencies + dnf -y install @c-development @development-tools clang redhat-rpm-config gnome-common python-devel \ + pygobject2 dbus-python perl-Text-CSV perl-XML-Parser gettext-devel gtk-doc \ + autoconf-archive meson ninja-build zlib-devel libffi-devel \ + libtool libicu-devel nspr-devel systemtap-sdt-devel \ + gtk3 gtk3-devel gobject-introspection-devel Xvfb gnome-desktop-testing dbus-x11 \ + cairo intltool libxslt bison nspr python3-devel dbus-glib libicu \ + libxslt libtool flex \ + cairo-devel zlib-devel libffi-devel pcre-devel libxml2-devel libxslt-devel \ + libedit-devel libasan libubsan libtsan compiler-rt \ + sysprof-devel lcov mesa-libGL-devel readline-devel \ + webkit2gtk3 time + + # Distros debug info of needed libraries + dnf -y debuginfo-install glib2-devel gobject-introspection-devel \ + gtk3-devel expat fontconfig cairo glibc } diff --git a/test/extra/do_docker.sh b/test/extra/do_docker.sh index 3930e3c9..b92c9899 100755 --- a/test/extra/do_docker.sh +++ b/test/extra/do_docker.sh @@ -6,14 +6,8 @@ function do_Shrink_Image(){ PATH=$PATH:~/.local/bin rm -rf ~/jhbuild/install/lib/libjs_static.ajs - if [[ $BASE == "ubuntu" ]]; then - apt-get -y clean - rm -rf /var/lib/apt/lists/* - - elif [[ $BASE == "fedora" ]]; then - dnf -y clean all - rm -rf /var/cache/dnf - fi + dnf -y clean all + rm -rf /var/cache/dnf echo '-- Done --' } @@ -21,18 +15,8 @@ function do_Shrink_Image(){ if [[ $1 == "BUILD_MOZ" ]]; then do_Install_Dependencies do_Set_Env - - if [[ $DEV == "devel" ]]; then - do_Install_Extras - fi do_Show_Info - do_Get_JHBuild - do_Build_JHBuild do_Build_Mozilla - - # Build JHBuild to create a docker image ready to go - jhbuild build m4-common - do_Shrink_Image fi # Clear the environment diff --git a/test/extra/do_environment.sh b/test/extra/do_environment.sh index 957b6ff3..514d48ce 100755 --- a/test/extra/do_environment.sh +++ b/test/extra/do_environment.sh @@ -1,86 +1,20 @@ -#!/bin/bash -e +#!/bin/sh -e -function do_Get_JHBuild(){ - do_Print_Labels 'Download JHBuild' +do_Configure_MainBuild () { + do_Print_Labels 'Set Main Build Configuration' - if [[ -d /jhbuild ]]; then - # For a clean build, update and rebuild jhbuild. And avoid git pull. - rm -rf /jhbuild - fi - git clone --depth 1 https://github.com/GNOME/jhbuild.git /jhbuild - - # A patch is no longer required - cd /jhbuild - - echo '-- Done --' - cd - -} - -function do_Configure_JHBuild(){ - do_Print_Labels 'Set JHBuild Configuration' - - mkdir -p ~/.config - - cat <<EOFILE > ~/.config/jhbuildrc -skip = ['gettext', 'yelp-xsl', 'yelp-tools', 'gtk-doc'] -use_local_modulesets = True -EOFILE - - echo '-- Done --' -} - -function do_Configure_MainBuild(){ - do_Print_Labels 'Set Main JHBuild Configuration' - - mkdir -p ~/.config autogenargs="--enable-compile-warnings=yes" - if [[ -n "${BUILD_OPTS}" ]]; then + if test -n "$BUILD_OPTS"; then autogenargs="$autogenargs $BUILD_OPTS" fi export ci_autogenargs="$autogenargs" - cat <<EOFILE > ~/.config/jhbuildrc -module_autogenargs['gjs'] = "$autogenargs" -module_makeargs['gjs'] = '-s -j 1' -skip = ['gettext', 'yelp-xsl', 'yelp-tools', 'gtk-doc'] -use_local_modulesets = True -disable_Werror = False -EOFILE - echo '-- Done --' } -function do_Build_Package_Dependencies(){ - do_Print_Labels "Building Dependencies for $1" - jhbuild list "$1" - - # Build package dependencies - jhbuild build $(jhbuild list "$1" | sed '$d') -} - -function do_Build_JHBuild(){ - do_Print_Labels 'Building JHBuild' - - # Build JHBuild - cd /jhbuild - git log --pretty=format:"%h %cd %s" -1 - echo - ./autogen.sh PYTHON=$(which python2) - make -sj2 - make install - PATH=$PATH:~/.local/bin - - if [[ $1 == "RESET" ]]; then - git reset --hard HEAD - fi - echo '-- Done --' - cd - -} - -function do_Print_Labels(){ - - if [[ -n "${1}" ]]; then +do_Print_Labels () { + if test -n "$1"; then label_len=${#1} span=$(((54 - $label_len) / 2)) @@ -94,15 +28,13 @@ function do_Print_Labels(){ fi } -function do_Done(){ - +do_Done () { # Done. De-initializes whatever is needed do_Print_Labels 'FINISHED' } -function do_Show_Info(){ - - local compiler=gcc +do_Show_Info () { + local compiler="${CC:-gcc}" echo '-----------------------------------------' echo 'Build system information' @@ -113,10 +45,6 @@ function do_Show_Info(){ echo '-----------------------------------------' cat /etc/*-release echo '-----------------------------------------' - - if [[ ! -z $CC ]]; then - compiler=$CC - fi echo 'Compiler version' $compiler --version echo '-----------------------------------------' diff --git a/test/extra/do_mozilla.sh b/test/extra/do_mozilla.sh index ef7342f0..f3b768d4 100755 --- a/test/extra/do_mozilla.sh +++ b/test/extra/do_mozilla.sh @@ -1,46 +1,11 @@ #!/bin/bash -e -function do_Configure_MozBuild(){ - echo - echo '-- Set JHBuild Configuration --' - - mkdir -p ~/.config - autogenargs="" - - if [[ -n "${BUILD_OPTS}" ]]; then - autogenargs="$autogenargs $BUILD_OPTS" - fi - - cat <<EOFILE >> ~/.config/jhbuildrc -module_autogenargs['mozjs60'] = "$autogenargs" -module_makeargs['mozjs60'] = '-s' -EOFILE - - echo '-- Done --' -} - -function do_Build_Mozilla_jhbuild(){ - echo - echo '-- Building Mozilla SpiderMonkey --' - - # Configure the Mozilla build - do_Configure_MozBuild - - # Build Mozilla Stuff - jhbuild build mozjs60 -} - function do_Build_Mozilla(){ echo echo '-- Building Mozilla SpiderMonkey --' - if [[ $STATIC == "moz52" ]]; then - git clone --depth 1 https://github.com/ptomato/mozjs.git -b mozjs52 /on-host/spider - cd /on-host/spider - else - git clone --depth 1 https://github.com/ptomato/mozjs.git -b mozjs60 /on-host/spider - cd /on-host/spider - fi + git clone --depth 1 https://github.com/ptomato/mozjs.git -b "${MOZJS_BRANCH:-mozjs60}" /on-host/spider + cd /on-host/spider mkdir -p _build cd _build |
