Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc-5, gcc-6, gcc-7, gcc-8]
env:
WORKFLOW: CI
steps:
- uses: actions/checkout@v2
with:
path: neo
- name: echo
run: |
env
- name: prepare image
env:
BUILD_OS: ubuntu-18.04
COMPILER: ${{ matrix.compiler }}
working-directory: neo/scripts/actions
run: ./run-action-docker-prepare.sh
- name: build
env:
BUILD_OS: ubuntu-18.04
COMPILER: ${{ matrix.compiler }}
run: ./neo/scripts/actions/run-action-build.sh
- name: prepare artifacts
if: matrix.compiler == 'gcc-7'
run: |
mkdir artifacts
mv build/*.deb artifacts/
- name: artifacts
if: matrix.compiler == 'gcc-7'
uses: actions/upload-artifact@v1
with:
name: package
path: artifacts
37 changes: 37 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: verify
on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc-5, gcc-6, gcc-7, gcc-8]
env:
WORKFLOW: VERIFY
steps:
- uses: actions/checkout@v2
with:
path: neo
- name: prepare image
env:
BUILD_OS: ubuntu-18.04
COMPILER: ${{ matrix.compiler }}
working-directory: neo/scripts/actions
run: ./run-action-docker-prepare.sh
- name: build
env:
BUILD_OS: ubuntu-18.04
COMPILER: ${{ matrix.compiler }}
run: ./neo/scripts/actions/run-action-build.sh
- name: prepare artifacts
if: matrix.compiler == 'gcc-7'
run: |
mkdir artifacts
mv build/*.deb artifacts/
- name: upload artifacts
if: matrix.compiler == 'gcc-7'
uses: actions/upload-artifact@v1
with:
name: package
path: artifacts
12 changes: 12 additions & 0 deletions scripts/actions/docker/Dockerfile-ubuntu-18.04-gcc-5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM docker.io/ubuntu:18.04
MAINTAINER Jacek Danecki <jacek.danecki@intel.com>

RUN apt-get -y update ; apt-get install -y --allow-unauthenticated gpg; \
echo "deb http://ppa.launchpad.net/ocl-dev/intel-opencl/ubuntu bionic main" >> /etc/apt/sources.list; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3086B78CC05B8B1; \
apt-get -y update ; apt-get install -y --allow-unauthenticated cmake g++-5 git pkg-config ninja-build libigc-dev intel-gmmlib-dev file

ENV CC gcc-5
ENV CXX g++-5

CMD ["/bin/bash"]
12 changes: 12 additions & 0 deletions scripts/actions/docker/Dockerfile-ubuntu-18.04-gcc-6
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM docker.io/ubuntu:18.04
MAINTAINER Jacek Danecki <jacek.danecki@intel.com>

RUN apt-get -y update ; apt-get install -y --allow-unauthenticated gpg; \
echo "deb http://ppa.launchpad.net/ocl-dev/intel-opencl/ubuntu bionic main" >> /etc/apt/sources.list; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3086B78CC05B8B1; \
apt-get -y update ; apt-get install -y --allow-unauthenticated cmake g++-6 git pkg-config ninja-build libigc-dev intel-gmmlib-dev file

ENV CC gcc-6
ENV CXX g++-6

CMD ["/bin/bash"]
12 changes: 12 additions & 0 deletions scripts/actions/docker/Dockerfile-ubuntu-18.04-gcc-7
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM docker.io/ubuntu:18.04
MAINTAINER Jacek Danecki <jacek.danecki@intel.com>

RUN apt-get -y update ; apt-get install -y --allow-unauthenticated gpg; \
echo "deb http://ppa.launchpad.net/ocl-dev/intel-opencl/ubuntu bionic main" >> /etc/apt/sources.list; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3086B78CC05B8B1; \
apt-get -y update ; apt-get install -y --allow-unauthenticated cmake g++-7 git pkg-config ninja-build libigc-dev intel-gmmlib-dev file

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

CMD ["/bin/bash"]
12 changes: 12 additions & 0 deletions scripts/actions/docker/Dockerfile-ubuntu-18.04-gcc-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM docker.io/ubuntu:18.04
MAINTAINER Jacek Danecki <jacek.danecki@intel.com>

RUN apt-get -y update ; apt-get install -y --allow-unauthenticated gpg; \
echo "deb http://ppa.launchpad.net/ocl-dev/intel-opencl/ubuntu bionic main" >> /etc/apt/sources.list; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3086B78CC05B8B1; \
apt-get -y update ; apt-get install -y --allow-unauthenticated cmake g++-8 git pkg-config ninja-build libigc-dev intel-gmmlib-dev file

ENV CC gcc-8
ENV CXX g++-8

CMD ["/bin/bash"]
27 changes: 27 additions & 0 deletions scripts/actions/run-action-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash -x
#
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
#

IMAGE=neo-${BUILD_OS}-${COMPILER}:ci
export WORKFLOW="${WORKFLOW:-VERIFY}"
export BUILD_TYPE="${BUILD_TYPE:-Release}"

echo "Using ${IMAGE}"
echo "Build type: ${BUILD_TYPE}"
echo "Workflow: ${WORKFLOW}"

rm -rf build
mkdir build

skip_unit_tests="FALSE"
if [ "${WORKFLOW}" = "CI" ]; then
skip_unit_tests="TRUE"
if [ "${COMPILER}" = "gcc-5" ] || [ "${COMPILER}" == "gcc-6" ]; then
skip_unit_tests="FALSE"
fi
fi
docker run --rm -u `id -u`:`id -g` -v `pwd`:/src -w /src/build -t ${IMAGE} cmake -GNinja ../neo -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSKIP_UNIT_TESTS=${skip_unit_tests}
docker run --rm -u `id -u`:`id -g` -v `pwd`:/src -w /src/build -t ${IMAGE} ninja package
21 changes: 21 additions & 0 deletions scripts/actions/run-action-docker-prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
#
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
#

DOCKERFILE=Dockerfile-${BUILD_OS}-${COMPILER}
IMAGE=neo-${BUILD_OS}-${COMPILER}:ci

if [ -n "$GEN" ]
then
DOCKERFILE=${DOCKERFILE}-${GEN}
IMAGE=neo-${BUILD_OS}-${COMPILER}-${GEN}:ci
fi

echo Using ${DOCKERFILE}

cd docker
docker build -f ${DOCKERFILE} -t ${IMAGE} .
docker images