Skip to content

Commit d451cbc

Browse files
committed
wip
Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent 122a6e4 commit d451cbc

File tree

6 files changed

+32
-20
lines changed

6 files changed

+32
-20
lines changed

src/build-scripts/build_libpng.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Utility script to download and build libpng
44
#
5-
# Copyright Contributors to the OpenImageIO project.
6-
# SPDX-License-Identifier: Apache-2.0
7-
# https://github.com/AcademySoftwareFoundation/OpenImageIO
5+
# Copyright Contributors to the Open Shading Language project.
6+
# SPDX-License-Identifier: BSD-3-Clause
7+
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
88

99
# Exit the whole script if any command fails.
1010
set -ex

src/build-scripts/build_openimageio.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ if [[ "$DEBUG" == "1" ]] ; then
4848
fi
4949

5050
# if [[ "$ARCH" == "windows64" ]] ; then
51-
cmake -S . -B ${OPENIMAGEIO_BUILD_DIR} \
51+
cmake -S ${OPENIMAGEIO_SOURCE_DIR} -B ${OPENIMAGEIO_BUILD_DIR} \
52+
-G "$CMAKE_GENERATOR" \
5253
-DCMAKE_BUILD_TYPE="${OPENIMAGEIO_BUILD_TYPE}" \
5354
-DCMAKE_INSTALL_PREFIX="${OPENIMAGEIO_INSTALL_DIR}" \
5455
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
@@ -62,7 +63,7 @@ time cmake --build ${OPENIMAGEIO_BUILD_DIR} --target install --config ${OPENIMAG
6263
popd
6364

6465
export OpenImageIO_ROOT=$OPENIMAGEIO_INSTALL_DIR
65-
export PATH=$OpenImageIO_ROOT/bin:$PATH
66+
# export PATH=$OpenImageIO_ROOT/bin:$PATH
6667
export DYLD_LIBRARY_PATH=$OpenImageIO_ROOT/lib:$DYLD_LIBRARY_PATH
6768
export LD_LIBRARY_PATH=$OpenImageIO_ROOT/lib:$LD_LIBRARY_PATH
6869
export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH

src/build-scripts/ci-build.bash

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
# any command in it fails. This is crucial for CI tests.
99
set -ex
1010

11+
OSL_CMAKE_FLAGS="$MY_CMAKE_FLAGS $OSL_CMAKE_FLAGS"
12+
export OSL_SRC_DIR=${OSL_SRC_DIR:=$PWD}
13+
export OSL_BUILD_DIR=${OSL_BUILD_DIR:=${OSL_SRC_DIR}/build}
14+
export OSL_INSTALL_DIR=${OSL_INSTALL_DIR:=${OSL_SRC_DIR}/dist}
15+
export OSL_CMAKE_BUILD_TYPE=${OSL_CMAKE_BUILD_TYPE:=${CMAKE_BUILD_TYPE:=Release}}
16+
1117
if [[ "$USE_SIMD" != "" ]] ; then
1218
OSL_CMAKE_FLAGS="$OSL_CMAKE_FLAGS -DUSE_SIMD=$USE_SIMD"
1319
fi
@@ -16,9 +22,9 @@ if [[ -n "$CODECOV" ]] ; then
1622
OSL_CMAKE_FLAGS="$OSL_CMAKE_FLAGS -DCODECOV=${CODECOV}"
1723
fi
1824

19-
pushd build
20-
cmake .. -G "$CMAKE_GENERATOR" \
21-
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
25+
# pushd $OSL_BUILD_DIR
26+
cmake -S ${OSL_SRC_DIR} -B ${OSL_BUILD_DIR} -G "$CMAKE_GENERATOR" \
27+
-DCMAKE_BUILD_TYPE="${OSL_CMAKE_BUILD_TYPE}" \
2228
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
2329
-DCMAKE_INSTALL_PREFIX="$OSL_ROOT" \
2430
-DUSE_PYTHON="${USE_PYTHON:=1}" \
@@ -29,15 +35,15 @@ cmake .. -G "$CMAKE_GENERATOR" \
2935
$OSL_CMAKE_FLAGS -DVERBOSE=1
3036

3137
# Save a copy of the generated files for debugging broken CI builds.
32-
mkdir cmake-save || /bin/true
33-
cp -r CMake* *.cmake cmake-save
38+
mkdir ${OSL_BUILD_DIR}/cmake-save || true
39+
cp -r ${OSL_BUILD_DIR}/CMake* ${OSL_BUILD_DIR}/*.cmake ${OSL_BUILD_DIR}/cmake-save
3440

3541
: ${BUILDTARGET:=install}
3642
if [[ "$BUILDTARGET" != "none" ]] ; then
3743
echo "Parallel build ${CMAKE_BUILD_PARALLEL_LEVEL} of target ${BUILDTARGET}"
38-
time ${OSL_CMAKE_BUILD_WRAPPER} cmake --build . --target ${BUILDTARGET} --config ${CMAKE_BUILD_TYPE}
44+
time ${OSL_CMAKE_BUILD_WRAPPER} cmake --build ${OSL_BUILD_DIR} --target ${BUILDTARGET} --config ${OSL_CMAKE_BUILD_TYPE}
3945
fi
40-
popd
46+
# popd
4147

4248
if [[ "${DEBUG_CI:=0}" != "0" ]] ; then
4349
echo "PATH=$PATH"
@@ -48,6 +54,7 @@ if [[ "${DEBUG_CI:=0}" != "0" ]] ; then
4854
fi
4955

5056
if [[ "$BUILDTARGET" == clang-format ]] ; then
57+
echo "Running " `which clang-format` " version " `clang-format --version`
5158
git diff --color
5259
THEDIFF=`git diff`
5360
if [[ "$THEDIFF" != "" ]] ; then

src/build-scripts/ci-coverage.bash

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@ for g in $(find ../build -name "*.gcno" -type f); do
3535
echo "dirname $g = $(dirname $g) to " `$(echo "$g" | sed -e 's/\/build\//\//' -e 's/\.gcno/\.cpp/' -e 's/\.cpp\.cpp/\.cpp/' -e 's/\/CMakeFiles.*\.dir\//\//')`
3636
gcov -l -p -o $(dirname "$g") $(echo "$g" | sed -e 's/\/build\//\//' -e 's/\.gcno/\.cpp/' -e 's/\/CMakeFiles.*\.dir\//\//')
3737
done
38+
39+
# Remove pointless .gcov files so we don't analyze them
40+
rm -f "*opt*include*"
41+
rm -f "*usr*local*"
42+
3843
popd

src/build-scripts/gh-installdeps.bash

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,17 @@ set -ex
1414
if [[ "$ASWF_ORG" != "" ]] ; then
1515
# Using ASWF container
1616

17-
export PATH=/opt/rh/devtoolset-6/root/usr/bin:/usr/local/bin:$PATH
18-
1917
#ls /etc/yum.repos.d
2018

2119
if [[ "$ASWF_VFXPLATFORM_VERSION" == "2021" || "$ASWF_VFXPLATFORM_VERSION" == "2022" ]] ; then
2220
# CentOS 7 based containers need the now-nonexistant centos repo to be
2321
# excluded or all the subsequent yum install commands will fail.
24-
yum-config-manager --disable centos-sclo-rh && true
22+
yum-config-manager --disable centos-sclo-rh || true
2523
sed -i 's,^mirrorlist=,#,; s,^#baseurl=http://mirror\.centos\.org/centos/$releasever,baseurl=https://vault.centos.org/7.9.2009,' /etc/yum.repos.d/CentOS-Base.repo
2624
fi
2725

28-
sudo /usr/bin/yum install -y giflib giflib-devel && true
29-
# sudo /usr/bin/yum install -y ffmpeg ffmpeg-devel && true
26+
sudo /usr/bin/yum install -y giflib giflib-devel || true
27+
# sudo /usr/bin/yum install -y ffmpeg ffmpeg-devel || true
3028

3129
if [[ "${CONAN_LLVM_VERSION}" != "" ]] ; then
3230
mkdir conan
@@ -82,8 +80,9 @@ if [[ "$ASWF_ORG" != "" ]] ; then
8280
else
8381
# Using native Ubuntu runner
8482

85-
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test
86-
time sudo apt-get update
83+
if [[ "${SKIP_APT_GET_UPDATE}" != "1" ]] ; then
84+
time sudo apt-get update
85+
fi
8786

8887
time sudo apt-get -q install -y \
8988
git cmake ninja-build ccache g++ \

src/build-scripts/gh-win-installdeps.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ VCPKG_INSTALLATION_ROOT=/c/vcpkg
1313
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:=.}
1414
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$DEP_DIR"
1515
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$VCPKG_INSTALLATION_ROOT/installed/x64-windows-release"
16-
export PATH="$PATH:$DEP_DIR/bin:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/installed/x64-windows-release/bin:/bin:$PWD/ext/dist/bin:$PWD/ext/dist/lib"
16+
export PATH="$PATH:$DEP_DIR/bin:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/installed/x64-windows-release/bin:$PWD/ext/dist/bin:$PWD/ext/dist/lib"
1717
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/bin:$VCPKG_INSTALLATION_ROOT/installed/x64-windows-release/bin"
1818
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/installed/x64-windows-release/lib"
1919

0 commit comments

Comments
 (0)