-
Notifications
You must be signed in to change notification settings - Fork 277
enabling actions #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enabling actions #260
Changes from all commits
adb896e
04fc70f
3bb82e7
be4b773
d2b767a
a3b13e4
025284f
7368244
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # | ||
| # Copyright (C) 2020-2021 Intel Corporation | ||
| # | ||
| # SPDX-License-Identifier: MIT | ||
| # | ||
|
|
||
| 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: ${{ github.workflow }} | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
ArturHarasimiuk marked this conversation as resolved.
|
||
| 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: upload artifacts | ||
| if: matrix.compiler == 'gcc-7' | ||
| uses: actions/upload-artifact@v1 | ||
| with: | ||
| name: package | ||
| path: artifacts | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,3 +19,49 @@ jobs: | |
| uses: ./neo/.github/actions/neo-lint | ||
| with: | ||
| path: neo | ||
|
|
||
| build: | ||
| needs: | ||
| - lint | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| compiler: | ||
| - [gcc-7, g++-7] | ||
| - [gcc-8, g++-8] | ||
| - [gcc-9, g++-9] | ||
| - [gcc-10, g++-10] | ||
| fail-fast: false | ||
| env: | ||
| WORKFLOW: ${{ github.workflow }} | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
ArturHarasimiuk marked this conversation as resolved.
|
||
| with: | ||
| path: neo | ||
| - name: prepare image | ||
| env: | ||
| BUILD_OS: ubuntu-20.04 | ||
| working-directory: neo/scripts/actions | ||
| run: ./run-action-docker-prepare.sh | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about using |
||
| - name: build | ||
| env: | ||
| CC: ${{ matrix.compiler[0] }} | ||
| CXX: ${{ matrix.compiler[1] }} | ||
| BUILD_OS: ubuntu-20.04 | ||
| run: ./neo/scripts/actions/run-action-build.sh | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this should launch a different script, right? Would it be better to just express it via separate job in the CI workflow? |
||
| - name: prepare artifacts | ||
| if: matrix.compiler == 'gcc-7' | ||
| run: | | ||
| mkdir artifacts | ||
| mv build/*.deb artifacts/ | ||
| - name: upload tests | ||
| uses: actions/upload-artifact@v1 | ||
| with: | ||
| name: tests | ||
| path: build/bin | ||
| - name: upload artifacts | ||
| if: matrix.compiler == 'gcc-7' | ||
| uses: actions/upload-artifact@v1 | ||
| with: | ||
| name: package | ||
| path: artifacts | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| FROM docker.io/ubuntu:20.04 | ||
| MAINTAINER Jacek Danecki <jacek.danecki@intel.com> | ||
|
|
||
| RUN apt-get -y update ; apt-get install -y --allow-unauthenticated --no-install-recommends gpg software-properties-common | ||
| RUN add-apt-repository -y ppa:intel-opencl/intel-opencl | ||
| RUN apt-get -y update ; apt-get install -y --allow-unauthenticated \ | ||
| cmake \ | ||
| g++-7 \ | ||
| g++-8 \ | ||
| g++-9 \ | ||
| g++-10 \ | ||
| git \ | ||
| pkg-config \ | ||
| ninja-build \ | ||
| libigc-dev \ | ||
| libigdgmm-dev \ | ||
| file | ||
|
|
||
| CMD ["/bin/bash"] |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||
| #!/bin/bash -x | ||||||
| # | ||||||
| # Copyright (C) 2020 Intel Corporation | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| # | ||||||
| # SPDX-License-Identifier: MIT | ||||||
| # | ||||||
|
|
||||||
| IMAGE=neo-${BUILD_OS}: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" | ||||||
| fi | ||||||
| docker run --rm -u `id -u`:`id -g` -v `pwd`:/src -w /src/build -e CC=${CC} -e CXX=${CXX} -t ${IMAGE} cmake -GNinja ../neo -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSKIP_UNIT_TESTS=${skip_unit_tests} -DDO_NOT_RUN_AUB_TESTS=TRUE -DDONT_CARE_OF_VIRTUALS=TRUE | ||||||
| docker run --rm -u `id -u`:`id -g` -v `pwd`:/src -w /src/build -t ${IMAGE} ninja package | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,21 @@ | ||||||
| #!/bin/bash | ||||||
| # | ||||||
| # Copyright (C) 2020 Intel Corporation | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| # | ||||||
| # SPDX-License-Identifier: MIT | ||||||
| # | ||||||
|
|
||||||
| DOCKERFILE=Dockerfile-${BUILD_OS} | ||||||
| IMAGE=neo-${BUILD_OS}:ci | ||||||
|
|
||||||
| if [ -n "$GEN" ] | ||||||
| then | ||||||
| DOCKERFILE=${DOCKERFILE}-${GEN} | ||||||
| IMAGE=neo-${BUILD_OS}-${GEN}:ci | ||||||
| fi | ||||||
|
|
||||||
| echo Using ${DOCKERFILE} | ||||||
|
|
||||||
| cd docker | ||||||
| docker build -f ${DOCKERFILE} -t ${IMAGE} . | ||||||
| docker images | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.