Skip to content

Commit ab507d7

Browse files
ci: add builds on Arch with gcc-8
- GEN8 and GEN9 support is built and tested separately - don't use dpkg in Arch builds - optimize build times Change-Id: I0be818d2afa9a86281a4e4030e8ecd10cd861efe Signed-off-by: Jacek Danecki <[email protected]>
1 parent 4c4e682 commit ab507d7

File tree

8 files changed

+77
-12
lines changed

8 files changed

+77
-12
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ matrix:
3434
- os: linux
3535
compiler: gcc
3636
env: BUILD_OS=arch COMPILER=gcc-5
37+
- os: linux
38+
compiler: gcc
39+
env: BUILD_OS=arch COMPILER=gcc-8 GEN=gen-8
40+
- os: linux
41+
compiler: gcc
42+
env: BUILD_OS=arch COMPILER=gcc-8 GEN=gen-9
3743

3844
script: ./scripts/run-build.sh
3945

scripts/build-arch-dep.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@
1919
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
# OTHER DEALINGS IN THE SOFTWARE.
2121

22-
wget https://aur.archlinux.org/cgit/aur.git/snapshot/dpkg.tar.gz
23-
tar -xzf dpkg.tar.gz
24-
pushd dpkg
25-
makepkg -i --noconfirm
26-
popd
27-
2822
wget https://aur.archlinux.org/cgit/aur.git/snapshot/ncurses5-compat-libs.tar.gz
2923
tar -xzf ncurses5-compat-libs.tar.gz
3024
pushd ncurses5-compat-libs

scripts/docker/Dockerfile-arch-gcc-5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ COPY scripts/prepare-workspace.sh /root
99
RUN /root/prepare-arch-gcc-5.sh
1010
RUN /root/prepare-workspace.sh
1111
RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \
12-
-DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 ../neo; \
13-
ninja -j `nproc`
12+
-DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 \
13+
-DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc`
1414
CMD ["/bin/bash"]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM docker.io/base/archlinux
2+
MAINTAINER Jacek Danecki <[email protected]>
3+
4+
COPY neo /root/neo
5+
COPY scripts/prepare-arch-gcc-8.sh /root
6+
COPY scripts/build-arch-dep.sh /root
7+
COPY scripts/prepare-workspace.sh /root
8+
9+
RUN /root/prepare-arch-gcc-8.sh
10+
RUN /root/prepare-workspace.sh
11+
RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \
12+
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSUPPORT_GEN9=0 \
13+
-DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc`
14+
CMD ["/bin/bash"]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM docker.io/base/archlinux
2+
MAINTAINER Jacek Danecki <[email protected]>
3+
4+
COPY neo /root/neo
5+
COPY scripts/prepare-arch-gcc-8.sh /root
6+
COPY scripts/build-arch-dep.sh /root
7+
COPY scripts/prepare-workspace.sh /root
8+
9+
RUN /root/prepare-arch-gcc-8.sh
10+
RUN /root/prepare-workspace.sh
11+
RUN cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \
12+
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSUPPORT_GEN8=0 \
13+
-DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 ../neo ; ninja -j `nproc`
14+
CMD ["/bin/bash"]

scripts/igc/prepare.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222

2323
NEO_TOP_DIR=`git rev-parse --show-toplevel`
24-
ARCH=`dpkg --print-architecture`
2524
WRK_DIR=${NEO_TOP_DIR}/..
2625
mkdir -p ${WRK_DIR}/igc/inc
2726
cp CMakeLists.txt ${WRK_DIR}/igc
@@ -30,8 +29,9 @@ pushd ${WRK_DIR}/igc
3029
VER=2018ww19-010806
3130
IGC_REV=858e183
3231

33-
wget https://github.com/intel/compute-runtime/releases/download/${VER}/intel-opencl_${VER}_${ARCH}.deb
34-
dpkg-deb -x intel-opencl_${VER}_${ARCH}.deb .
32+
wget https://github.com/intel/compute-runtime/releases/download/${VER}/intel-opencl_${VER}_amd64.deb
33+
ar -x intel-opencl_${VER}_amd64.deb
34+
tar -xJf data.tar.xz
3535
rm opt/intel/opencl/libigdrcl.so
3636
ln -s opt/intel/opencl lib
3737

scripts/prepare-arch-gcc-8.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
# Copyright (c) 2018, Intel Corporation
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a
5+
# copy of this software and associated documentation files (the "Software"),
6+
# to deal in the Software without restriction, including without limitation
7+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
# and/or sell copies of the Software, and to permit persons to whom the
9+
# Software is furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included
12+
# in all copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
# OTHER DEALINGS IN THE SOFTWARE.
21+
22+
pacman -Sy --noconfirm gcc cmake git make wget pkg-config fakeroot ninja sudo \
23+
perl-io-string perl-test-pod autoconf automake patch
24+
useradd -m build -g wheel
25+
sed -i "s/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers
26+
cp -a /root/*.sh /home/build
27+
su -l build /home/build/build-arch-dep.sh
28+

scripts/run-build.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
# OTHER DEALINGS IN THE SOFTWARE.
2121

22+
DOCKERFILE=Dockerfile-${BUILD_OS}-${COMPILER}
23+
IMAGE=neo-${BUILD_OS}-${COMPILER}:ci
24+
25+
if [ -n "$GEN" ]
26+
then
27+
DOCKERFILE=${DOCKERFILE}-${GEN}
28+
IMAGE=neo-${BUILD_OS}-${COMPILER}-${GEN}:ci
29+
fi
30+
2231
git clone --depth 1 ../compute-runtime neo && \
23-
docker build -f scripts/docker/Dockerfile-${BUILD_OS}-${COMPILER} -t neo-${BUILD_OS}-${COMPILER}:ci . && \
32+
docker build -f scripts/docker/${DOCKERFILE} -t ${IMAGE} . && \
2433
docker images

0 commit comments

Comments
 (0)