diff --git a/src/build-scripts/ci-startup.bash b/src/build-scripts/ci-startup.bash index 860c7a747..5507f8c0f 100755 --- a/src/build-scripts/ci-startup.bash +++ b/src/build-scripts/ci-startup.bash @@ -11,11 +11,8 @@ # Environment variables we always need export PATH=/usr/local/bin/_ccache:/usr/lib/ccache:$PATH export USE_CCACHE=${USE_CCACHE:=1} -export CCACHE_CPP2=1 -export CCACHE_DIR=/tmp/ccache -if [[ "${RUNNER_OS}" == "macOS" ]] ; then - export CCACHE_DIR=$HOME/.ccache -fi +export CCACHE_CPP2= +export CCACHE_DIR=$HOME/.ccache mkdir -p $CCACHE_DIR export OSL_ROOT=$PWD/dist @@ -33,12 +30,13 @@ export PYTHONPATH=/usr/local/lib64/python${PYTHON_VERSION}/site-packages:$PYTHON export PYTHONPATH=$OSL_ROOT/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH export BUILD_MISSING_DEPS=${BUILD_MISSING_DEPS:=1} export COMPILER=${COMPILER:=gcc} +export CC=${CC:=gcc} export CXX=${CXX:=g++} export OSL_CI=true export USE_NINJA=${USE_NINJA:=1} export CMAKE_GENERATOR=${CMAKE_GENERATOR:=Ninja} export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release} -export CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD:=11} +export CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD:=17} export LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=$HOME/ext} export CMAKE_PREFIX_PATH=${LOCAL_DEPS_DIR}/dist:${CMAKE_PREFIX_PATH} @@ -51,6 +49,10 @@ export TESTSUITE_CLEANUP_ON_SUCCESS=${TESTSUITE_CLEANUP_ON_SUCCESS:=1} # For CI, default to building missing dependencies automatically export OpenImageIO_BUILD_MISSING_DEPS=${OpenImageIO_BUILD_MISSING_DEPS:=all} +# Sonar +export BUILD_WRAPPER_OUT_DIR="${PWD}/bw_output" +export BW_OUTPUT_DIR="${PWD}/bw_output" + # Parallel builds if [[ `uname -s` == "Linux" ]] ; then echo "procs: " `nproc` @@ -84,8 +86,10 @@ ls env | sort if [[ `uname -s` == "Linux" ]] ; then + echo "nprocs: " `nproc` head -40 /proc/cpuinfo -elif [[ ${RUNNER_OS} == "macOS" ]] ; then +elif [[ "${RUNNER_OS}" == "macOS" ]] ; then + echo "nprocs: " `sysctl -n hw.ncpu` sysctl machdep.cpu.features fi diff --git a/src/build-scripts/gh-win-installdeps.bash b/src/build-scripts/gh-win-installdeps.bash index 370ca2bb8..090c37b6a 100755 --- a/src/build-scripts/gh-win-installdeps.bash +++ b/src/build-scripts/gh-win-installdeps.bash @@ -12,24 +12,25 @@ VCPKG_INSTALLATION_ROOT=/c/vcpkg export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:=.} export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$DEP_DIR" +export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$VCPKG_INSTALLATION_ROOT/installed/x64-windows-release" +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" +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/bin:$VCPKG_INSTALLATION_ROOT/installed/x64-windows-release/bin" +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/installed/x64-windows-release/lib" -export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$VCPKG_INSTALLATION_ROOT/installed/x64-windows" -export PATH="$PATH:$DEP_DIR/bin:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/installed/x64-windows/bin:/bin" -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/bin:$VCPKG_INSTALLATION_ROOT/installed/x64-windows/bin" -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/installed/x64-windows/lib" - -# export OSL_CMAKE_FLAGS="$OSL_CMAKE_FLAGS -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" +# export MY_CMAKE_FLAGS="$MY_CMAKE_FLAGS -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" # export OPENEXR_CMAKE_FLAGS="$OPENEXR_CMAKE_FLAGS -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" #ls -l "C:/Program Files (x86)/Microsoft Visual Studio/*/Enterprise/VC/Tools/MSVC" && true #ls -l "C:/Program Files (x86)/Microsoft Visual Studio" && true -if [[ "$PYTHON_VERSION" == "3.6" ]] ; then - export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.6.8/x64" -else +if [[ "$PYTHON_VERSION" == "3.7" ]] ; then export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.7.9/x64" - export Python3_EXECUTABLE="/c/hostedtoolcache/windows/Python/3.7.9/x64/python.exe" + export Python_EXECUTABLE="/c/hostedtoolcache/windows/Python/3.7.9/x64/python.exe" + export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages +elif [[ "$PYTHON_VERSION" == "3.9" ]] ; then + export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.9.13/x64" + export Python_EXECUTABLE="/c/hostedtoolcache/windows/Python/3.9.13/x64/python3.exe" export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages fi pip install numpy @@ -78,11 +79,11 @@ vcpkg list # # -src/build-scripts/build_zlib.bash -export ZLIB_ROOT=$PWD/ext/dist +# src/build-scripts/build_zlib.bash +# export ZLIB_ROOT=$PWD/ext/dist -src/build-scripts/build_libpng.bash -export PNG_ROOT=$PWD/ext/dist +# src/build-scripts/build_libpng.bash +# export PNG_ROOT=$PWD/ext/dist # We're currently getting libtiff from vcpkg src/build-scripts/build_libtiff.bash