Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 69 additions & 7 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -119,29 +120,92 @@ 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.
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'
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/restore@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 - 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 {
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
- 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

- 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:
Expand Down Expand Up @@ -192,5 +256,3 @@ jobs:
submodules: recursive
- name: Check ${{ matrix.check_type }}
run: ./scripts/github-actions/linux-check.sh


151 changes: 137 additions & 14 deletions .github/workflows/test_windows_tpls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,174 @@ 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:
# 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

- 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
"tpl_timestamp=$ts" | Out-File -FilePath $env:GITHUB_OUTPUT -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() }}
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"]
triplet: ["x64-windows", "x86-windows"]
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
Expand All @@ -66,12 +188,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() }}
Expand Down
Loading
Loading