1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
|
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) Contributors to the OpenEXR Project.
#
# GitHub Actions workflow file
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Analysis
on:
schedule:
# Weekly Sunday build
- cron: "0 0 * * 0"
workflow_dispatch:
permissions:
contents: read
jobs:
# ---------------------------------------------------------------------------
# SonarCloud static analysis
# ---------------------------------------------------------------------------
linux_sonarcloud:
name: 'SonarCloud Linux CentOS 7 VFX CY2024 <GCC 11.2.1>'
if: github.repository == 'AcademySoftwareFoundation/openexr'
# GH-hosted VM. The build runs in CentOS 7 'container' defined below.
runs-on: ubuntu-latest
container:
# DockerHub: https://hub.docker.com/u/aswf
# Source: https://github.com/AcademySoftwareFoundation/aswf-docker
image: aswf/ci-openexr:2024
env:
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 50
- name: Create build directories
run: |
mkdir _install
mkdir _build
- name: Configure
run: |
cmake .. \
-DCMAKE_INSTALL_PREFIX=../_install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage" \
-DCMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON \
-DCMAKE_C_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage" \
-DCMAKE_C_OUTPUT_EXTENSION_REPLACE=ON \
-DCMAKE_EXE_LINKER_FLAGS="-lgcov" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
-DBUILD_SHARED_LIBS='OFF' \
-DOPENEXR_BUILD_TOOLS='ON' \
-DOPENEXR_RUN_FUZZ_TESTS='OFF' \
-DOPENEXR_ENABLE_THREADING='ON'
working-directory: _build
- name: Build OpenEXR with build-wrapper
shell: bash
run: |
build-wrapper-linux-x86-64 --out-dir bw_output \
cmake --build . \
--target install \
--config Release
working-directory: _build
- name: Test
run: |
ctest -T Test \
-C Release \
--timeout 7200 \
--output-on-failure \
-VV
working-directory: _build
- name: Coverage
run: share/ci/scripts/linux/run_gcov.sh
shell: bash
- name: Sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner -X
# ------------------------------------------------------------------------------
# Valgrind memcheck test
# ------------------------------------------------------------------------------
linux_valgrind:
name: 'Valgrind Linux CentOS 7 VFX CY2024 <GCC 11.2.1>'
if: github.repository == 'AcademySoftwareFoundation/openexr'
# GH-hosted VM. The build runs in CentOS 7 'container' defined below.
runs-on: ubuntu-latest
container:
# DockerHub: https://hub.docker.com/u/aswf
# Source: https://github.com/AcademySoftwareFoundation/aswf-docker
image: aswf/ci-openexr:2024
env:
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 50
- name: Create build directories
run: |
mkdir _install
mkdir _build
shell: bash
- name: Install Dependencies
run: |
share/ci/scripts/linux/install_valgrind.sh
shell: bash
- name: Configure
run: |
cmake .. \
-DCMAKE_INSTALL_PREFIX=../_install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
-DBUILD_SHARED_LIBS='OFF' \
-DOPENEXR_BUILD_TOOLS='ON' \
-DOPENEXR_RUN_FUZZ_TESTS='OFF' \
-DOPENEXR_ENABLE_THREADING='ON'
working-directory: _build
- name: Build
run: |
cmake --build . \
--target install \
--config Release
working-directory: _build
- name: Valgrind memcheck tests
run: |
ctest -C Release \
--timeout 50000 \
--force-new-ctest-process \
--test-action memcheck \
--output-on-failure \
-VV
working-directory: _build
- name: Valgrind memcheck test results
run: |
share/ci/scripts/linux/log_valgrind.sh _build
shell: bash
# ------------------------------------------------------------------------------
# Fuzz test
# ------------------------------------------------------------------------------
linux_fuzz:
name: 'Fuzz Test ${{ matrix.build-descrip }} Linux CentOS 7 VFX CY2024 <GCC 11.2.1>'
if: github.repository == 'AcademySoftwareFoundation/openexr'
# GH-hosted VM. The build runs in CentOS 7 'container' defined below.
runs-on: ubuntu-latest
container:
# DockerHub: https://hub.docker.com/u/aswf
# Source: https://github.com/AcademySoftwareFoundation/aswf-docker
image: aswf/ci-openexr:2024
strategy:
matrix:
build: [1, 2]
include:
# Fuzz test
- build: 1
build-descrip:
cflags:
cxxflags:
# Fuzz with sanitizer
- build: 2
build-descrip: With Sanitizer
cflags: -DCFLAGS='-fsanitize=address'
cxxflags: -DCXXFLAGS='-fsanitize=address'
env:
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 50
- name: Create build directories
run: |
mkdir _install
mkdir _build
shell: bash
- name: Configure
run: |
cmake .. \
-DCMAKE_INSTALL_PREFIX=../_install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
-DBUILD_SHARED_LIBS='OFF' \
-DOPENEXR_BUILD_TOOLS='ON' \
-DOPENEXR_RUN_FUZZ_TESTS='ON' \
-DOPENEXR_ENABLE_THREADING='ON' \
${{ matrix.cxxflags }} \
${{ matrix.cflags }}
working-directory: _build
- name: Build
run: |
cmake --build . \
--target install \
--config Release
working-directory: _build
- name: Fuzz test
run: |
bin/OpenEXRFuzzTest
working-directory: _build
|