From 424e396658e7720904533de27571acb49f75adf9 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Wed, 8 Jan 2025 08:43:35 -0800 Subject: [PATCH 1/4] ci: Only pass build-steps the secrets it needs (#4576) Safer than letting it inherit all secrets. Signed-off-by: Larry Gritz --- .github/workflows/analysis.yml | 6 ++++-- .github/workflows/build-steps.yml | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 7d853071ad..4a11134184 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -51,8 +51,10 @@ jobs: # account credentials. if: github.repository == 'AcademySoftwareFoundation/OpenImageIO' uses: ./.github/workflows/build-steps.yml - # Must let the called steps workflow inherit our secrets - secrets: inherit + # Must let the called steps workflow inherit necessary secrets + secrets: + PASSED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PASSED_SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: nametag: ${{ matrix.nametag || 'unnamed!' }} runner: ${{ matrix.runner || 'ubuntu-latest' }} diff --git a/.github/workflows/build-steps.yml b/.github/workflows/build-steps.yml index d5a765b1e0..d2da331d22 100644 --- a/.github/workflows/build-steps.yml +++ b/.github/workflows/build-steps.yml @@ -64,6 +64,11 @@ on: type: string nametag: type: string + secrets: + PASSED_GITHUB_TOKEN: + required: false + PASSED_SONAR_TOKEN: + required: false permissions: read-all @@ -145,8 +150,8 @@ jobs: - name: Sonar-scanner if: inputs.sonar == 1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PASSED_GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.PASSED_SONAR_TOKEN }} run: | which sonar-scanner ls -l /__w/OpenImageIO/OpenImageIO/bw_output From 0ae1f07c8867228ace07eabcc2eb0ea0fbce2660 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Wed, 8 Jan 2025 08:48:46 -0800 Subject: [PATCH 2/4] build: fix build_cmake.bash script for aarch64, bump its default version (#4581) * When the script was run on aarch64, it was actually hard-coded to retrieve a version older than we currently require as a minimum. Use the CMAKE_VERSION hint just like we do for x86_64. * Bump the default version that this script makes to the latest, 3.31.3. (This does not change OIIO's minimum required cmake version, it merely changes the default if this hepler script that we use for CI is run without any specific version requested.) Signed-off-by: Larry Gritz --- INSTALL.md | 2 +- src/build-scripts/build_cmake.bash | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index e6f807ff8a..fc79f86879 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -19,7 +19,7 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**. CMake configuration flag: `-DCMAKE_CXX_STANDARD=20`, etc. * Compilers: **gcc 9.3** - 14.2, **clang 5** - 19, MSVS 2017 - 2019 (**v19.14 and up**), **Intel icc 19+**, Intel OneAPI C++ compiler 2022+. - * **CMake >= 3.18.2** (tested through 3.30) + * **CMake >= 3.18.2** (tested through 3.31) * **Imath >= 3.1** (tested through 3.1.x and main) * **OpenEXR >= 3.1** (tested through 3.3 and main) * **libTIFF >= 4.0** (tested through 4.7) diff --git a/src/build-scripts/build_cmake.bash b/src/build-scripts/build_cmake.bash index 5f20ba1a1c..0a74413b2d 100755 --- a/src/build-scripts/build_cmake.bash +++ b/src/build-scripts/build_cmake.bash @@ -12,7 +12,7 @@ set -ex echo "Building cmake" uname -CMAKE_VERSION=${CMAKE_VERSION:=3.18.5} +CMAKE_VERSION=${CMAKE_VERSION:=3.31.3} LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext} CMAKE_INSTALL_DIR=${CMAKE_INSTALL_DIR:=${LOCAL_DEPS_DIR}/cmake} @@ -25,8 +25,8 @@ fi if [[ `uname` == "Linux" && `uname -m` == "aarch64" ]] ; then mkdir -p ${CMAKE_INSTALL_DIR} || true - curl --location https://anaconda.org/conda-forge/cmake/3.17.0/download/linux-aarch64/cmake-3.17.0-h28c56e5_0.tar.bz2 -o cmake-3.17.0-h28c56e5_0.tar.bz2 - tar -xjf cmake-3.17.0-h28c56e5_0.tar.bz2 -C ${CMAKE_INSTALL_DIR} + curl --location "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-aarch64.sh" -o "cmake.sh" + sh cmake.sh --skip-license --prefix=${CMAKE_INSTALL_DIR} export PATH=${CMAKE_INSTALL_DIR}/bin:$PATH # In case we ever need to build from scratch: From d50caee5fb0fd8e2276303ce470a1b884bdbc4ee Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Wed, 8 Jan 2025 09:26:14 -0800 Subject: [PATCH 3/4] build: Fix libraw definitions (again) (#4588) Fixes #4586 Replaces #4587 --------- Signed-off-by: Larry Gritz --- src/cmake/modules/FindLibRaw.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmake/modules/FindLibRaw.cmake b/src/cmake/modules/FindLibRaw.cmake index 2a48a33d29..6d3186e5ca 100644 --- a/src/cmake/modules/FindLibRaw.cmake +++ b/src/cmake/modules/FindLibRaw.cmake @@ -96,7 +96,7 @@ if (LINKSTATIC) set (LibRaw_r_LIBRARIES ${LibRaw_r_LIBRARIES} ${LCMS2_LIBRARIES}) endif() if (MSVC) - set (LibRaw_r_DEFINITIONS ${LibRaw_r_DEFINITIONS} LIBRAW_NODLL) - set (LibRaw_DEFINITIONS ${LibRaw_DEFINITIONS} LIBRAW_NODLL) + set (LibRaw_r_DEFINITIONS ${LibRaw_r_DEFINITIONS} -D LIBRAW_NODLL) + set (LibRaw_DEFINITIONS ${LibRaw_DEFINITIONS} -D LIBRAW_NODLL) endif() endif () From 3baab41354e9bed9e19e7da8b16faf4670243ad4 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Mon, 13 Jan 2025 16:09:18 -0800 Subject: [PATCH 4/4] ci: Fix Windows 2019 CI -- make python version match the runner (#4592) For reasons that are unclear (maybe a change to which python versions are installed where on the GH runners?) this seems to have broken within the past couple days, in a way that did not correspond to any change we made on the OIIO side. Signed-off-by: Larry Gritz --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9825d82abe..72c539bd87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -588,7 +588,7 @@ jobs: runner: windows-2019 vsver: 2019 generator: "Visual Studio 16 2019" - python_ver: 3.7 + python_ver: "3.9" - desc: Windows-2022 VS2022 runner: windows-2022 vsver: 2022