From 5b0e759f2476ca7c02bfa860824a1d0b3e4e2c95 Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Mon, 29 Dec 2025 10:38:54 -0800 Subject: [PATCH 1/7] Updates windows tpl build to cache libraries --- .github/workflows/test_windows_tpls.yml | 65 +++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_windows_tpls.yml b/.github/workflows/test_windows_tpls.yml index 4ac42495d9..8c717c2414 100644 --- a/.github/workflows/test_windows_tpls.yml +++ b/.github/workflows/test_windows_tpls.yml @@ -6,6 +6,12 @@ name: Manual test for Axom's TPLs on Windows # This workflow runs when manually triggered using the UI or API. on: workflow_dispatch: + inputs: + tpl_timestamp: + description: > + Windows TPL cache timestamp. Leave empty to auto-generate of form 10-07-25_22h-56m. + required: false + default: "" # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -31,17 +37,55 @@ jobs: - name: Checkout repo w/ submodules uses: actions/checkout@v4 with: - submodules: recursive - + submodules: recursive + - name: Set up python uses: actions/setup-python@v5 with: python-version: '3.10' - + + - name: Determine Windows TPL timestamp + id: tpl_ts + shell: pwsh + run: | + if ("${{ inputs.tpl_timestamp }}" -ne "") { + $ts = "${{ inputs.tpl_timestamp }}" + } else { + # Match docker tag style: MM-DD-YY_HHh-MMm + $ts = Get-Date -Format "MM-dd-yy_HH'h'-mm'm'" + } + echo "Using Windows TPL timestamp: $ts" + "TPL_TIMESTAMP=$ts" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Configure vcpkg binary cache directory + shell: pwsh + run: | + $cacheDir = "${{ github.workspace }}\.vcpkg-cache" + New-Item -ItemType Directory -Force -Path $cacheDir | Out-Null + "VCPKG_DEFAULT_BINARY_CACHE=$cacheDir" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Cache vcpkg binary artifacts (TPLs) + id: cache-vcpkg + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}\.vcpkg-cache + key: > + win-tpls-${{ env.TPL_TIMESTAMP }}-${{ matrix.triplet }}- + ${{ hashFiles( + 'scripts/uberenv/**', + 'scripts/vcpkg_ports/**', + '**/vcpkg.json', + '**/vcpkg-configuration.json' + ) }} + restore-keys: | + win-tpls-${{ env.TPL_TIMESTAMP }}-${{ matrix.triplet }}- + - name: List path and files run: ls + - name: Run uberenv (${{ matrix.triplet }}) run: python3 ./scripts/uberenv/uberenv.py --triplet ${{ matrix.triplet }} + - name: Save Uberenv logs uses: actions/upload-artifact@v4 if: ${{ always() }} @@ -66,12 +110,13 @@ jobs: cd build_axom ls cmake --build . --config ${{ matrix.cfg }} - + - name: Test axom (${{ matrix.triplet }} ${{ matrix.cfg }}) run: | cd build_axom ls ctest -C ${{ matrix.cfg }} --no-compress-output -T Test + - name: Save CTest logs uses: actions/upload-artifact@v4 if: ${{ always() }} @@ -79,3 +124,15 @@ jobs: name: ctest_artifacts_${{ matrix.triplet }}_${{ matrix.cfg }}.zip path: | ${{ github.workspace }}/build_axom/**/*.xml + + - name: Publish TPL timestamp + shell: pwsh + run: | + echo "### Windows TPL cache published" >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "**Timestamp:** \`${{ env.TPL_TIMESTAMP }}\`" >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "Use this in ci-tests.yml as:" >> $env:GITHUB_STEP_SUMMARY + echo "\`WIN_TPL_TIMESTAMP: ${{ env.TPL_TIMESTAMP }}\`" >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "**Cache hit:** \`${{ steps.cache-vcpkg.outputs.cache-hit }}\`" >> $env:GITHUB_STEP_SUMMARY From 60b580b7f0d98f33dd169398784614be9235e4f8 Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Mon, 29 Dec 2025 11:07:55 -0800 Subject: [PATCH 2/7] Rewrite test_Windows_tpls to only compute TPLs once per triplet We were previously recomputing it for each config -- `Debug` and `Release` -- we are now reusing it. --- .github/workflows/test_windows_tpls.yml | 113 +++++++++++++++++++----- 1 file changed, 89 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test_windows_tpls.yml b/.github/workflows/test_windows_tpls.yml index 8c717c2414..80c1fa0c26 100644 --- a/.github/workflows/test_windows_tpls.yml +++ b/.github/workflows/test_windows_tpls.yml @@ -15,29 +15,27 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This job invokes uberenv to build our TPLs for two "triplets" - run_uberenv: - name: Runs ${{ matrix.triplet }} ${{ matrix.cfg }} uberenv with vcpkg - # The type of runner that the job will run on + # Job 1: Build TPLs ONCE per triplet and populate the vcpkg binary cache + warm_tpl_cache: + name: Warm TPL cache for ${{ matrix.triplet }} runs-on: windows-latest strategy: fail-fast: false matrix: - arch: ["x64", "x86"] - cfg: ["Debug", "Release"] include: - - arch: "x64" - triplet: "x64-windows" + - triplet: "x64-windows" msvc: "202264" - - arch: "x86" - triplet: "x86-windows" + - triplet: "x86-windows" msvc: "2022" + outputs: + tpl_timestamp: ${{ steps.tpl_ts.outputs.tpl_timestamp }} + steps: - name: Checkout repo w/ submodules uses: actions/checkout@v4 with: - submodules: recursive + submodules: recursive - name: Set up python uses: actions/setup-python@v5 @@ -56,6 +54,7 @@ jobs: } echo "Using Windows TPL timestamp: $ts" "TPL_TIMESTAMP=$ts" | Out-File -FilePath $env:GITHUB_ENV -Append + "tpl_timestamp=$ts" | Out-File -FilePath $env:GITHUB_OUTPUT -Append - name: Configure vcpkg binary cache directory shell: pwsh @@ -90,12 +89,90 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ always() }} with: - name: uberenv_artifacts_${{ matrix.triplet }}_${{ matrix.cfg }}.zip + name: uberenv_artifacts_${{ matrix.triplet }}.zip path: | ${{ github.workspace }}/uberenv_libs/vcpkg/buildtrees/*/*.log ${{ github.workspace }}/uberenv_libs/vcpkg/buildtrees/*/*.err ${{ github.workspace }}/uberenv_libs/*.cmake + - name: Publish TPL timestamp + shell: pwsh + run: | + echo "### Windows TPL cache warmed" >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "**Timestamp:** \`${{ env.TPL_TIMESTAMP }}\`" >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "**Triplet:** \`${{ matrix.triplet }}\`" >> $env:GITHUB_STEP_SUMMARY + echo "" >> $env:GITHUB_STEP_SUMMARY + echo "**Cache hit:** \`${{ steps.cache-vcpkg.outputs.cache-hit }}\`" >> $env:GITHUB_STEP_SUMMARY + + + # Job 2: Build/test Axom for Debug/Release, but DO NOT rebuild TPLs + build_and_test_axom: + name: Build/Test Axom ${{ matrix.triplet }} ${{ matrix.cfg }} + runs-on: windows-latest + needs: warm_tpl_cache + strategy: + fail-fast: false + matrix: + cfg: ["Debug", "Release"] + include: + - triplet: "x64-windows" + msvc: "202264" + - triplet: "x86-windows" + msvc: "2022" + + steps: + - name: Checkout repo w/ submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Use warmed TPL timestamp + shell: pwsh + run: | + $ts = "${{ needs.warm_tpl_cache.outputs.tpl_timestamp }}" + echo "Using warmed Windows TPL timestamp: $ts" + "TPL_TIMESTAMP=$ts" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Configure vcpkg binary cache directory + shell: pwsh + run: | + $cacheDir = "${{ github.workspace }}\.vcpkg-cache" + New-Item -ItemType Directory -Force -Path $cacheDir | Out-Null + "VCPKG_DEFAULT_BINARY_CACHE=$cacheDir" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Restore vcpkg binary artifacts (TPLs) + id: cache-vcpkg + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}\.vcpkg-cache + key: > + win-tpls-${{ env.TPL_TIMESTAMP }}-${{ matrix.triplet }}- + ${{ hashFiles( + 'scripts/uberenv/**', + 'scripts/vcpkg_ports/**', + '**/vcpkg.json', + '**/vcpkg-configuration.json' + ) }} + restore-keys: | + win-tpls-${{ env.TPL_TIMESTAMP }}-${{ matrix.triplet }}- + + - name: List path and files + run: ls + + # This will be fast now: it should reuse the restored binary cache. + - name: Run uberenv (consume cache) (${{ matrix.triplet }}) + run: python3 ./scripts/uberenv/uberenv.py --triplet ${{ matrix.triplet }} + + - name: List path and files + run: ls + - name: Copy host-config run: | ls @@ -124,15 +201,3 @@ jobs: name: ctest_artifacts_${{ matrix.triplet }}_${{ matrix.cfg }}.zip path: | ${{ github.workspace }}/build_axom/**/*.xml - - - name: Publish TPL timestamp - shell: pwsh - run: | - echo "### Windows TPL cache published" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Timestamp:** \`${{ env.TPL_TIMESTAMP }}\`" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "Use this in ci-tests.yml as:" >> $env:GITHUB_STEP_SUMMARY - echo "\`WIN_TPL_TIMESTAMP: ${{ env.TPL_TIMESTAMP }}\`" >> $env:GITHUB_STEP_SUMMARY - echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Cache hit:** \`${{ steps.cache-vcpkg.outputs.cache-hit }}\`" >> $env:GITHUB_STEP_SUMMARY From 466d8f7c10ca1d0abaca196cba984643776ede1a Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Mon, 29 Dec 2025 13:40:29 -0800 Subject: [PATCH 3/7] Fixes typos in workflow echo statement --- .github/workflows/test_windows_tpls.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_windows_tpls.yml b/.github/workflows/test_windows_tpls.yml index 80c1fa0c26..964555637d 100644 --- a/.github/workflows/test_windows_tpls.yml +++ b/.github/workflows/test_windows_tpls.yml @@ -100,11 +100,11 @@ jobs: run: | echo "### Windows TPL cache warmed" >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Timestamp:** \`${{ env.TPL_TIMESTAMP }}\`" >> $env:GITHUB_STEP_SUMMARY + echo '**Timestamp:** `${{ env.TPL_TIMESTAMP }}`' >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Triplet:** \`${{ matrix.triplet }}\`" >> $env:GITHUB_STEP_SUMMARY + echo '**Triplet:** `${{ matrix.triplet }}`' >> $env:GITHUB_STEP_SUMMARY echo "" >> $env:GITHUB_STEP_SUMMARY - echo "**Cache hit:** \`${{ steps.cache-vcpkg.outputs.cache-hit }}\`" >> $env:GITHUB_STEP_SUMMARY + echo '**Cache hit:** `${{ steps.cache-vcpkg.outputs.cache-hit }}`' >> $env:GITHUB_STEP_SUMMARY # Job 2: Build/test Axom for Debug/Release, but DO NOT rebuild TPLs From 9076e002d23646d94b2fa2dcd91cf688ff4de355 Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Mon, 29 Dec 2025 13:46:53 -0800 Subject: [PATCH 4/7] Adds missing `triplet` config from build/test job --- .github/workflows/test_windows_tpls.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_windows_tpls.yml b/.github/workflows/test_windows_tpls.yml index 964555637d..1fc38207e4 100644 --- a/.github/workflows/test_windows_tpls.yml +++ b/.github/workflows/test_windows_tpls.yml @@ -116,6 +116,7 @@ jobs: fail-fast: false matrix: cfg: ["Debug", "Release"] + triplet: ["x64-windows", "x86-windows"] include: - triplet: "x64-windows" msvc: "202264" From 0ec049118e3301e9598554676462611b8d6f92de Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Mon, 29 Dec 2025 17:17:33 -0800 Subject: [PATCH 5/7] Updates github actions ci-tests plan to use cached vcpkg builds on Windows --- .github/workflows/ci-tests.yml | 58 ++++++++++-- host-configs/msvc/x64-windows.cmake | 135 ++++++++++++++++++++++++++++ host-configs/msvc/x86-windows.cmake | 135 ++++++++++++++++++++++++++++ 3 files changed, 323 insertions(+), 5 deletions(-) create mode 100644 host-configs/msvc/x64-windows.cmake create mode 100644 host-configs/msvc/x86-windows.cmake diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 40c0acfca4..5e62e659e0 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -14,6 +14,7 @@ concurrency: env: CLANG_DOCKER_IMAGE: axom/tpls:clang-19_12-24-25_01h-51m GCC_DOCKER_IMAGE: axom/tpls:gcc-13_12-24-25_01h-51m + WIN_TPL_TIMESTAMP: 12-29-25_21h-52m jobs: # Hacky solution to reference env variables outside of `run` steps https://stackoverflow.com/a/74217028 @@ -119,29 +120,76 @@ jobs: path: "**/Test.xml" windows_build_and_test: runs-on: windows-latest + strategy: # If any of checks (e.g. style) fail, allow other jobs to continue running. fail-fast: false + env: - CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF -DAXOM_ENABLE_SINA:BOOL=OFF -DAXOM_ENABLE_MIR:BOOL=OFF -DAXOM_ENABLE_BUMP:BOOL=OFF' + CMAKE_EXTRA_FLAGS: ' ' + VCPKG_TRIPLET: x64-windows + steps: - name: Checkout Axom uses: actions/checkout@v4 with: submodules: recursive - - name: Windows - CMake + + - name: Set up python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Configure vcpkg binary cache directory + shell: pwsh run: | - cmake ${{ env.CMAKE_EXTRA_FLAGS }} -B build -S src + $cacheDir = "${{ github.workspace }}\.vcpkg-cache" + New-Item -ItemType Directory -Force -Path $cacheDir | Out-Null + "VCPKG_DEFAULT_BINARY_CACHE=$cacheDir" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Restore vcpkg binary artifacts (TPLs) + id: cache-vcpkg + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}\.vcpkg-cache + key: > + win-tpls-${{ env.WIN_TPL_TIMESTAMP }}-${{ env.VCPKG_TRIPLET }}- + ${{ hashFiles( + 'scripts/uberenv/**', + 'scripts/vcpkg_ports/**', + '**/vcpkg.json', + '**/vcpkg-configuration.json' + ) }} + restore-keys: | + win-tpls-${{ env.WIN_TPL_TIMESTAMP }}-${{ env.VCPKG_TRIPLET }}- + win-tpls-${{ env.WIN_TPL_TIMESTAMP }}- + - name: Windows - Run uberenv (fast with cache) shell: pwsh - - name: Windows - Build run: | - cmake --build build + python3 .\scripts\uberenv\uberenv.py --triplet ${{ env.VCPKG_TRIPLET }} + + - name: Windows - Configure (config-build.py + checked-in host-config) shell: pwsh + run: | + python3 .\config-build.py -bp build -ip install -hc host-configs/msvc/x64-windows.cmake --msvc 202264 -- $env:CMAKE_EXTRA_FLAGS + + - name: Windows - Build + shell: pwsh + run: | + cmake --build build --config Debug + - name: Windows - Test + shell: pwsh run: | cd build ctest -C Debug -T Test --output-on-failure -V + + - name: Windows - Report cache hit shell: pwsh + run: | + echo "WIN_TPL_TIMESTAMP = ${{ env.WIN_TPL_TIMESTAMP }}" + echo "cache-hit = ${{ steps.cache-vcpkg.outputs.cache-hit }}" + macos_build_and_test: runs-on: macos-latest strategy: diff --git a/host-configs/msvc/x64-windows.cmake b/host-configs/msvc/x64-windows.cmake new file mode 100644 index 0000000000..233a3ec793 --- /dev/null +++ b/host-configs/msvc/x64-windows.cmake @@ -0,0 +1,135 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and +# other Axom Project Developers. See the top-level LICENSE file for details. +# +# SPDX-License-Identifier: (BSD-3-Clause) +#------------------------------------------------------------------------------ +# Host-config generated by vcpkg +# +# Port: axom +# Architecture: x64 +# Platform toolset: v143 +# +# vcpkg root path: D:/a/axom/axom/uberenv_libs/vcpkg +# vcpkg target triplet: x64-windows +# vcpkg target triplet file: D:/a/axom/axom/uberenv_libs/vcpkg/triplets/x64-windows.cmake +# +# CMake executable path: C:/Program Files/CMake/bin/cmake.exe +#------------------------------------------------------------------------------ +# To configure the code using the vcpkg toolchain: +# cmake -C D:/a/axom/axom/uberenv_libs/vcpkg/packages/axom_x64-windows/include/axom/hc.cmake \ +# -G \ +# ../src +# +# Supported MSVC generators: +# For x86 MSVC builds, use "Visual Studio 2022", "Visual Studio 2019" or "Visual Studio 2017" +# For x64 MSVC builds, use "Visual Studio 2022 -A x64", "Visual Studio 2019 -A x64" or "Visual Studio 2017 Win64" +# (note: msvc 2019 and later use the -A flag to set the architecture) +# +# +# One can also use Axom's `config-build` script: +# cd +# config-build.py -hc D:/a/axom/axom/uberenv_libs/vcpkg/packages/axom_x64-windows/include/axom/hc.cmake \ +# --msvc {2017,201764,2019,201964,2022,202264} \ +# [other options] +# +#------------------------------------------------------------------------------ +# To build the code through the command line: +# cmake --build . --target ALL_BUILD --config Debug [ -- -m:8 [-v:m] ] +# +# To run tests, run either: +# cmake --build . --target RUN_TESTS --config Debug +# ctest -C Debug [-j8] +# +# For release builds, use 'Release' in the configuration instead of 'Debug' +#------------------------------------------------------------------------------ + +# Toolchain file +set(CMAKE_TOOLCHAIN_FILE "D:/a/axom/axom/uberenv_libs/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE FILEPATH "") +set(VCPKG_TARGET_TRIPLET "x64-windows" CACHE STRING "") + +# CMake options +set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "") + +# Axom options +set(AXOM_ENABLE_TESTS ON CACHE BOOL "") +set(AXOM_ENABLE_DOCS OFF CACHE BOOL "") +set(AXOM_ENABLE_EXAMPLES ON CACHE BOOL "") +set(AXOM_ENABLE_TUTORIALS ON CACHE BOOL "") + +if(VCPKG_TARGET_TRIPLET MATCHES "^x64") + set(AXOM_USE_64BIT_INDEXTYPE ON CACHE BOOL "") +else() + set(AXOM_USE_64BIT_INDEXTYPE OFF CACHE BOOL "") +endif() + +# BLT options +set(ENABLE_FORTRAN OFF CACHE BOOL "") +set(ENABLE_FOLDERS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# Static vs. Dynamic builds +#------------------------------------------------------------------------------ +# Note: Static builds require some care and effort to get right with MSVC. +# With a static build, choose one of +# - disable Google Test and MSVC static MD to MT (see BLT options +# section) or +# - disable one of HDF5, conduit (which uses HDF5), or sidre (which +# uses conduit). +#------------------------------------------------------------------------------ + +# On Windows, build shared libraries by default. +set(BUILD_SHARED_LIBS ON CACHE BOOL "") +# Shared libraries on Windows don't export symbols by default. We'll export +# all symbols to make behavior more like Linux or Mac OS. +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON CACHE BOOL "") + +# Toggle the following to disable gtest if you are compiling with static +# libraries and need HDF5 +set(ENABLE_GTEST ON CACHE BOOL "") +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +# Toggle the following to disable changing MSVC's /MD to /MT if you are +# compiling with static libraries and need HDF5 +set(BLT_ENABLE_MSVC_STATIC_MD_TO_MT ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# MPI options +#------------------------------------------------------------------------------ +set(ENABLE_MPI OFF CACHE BOOL "") + +# If MSMPI and no other MPI is installed, turn ENABLE_MPI ON and CMake +# should automatically detect it. If CMake doesn't auto-detect MSMPI, +# or if you need to use another MPI, you will need to specify the MPI +# compiler wrappers and helper settings. +# +# Here are settings that might be appropriate for Intel compiler: +# +# set(MPI_C_COMPILER "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019.5.281/windows/mpi/intel64/bin/mpicc.bat" CACHE PATH "") +# set(MPI_CXX_COMPILER "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019.5.281/windows/mpi/intel64/bin/mpicc.bat" CACHE PATH "") +# set(MPI_Fortran_COMPILER "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019.5.281/windows/mpi/intel64/bin/mpifc.bat" CACHE PATH "") +# set(MPIEXEC "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019.5.281/windows/mpi/intel64/bin/mpiexec.exe" CACHE PATH "") +# set(MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Set TPLs +#------------------------------------------------------------------------------ + +set(CONDUIT_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x64-windows/share/conduit" CACHE PATH "") +set(HDF5_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x64-windows" CACHE PATH "") + +set(LUA_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x64-windows" CACHE PATH "") + +set(MFEM_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x64-windows" CACHE PATH "") + +# Setup OpenMP; fix MSVC linker error about unknown flag +set(ENABLE_OPENMP ON CACHE BOOL "") +set(BLT_OPENMP_LINK_FLAGS " " CACHE STRING "") + +set(RAJA_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x64-windows" CACHE PATH "") +# umpire dependency disabled +set(OPENCASCADE_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x64-windows" CACHE PATH "") + +set(CAMP_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x64-windows" CACHE PATH "") diff --git a/host-configs/msvc/x86-windows.cmake b/host-configs/msvc/x86-windows.cmake new file mode 100644 index 0000000000..a54e67a09b --- /dev/null +++ b/host-configs/msvc/x86-windows.cmake @@ -0,0 +1,135 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and +# other Axom Project Developers. See the top-level LICENSE file for details. +# +# SPDX-License-Identifier: (BSD-3-Clause) +#------------------------------------------------------------------------------ +# Host-config generated by vcpkg +# +# Port: axom +# Architecture: x86 +# Platform toolset: v143 +# +# vcpkg root path: D:/a/axom/axom/uberenv_libs/vcpkg +# vcpkg target triplet: x86-windows +# vcpkg target triplet file: D:/a/axom/axom/uberenv_libs/vcpkg/triplets/x86-windows.cmake +# +# CMake executable path: C:/Program Files/CMake/bin/cmake.exe +#------------------------------------------------------------------------------ +# To configure the code using the vcpkg toolchain: +# cmake -C D:/a/axom/axom/uberenv_libs/vcpkg/packages/axom_x86-windows/include/axom/hc.cmake \ +# -G \ +# ../src +# +# Supported MSVC generators: +# For x86 MSVC builds, use "Visual Studio 2022", "Visual Studio 2019" or "Visual Studio 2017" +# For x64 MSVC builds, use "Visual Studio 2022 -A x64", "Visual Studio 2019 -A x64" or "Visual Studio 2017 Win64" +# (note: msvc 2019 and later use the -A flag to set the architecture) +# +# +# One can also use Axom's `config-build` script: +# cd +# config-build.py -hc D:/a/axom/axom/uberenv_libs/vcpkg/packages/axom_x86-windows/include/axom/hc.cmake \ +# --msvc {2017,201764,2019,201964,2022,202264} \ +# [other options] +# +#------------------------------------------------------------------------------ +# To build the code through the command line: +# cmake --build . --target ALL_BUILD --config Debug [ -- -m:8 [-v:m] ] +# +# To run tests, run either: +# cmake --build . --target RUN_TESTS --config Debug +# ctest -C Debug [-j8] +# +# For release builds, use 'Release' in the configuration instead of 'Debug' +#------------------------------------------------------------------------------ + +# Toolchain file +set(CMAKE_TOOLCHAIN_FILE "D:/a/axom/axom/uberenv_libs/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE FILEPATH "") +set(VCPKG_TARGET_TRIPLET "x86-windows" CACHE STRING "") + +# CMake options +set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "") + +# Axom options +set(AXOM_ENABLE_TESTS ON CACHE BOOL "") +set(AXOM_ENABLE_DOCS OFF CACHE BOOL "") +set(AXOM_ENABLE_EXAMPLES ON CACHE BOOL "") +set(AXOM_ENABLE_TUTORIALS ON CACHE BOOL "") + +if(VCPKG_TARGET_TRIPLET MATCHES "^x64") + set(AXOM_USE_64BIT_INDEXTYPE ON CACHE BOOL "") +else() + set(AXOM_USE_64BIT_INDEXTYPE OFF CACHE BOOL "") +endif() + +# BLT options +set(ENABLE_FORTRAN OFF CACHE BOOL "") +set(ENABLE_FOLDERS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# Static vs. Dynamic builds +#------------------------------------------------------------------------------ +# Note: Static builds require some care and effort to get right with MSVC. +# With a static build, choose one of +# - disable Google Test and MSVC static MD to MT (see BLT options +# section) or +# - disable one of HDF5, conduit (which uses HDF5), or sidre (which +# uses conduit). +#------------------------------------------------------------------------------ + +# On Windows, build shared libraries by default. +set(BUILD_SHARED_LIBS ON CACHE BOOL "") +# Shared libraries on Windows don't export symbols by default. We'll export +# all symbols to make behavior more like Linux or Mac OS. +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON CACHE BOOL "") + +# Toggle the following to disable gtest if you are compiling with static +# libraries and need HDF5 +set(ENABLE_GTEST ON CACHE BOOL "") +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +# Toggle the following to disable changing MSVC's /MD to /MT if you are +# compiling with static libraries and need HDF5 +set(BLT_ENABLE_MSVC_STATIC_MD_TO_MT ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# MPI options +#------------------------------------------------------------------------------ +set(ENABLE_MPI OFF CACHE BOOL "") + +# If MSMPI and no other MPI is installed, turn ENABLE_MPI ON and CMake +# should automatically detect it. If CMake doesn't auto-detect MSMPI, +# or if you need to use another MPI, you will need to specify the MPI +# compiler wrappers and helper settings. +# +# Here are settings that might be appropriate for Intel compiler: +# +# set(MPI_C_COMPILER "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019.5.281/windows/mpi/intel64/bin/mpicc.bat" CACHE PATH "") +# set(MPI_CXX_COMPILER "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019.5.281/windows/mpi/intel64/bin/mpicc.bat" CACHE PATH "") +# set(MPI_Fortran_COMPILER "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019.5.281/windows/mpi/intel64/bin/mpifc.bat" CACHE PATH "") +# set(MPIEXEC "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2019.5.281/windows/mpi/intel64/bin/mpiexec.exe" CACHE PATH "") +# set(MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Set TPLs +#------------------------------------------------------------------------------ + +set(CONDUIT_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x86-windows/share/conduit" CACHE PATH "") +set(HDF5_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x86-windows" CACHE PATH "") + +set(LUA_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x86-windows" CACHE PATH "") + +set(MFEM_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x86-windows" CACHE PATH "") + +# Setup OpenMP; fix MSVC linker error about unknown flag +set(ENABLE_OPENMP ON CACHE BOOL "") +set(BLT_OPENMP_LINK_FLAGS " " CACHE STRING "") + +# raja dependency disabled +# umpire dependency disabled + +set(OPENCASCADE_DIR "D:/a/axom/axom/uberenv_libs/vcpkg/installed/x86-windows" CACHE PATH "") + From 3eaf9435408db613c82f79677eab469d18d3a691 Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Mon, 29 Dec 2025 17:44:24 -0800 Subject: [PATCH 6/7] Fixup -- do not update the vcpkg cache from the ci-tests job But regenerate it if necessary to avoid failing the job --- .github/workflows/ci-tests.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 5e62e659e0..15df701e6c 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -126,7 +126,6 @@ jobs: fail-fast: false env: - CMAKE_EXTRA_FLAGS: ' ' VCPKG_TRIPLET: x64-windows steps: @@ -149,7 +148,7 @@ jobs: - name: Restore vcpkg binary artifacts (TPLs) id: cache-vcpkg - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: ${{ github.workspace }}\.vcpkg-cache key: > @@ -163,6 +162,15 @@ jobs: restore-keys: | win-tpls-${{ env.WIN_TPL_TIMESTAMP }}-${{ env.VCPKG_TRIPLET }}- win-tpls-${{ env.WIN_TPL_TIMESTAMP }}- + + - name: Windows - Cache status + shell: pwsh + run: | + if ("${{ steps.cache-vcpkg.outputs.cache-hit }}" -eq "true") { + echo "vcpkg binary cache hit; uberenv should be fast." + } else { + echo "vcpkg binary cache miss; uberenv will build missing TPLs locally (no cache upload in this workflow)." + } - name: Windows - Run uberenv (fast with cache) shell: pwsh run: | @@ -171,7 +179,7 @@ jobs: - name: Windows - Configure (config-build.py + checked-in host-config) shell: pwsh run: | - python3 .\config-build.py -bp build -ip install -hc host-configs/msvc/x64-windows.cmake --msvc 202264 -- $env:CMAKE_EXTRA_FLAGS + python3 .\config-build.py -bp build -ip install -hc host-configs/msvc/x64-windows.cmake --msvc 202264 - name: Windows - Build shell: pwsh @@ -240,5 +248,3 @@ jobs: submodules: recursive - name: Check ${{ matrix.check_type }} run: ./scripts/github-actions/linux-check.sh - - From 5e74be2fc0a3ee7ef6657ba801d4eb1f0f30705f Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Mon, 29 Dec 2025 19:48:58 -0800 Subject: [PATCH 7/7] Cache was not found -- attempt to fix --- .github/workflows/ci-tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 15df701e6c..41f7a73405 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -14,7 +14,7 @@ concurrency: env: CLANG_DOCKER_IMAGE: axom/tpls:clang-19_12-24-25_01h-51m GCC_DOCKER_IMAGE: axom/tpls:gcc-13_12-24-25_01h-51m - WIN_TPL_TIMESTAMP: 12-29-25_21h-52m + WIN_TPL_TIMESTAMP: "12-29-25_21h-52m" jobs: # Hacky solution to reference env variables outside of `run` steps https://stackoverflow.com/a/74217028 @@ -120,6 +120,9 @@ jobs: path: "**/Test.xml" windows_build_and_test: runs-on: windows-latest + permissions: + actions: read + contents: read strategy: # If any of checks (e.g. style) fail, allow other jobs to continue running. @@ -166,6 +169,11 @@ jobs: - name: Windows - Cache status shell: pwsh run: | + echo "ref = ${{ github.ref }}" + echo "event_name = ${{ github.event_name }}" + echo "WIN_TPL_TIMESTAMP = ${{ env.WIN_TPL_TIMESTAMP }}" + echo "VCPKG_TRIPLET = ${{ env.VCPKG_TRIPLET }}" + echo "cache-key = win-tpls-${{ env.WIN_TPL_TIMESTAMP }}-${{ env.VCPKG_TRIPLET }}- ${{ hashFiles('scripts/uberenv/**', 'scripts/vcpkg_ports/**', '**/vcpkg.json', '**/vcpkg-configuration.json') }}" if ("${{ steps.cache-vcpkg.outputs.cache-hit }}" -eq "true") { echo "vcpkg binary cache hit; uberenv should be fast." } else {