Skip to content

Commit

Permalink
PR Builds: New Features
Browse files Browse the repository at this point in the history
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse#1281
    - eclipse#6468
    - eclipse#6477
    - eclipse#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
  • Loading branch information
babsingh committed Jun 16, 2022
1 parent eed9007 commit 598ead2
Show file tree
Hide file tree
Showing 4 changed files with 417 additions and 176 deletions.
61 changes: 0 additions & 61 deletions buildenv/docker/x86_64/ubuntu16/Dockerfile

This file was deleted.

63 changes: 63 additions & 0 deletions buildenv/docker/x86_64/ubuntu20/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright (c) 2022, 2022 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
# or the Apache License, Version 2.0 which accompanies this distribution and
# is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# This Source Code may also be made available under the following
# Secondary Licenses when the conditions for such availability set
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
# General Public License, version 2 with the GNU Classpath
# Exception [1] and GNU General Public License, version 2 with the
# OpenJDK Assembly Exception [2].
#
# [1] https://www.gnu.org/software/classpath/license.html
# [2] http://openjdk.java.net/legal/assembly-exception.html
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception

# Create the OMR build environment with Ubuntu 20.04.

FROM nvidia/cuda:9.0-devel-ubuntu16.04 AS cuda-dev

FROM ubuntu:20.04 AS base

# Workaround for a hang during docker build.
ENV TZ=America/Toronto
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && apt-get install -y \
tzdata \
python3 \
git \
cmake \
bison \
flex \
libelf-dev \
libdwarf-dev \
gdb \
vim \
gcc-7-multilib \
g++-7-multilib \
gcc-7 \
g++-7 \
ninja-build \
ccache \
&& rm -rf /var/lib/apt/lists/*

# Add user home and copy authorized_keys and known_hosts.
RUN groupadd -r jenkins \
&& useradd -rm -u 1000 -g jenkins jenkins \
&& mkdir -p /home/jenkins/.ssh \
&& echo "Host git.eclipse.org*\n\tStrictHostKeyChecking no\n" > /home/jenkins/.ssh/config \
&& chown -R jenkins:jenkins /home/jenkins

# Copy header files necessary to build with CUDA support.
RUN mkdir -p /usr/local/cuda/nvvm
COPY --from=cuda-dev /usr/local/cuda-9.0/include /usr/local/cuda/include
COPY --from=cuda-dev /usr/local/cuda-9.0/nvvm/include /usr/local/cuda/nvvm/include
ENV CUDA_HOME=/usr/local/cuda

ENV CC=gcc-7 CXX=g++-7

0 comments on commit 598ead2

Please sign in to comment.