Skip to content
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

GPU CI Setup #1045

Merged
merged 13 commits into from Sep 3, 2020
11 changes: 1 addition & 10 deletions .github/workflows/analysis_workflow.yml
Expand Up @@ -99,11 +99,6 @@ jobs:
CXX: ${{ matrix.cxx-compiler }}
CC: ${{ matrix.cc-compiler }}
steps:
# TODO: Remove this workaround following resolution of:
# https://github.com/AcademySoftwareFoundation/aswf-docker/issues/43
- name: Setup container
run: sudo rm -rf /usr/local/lib64/cmake/glew
if: matrix.vfx-cy == 2020
- name: Checkout
uses: actions/checkout@v2
- name: Install latest ext package versions
Expand Down Expand Up @@ -144,7 +139,7 @@ jobs:
cmake --build . \
--target install \
--config Release \
-- -j2
-- -j$(nproc)
working-directory: _build
- name: Test
run: ctest -V
Expand All @@ -168,10 +163,6 @@ jobs:
CXX: g++
CC: gcc
steps:
# TODO: Remove this workaround following resolution of:
# https://github.com/AcademySoftwareFoundation/aswf-docker/issues/43
- name: Setup container
run: sudo rm -rf /usr/local/lib64/cmake/glew
- name: Checkout
uses: actions/checkout@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_workflow.yml
Expand Up @@ -231,7 +231,7 @@ jobs:
cmake --build . \
--target install \
--config ${{ matrix.build-type }} \
-- -j2
-- -j$(nproc)
working-directory: _build
- name: Test
run: ctest -V
Expand Down Expand Up @@ -337,7 +337,7 @@ jobs:
cmake --build . \
--target install \
--config ${{ matrix.build-type }} \
-- -j2
-- -j$(sysctl -n hw.ncpu)
working-directory: _build
- name: Test
run: ctest -V
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/gpu_workflow.yml
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.
#
# GitHub Actions workflow file
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: GPU

on:
push:
# Versioned branches and tags are ignored for OCIO <= 1.x.x
branches-ignore:
- RB-0.*
- RB-1.*
- gh-pages
tags-ignore:
- v0.*
- v1.*

jobs:
# ---------------------------------------------------------------------------
# Linux GPU (AWS CodeBuild)
# ---------------------------------------------------------------------------

linux_gpu:
name: 'Linux CentOS 7 VFX CY2020 GPU <GCC 6.3.1>'
# Don't run on OCIO forks
if: github.repository == 'AcademySoftwareFoundation/OpenColorIO'
# GH-hosted VM. The build runs in CentOS 7 'container' hard-coded in
# AWS CodeBuild project.
# TODO: Add support for dynamic GH Action defined CodeBuild
# container choice.
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.CODEBUILD_ID }}
aws-secret-access-key: ${{ secrets.CODEBUILD_SECRET }}
aws-region: us-west-2
- name: Run CodeBuild
uses: aws-actions/aws-codebuild-run-project@v1.0.0
with:
project-name: OpenColorIO
buildspec-override: buildspec.yml
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -5,7 +5,8 @@ OpenColorIO
===========

[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Build Status](https://github.com/AcademySoftwareFoundation/OpenColorIO/workflows/CI/badge.svg)](https://github.com/AcademySoftwareFoundation/OpenColorIO/actions?query=workflow%3ACI)
[![CI Status](https://github.com/AcademySoftwareFoundation/OpenColorIO/workflows/CI/badge.svg)](https://github.com/AcademySoftwareFoundation/OpenColorIO/actions?query=workflow%3ACI)
[![GPU CI Status](https://github.com/AcademySoftwareFoundation/OpenColorIO/workflows/GPU/badge.svg)](https://github.com/AcademySoftwareFoundation/OpenColorIO/actions?query=workflow%3AGPU)
[![Analysis Status](https://github.com/AcademySoftwareFoundation/OpenColorIO/workflows/Analysis/badge.svg)](https://github.com/AcademySoftwareFoundation/OpenColorIO/actions?query=workflow%3AAnalysis)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=AcademySoftwareFoundation_OpenColorIO&metric=alert_status)](https://sonarcloud.io/dashboard?id=AcademySoftwareFoundation_OpenColorIO)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2612/badge)](https://bestpractices.coreinfrastructure.org/projects/2612)
Expand Down
59 changes: 59 additions & 0 deletions buildspec.yml
@@ -0,0 +1,59 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.
#
# AWS CodeBuild build specification
# https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html

version: 0.2

# ---------------------------------------------------------------------------
# CodeBuild project container
# ---------------------------------------------------------------------------
# DockerHub: https://hub.docker.com/u/aswf
# Source: https://github.com/AcademySoftwareFoundation/aswf-docker
# Image: aswf/ci-ocio:2020
# OS: Linux CentOS 7
# VFX Ref: CY2020
# Compiler: GCC 6.3.1

env:
variables:
CXX: g++
CC: gcc
exported-variables:
- CXX
- CC

phases:
pre_build:
commands:
# Checkout
- git clone https://github.com/$GITHUB_REPOSITORY OpenColorIO
- cd OpenColorIO
- git checkout $GITHUB_SHA
# Create build directories
- mkdir _install _build
- cd _build
build:
commands:
# Configure
- |
cmake ../. \
-DCMAKE_INSTALL_PREFIX=../_install \
-DOCIO_USE_HEADLESS=ON \
-DOCIO_BUILD_APPS=ON \
-DOCIO_BUILD_DOCS=OFF \
-DOCIO_BUILD_TESTS=ON \
-DOCIO_BUILD_GPU_TESTS=ON \
-DOCIO_BUILD_PYTHON=OFF \
-DOCIO_INSTALL_EXT_PACKAGES=ALL \
-DOCIO_WARNING_AS_ERROR=ON
# Build
- |
cmake --build . \
--target install \
-- -j$(nproc)
post_build:
commands:
# Test
- ctest -V