Skip to content

Commit 88f9d06

Browse files
committed
example.1
Signed-off-by: Cary Phillips <cary@ilm.com>
1 parent ad06500 commit 88f9d06

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

.github/workflows/ci_examples.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
# Copyright (c) Contributors to the OpenEXR Project.
3+
#
4+
5+
name: CI-examples
6+
7+
on:
8+
push:
9+
paths:
10+
- '**'
11+
- '!**.md'
12+
- '!website/**'
13+
- 'website/src/**'
14+
- '!bazel/**'
15+
- '!src/wrappers/**'
16+
- '!share/ci/**'
17+
- '!.github/workflows/**'
18+
- '.github/workflows/ci_examples.yml'
19+
pull_request:
20+
paths:
21+
- '**'
22+
- '!**.md'
23+
- '!website/**'
24+
- 'website/src/**'
25+
- '!bazel/**'
26+
- '!src/wrappers/**'
27+
- '!share/ci/**'
28+
- '!.github/workflows/**'
29+
- '.github/workflows/ci_examples.yml'
30+
31+
permissions:
32+
contents: read
33+
34+
jobs:
35+
36+
linux:
37+
name: 'Website examples'
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
42+
- name: Checkout
43+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
44+
45+
- name: Configure
46+
shell: bash
47+
run: |
48+
set -x
49+
BUILD_DIR=$GITHUB_WORKSPACE/_build
50+
echo BUILD_DIR="$BUILD_DIR" >> $GITHUB_ENV
51+
52+
INSTALL_DIR=$GITHUB_WORKSPACE/_install
53+
echo INSTALL_DIR="$INSTALL_DIR" >> $GITHUB_ENV
54+
55+
cmake -B $BUILD_DIR -S $GITHUB_WORKSPACE \
56+
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
57+
-DCMAKE_VERBOSE_MAKEFILE:BOOL='ON' \
58+
-DCMAKE_CXX_FLAGS=" -fsanitize=undefined,address " \
59+
-DCMAKE_C_FLAGS=" -fsanitize=undefined,address "
60+
61+
- name: Build
62+
shell: bash
63+
run: |
64+
set -x
65+
cmake --build $BUILD_DIR --target install --config Release
66+
67+
- name: Website examples
68+
run: |
69+
set -x
70+
EXRWRITER_BUILD_DIR=$BUILD_DIR.exrwritre
71+
cmake -S website/src/exrwriter -B $EXRWRITER_BUILD_DIR \
72+
-DCMAKE_PREFIX_PATH=$INSTALL_DIR \
73+
-DCMAKE_BUILD_TYPE=Release \
74+
-DCMAKE_CXX_FLAGS=" -fsanitize=undefined,address " \
75+
-DCMAKE_C_FLAGS=" -fsanitize=undefined,address "
76+
77+
cmake --build $EXRWRITER_BUILD_DIR --config Release
78+
79+
$EXRWRITER_BUILD_DIR/exrwriter
80+
EXRINFO=$INSTALL_DIR/bin/exrinfo
81+
if [ -x "$EXRINFO" ]; then
82+
"$EXRINFO" hello.exr
83+
fi
84+
shell: bash

0 commit comments

Comments
 (0)