Skip to content

Add Python CSR wake plotting test. #3205

Add Python CSR wake plotting test.

Add Python CSR wake plotting test. #3205

Workflow file for this run

name: 🪟 Windows
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-windows
cancel-in-progress: true
jobs:
build_win_msvc:
name: MSVC w/o MPI shared
runs-on: windows-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-windows-winmsvc-${{ hashFiles('.github/workflows/windows.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-windows-winmsvc-${{ hashFiles('.github/workflows/windows.yml') }}-
ccache-windows-winmsvc-
- name: Download Dependencies
run: |
Invoke-WebRequest http://fftw.org/fftw-3.3.10.tar.gz -OutFile fftw-3.3.10.tar.gz
7z.exe x -r fftw-3.3.10.tar.gz
7z.exe x -r fftw-3.3.10.tar
Invoke-WebRequest https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_12_2.tar.gz -OutFile hdf5-1_12_2.tar.gz
7z.exe x -r hdf5-1_12_2.tar.gz
7z.exe x -r hdf5-1_12_2.tar
- name: Install Dependencies
env:
# Work-around for windows-latest GH runner issue, see
# https://github.com/actions/runner-images/issues/10004
CXXFLAGS: "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"
run: |
cmake -S fftw-3.3.10 -B build_fftw `
-DBUILD_SHARED_LIBS=OFF `
-DBUILD_TESTS=OFF `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DDISABLE_FORTRAN=ON
if(!$?) { Exit $LASTEXITCODE }
cmake --build build_fftw --config RelWithDebInfo --target install --parallel 4
if(!$?) { Exit $LASTEXITCODE }
cmake -S hdf5-hdf5-1_12_2 -B build_hdf5 `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DBUILD_SHARED_LIBS=OFF `
-DBUILD_TESTING=OFF `
-DHDF5_BUILD_HL_LIB=OFF `
-DHDF5_BUILD_TOOLS=OFF `
-DHDF5_BUILD_EXAMPLES=OFF `
-DHDF5_ENABLE_SZIP_SUPPORT=OFF `
-DHDF5_ENABLE_Z_LIB_SUPPORT=OFF
if(!$?) { Exit $LASTEXITCODE }
cmake --build build_hdf5 --config RelWithDebInfo --target install --parallel 4
if(!$?) { Exit $LASTEXITCODE }
$env:HDF5_DIR = "C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
$env:HDF5_USE_STATIC_LIBRARIES = "ON"
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U -r requirements.txt
python3 -m pip install -U -r src/python/impactx/dashboard/requirements.txt
python3 -m pip install -U -r examples/requirements.txt
python3 -m pip install -U -r tests/python/requirements.txt
python3 -m pip install -U openPMD-validator
- name: Build
env:
# Work-around for windows-latest GH runner issue, see
# https://github.com/actions/runner-images/issues/10004
CXXFLAGS: "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"
# FFTW3 install prefix path
FFTW3_DIR: "C:/Program Files (x86)/fftw/"
run: |
$env:HDF5_DIR = "C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
cmake -S . -B build `
-DBUILD_SHARED_LIBS=ON `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_VERBOSE_MAKEFILE=ON `
-DHDF5_USE_STATIC_LIBRARIES=ON `
-DImpactX_COMPUTE=NOACC `
-DImpactX_FFT=ON `
-DImpactX_MPI=OFF `
-DImpactX_PYTHON=ON `
-DopenPMD_USE_HDF5=ON `
-DPython_EXECUTABLE=python3
if(!$?) { Exit $LASTEXITCODE }
cmake --build build --config RelWithDebInfo --parallel 4
if(!$?) { Exit $LASTEXITCODE }
- name: Test
run: |
ctest --test-dir build --build-config RelWithDebInfo --output-on-failure -E AMReX
if(!$?) { Exit $LASTEXITCODE }
- name: Install
run: |
cmake --build build --config RelWithDebInfo --target install
if(!$?) { Exit $LASTEXITCODE }
cmake --build build --config RelWithDebInfo --target pip_install
if(!$?) { Exit $LASTEXITCODE }
- name: validate created openPMD files
run: Get-ChildItem -Path build -Recurse -Filter *.h5 | %{openPMD_check_h5 -i $_}
build_win_clang:
name: Clang w/ OMP w/o MPI
runs-on: windows-2019
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-windows-winclang-${{ hashFiles('.github/workflows/windows.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-windows-winclang-${{ hashFiles('.github/workflows/windows.yml') }}-
ccache-windows-winclang-
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Download Dependencies
run: |
Invoke-WebRequest http://fftw.org/fftw-3.3.10.tar.gz -OutFile fftw-3.3.10.tar.gz
7z.exe x -r fftw-3.3.10.tar.gz
7z.exe x -r fftw-3.3.10.tar
Invoke-WebRequest https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_12_2.tar.gz -OutFile hdf5-1_12_2.tar.gz
7z.exe x -r hdf5-1_12_2.tar.gz
7z.exe x -r hdf5-1_12_2.tar
- name: Install Dependencies
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
cmake -S fftw-3.3.10 ^
-B build_fftw ^
-G "Ninja" ^
-DBUILD_TESTS=OFF ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DDISABLE_FORTRAN=ON
if errorlevel 1 exit 1
cmake --build build_fftw --config Release --target install --parallel 4
if errorlevel 1 exit 1
cmake -S hdf5-hdf5-1_12_2 -B build_hdf5 ^
-G "Ninja" ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DHDF5_BUILD_HL_LIB=OFF ^
-DHDF5_BUILD_TOOLS=OFF ^
-DHDF5_BUILD_EXAMPLES=OFF ^
-DHDF5_ENABLE_SZIP_SUPPORT=OFF ^
-DHDF5_ENABLE_Z_LIB_SUPPORT=OFF
if errorlevel 1 exit 1
cmake --build build_hdf5 --config Release --target install --parallel 4
if errorlevel 1 exit 1
set "HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
set "HDF5_USE_STATIC_LIBRARIES=ON"
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U -r requirements.txt
python3 -m pip install -U -r src/python/impactx/dashboard/requirements.txt
python3 -m pip install -U -r examples/requirements.txt
python3 -m pip install -U -r tests/python/requirements.txt
python3 -m pip install -U openPMD-validator
- name: Build
shell: cmd
env:
# FFTW3 install prefix path
FFTW3_DIR: "C:/Program Files (x86)/fftw/"
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
set "HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
cmake -S . -B build ^
-G "Ninja" ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_VERBOSE_MAKEFILE=ON ^
-DHDF5_USE_STATIC_LIBRARIES=ON ^
-DImpactX_COMPUTE=OMP ^
-DImpactX_FFT=ON ^
-DImpactX_MPI=OFF ^
-DImpactX_PYTHON=ON ^
-DopenPMD_USE_HDF5=ON ^
-DPython_EXECUTABLE=python3
if errorlevel 1 exit 1
cmake --build build --parallel 4
if errorlevel 1 exit 1
- name: Test
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
ctest --test-dir build --output-on-failure -E AMReX
if errorlevel 1 exit 1
# - name: Install
# shell: cmd
# run: |
# call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
# set "HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
#
# cmake --build build --target install
# if errorlevel 1 exit 1
# cmake --build build --target pip_install
# if errorlevel 1 exit 1
- name: validate created openPMD files
run: Get-ChildItem -Path build -Recurse -Filter *.h5 | %{openPMD_check_h5 -i $_}