diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 55a5a78f70..0000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,117 +0,0 @@ -environment: - matrix: - - TARGET_ARCH: x64 - CONDA_PY: 3.7 - CONDA_INSTALL_LOCN: C:\\Miniconda37-x64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - platform: x64 - SHARED: OFF - - - TARGET_ARCH: x86 - CONDA_PY: 3.7 - CONDA_INSTALL_LOCN: C:\\Miniconda37 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - platform: x86 - SHARED: ON - -configuration: -# - Debug - - Release - -# Clone directory. -clone_folder: c:\projects\openpmd-api - -# Fetch repository as zip archive. -shallow_clone: false - -# Set the clone depth. -clone_depth: 1 - -# Build tags (GitHub only) -skip_tags: false - -branches: - except: - - azure_install - - coverity_scan - - gh-pages - -init: - # Print AppVeyor environment variables - - cmd: echo "%APPVEYOR%" - - cmd: echo "%CI%" - - cmd: echo "%APPVEYOR_API_URL%" - - cmd: echo "%APPVEYOR_ACCOUNT_NAME%" - - cmd: echo "%APPVEYOR_BUILD_WORKER_IMAGE%" - - cmd: echo "%APPVEYOR_PROJECT_ID%" - - cmd: echo "%APPVEYOR_PROJECT_NAME%" - - cmd: echo "%APPVEYOR_PROJECT_SLUG%" - - cmd: echo "%APPVEYOR_BUILD_FOLDER%" - - cmd: echo "%APPVEYOR_BUILD_ID%" - - cmd: echo "%APPVEYOR_BUILD_NUMBER%" - - cmd: echo "%APPVEYOR_BUILD_VERSION%" - - cmd: echo "%APPVEYOR_PULL_REQUEST_NUMBER%" - - cmd: echo "%APPVEYOR_PULL_REQUEST_TITLE%" - - cmd: echo "%APPVEYOR_JOB_ID%" - - cmd: echo "%APPVEYOR_REPO_PROVIDER%" - - cmd: echo "%APPVEYOR_REPO_SCM%" - - cmd: echo "%APPVEYOR_REPO_NAME%" - - cmd: echo "%APPVEYOR_REPO_BRANCH%" - - cmd: echo "%APPVEYOR_REPO_TAG%" - - cmd: echo "%APPVEYOR_REPO_TAG_NAME%" - - cmd: echo "%APPVEYOR_REPO_COMMIT%" - - cmd: echo "%APPVEYOR_REPO_COMMIT_TIMESTAMP%" - - cmd: echo "%APPVEYOR_REPO_COMMIT_MESSAGE%" - - cmd: echo "%APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED%" - - cmd: echo "%APPVEYOR_SCHEDULED_BUILD%" - - cmd: echo "%APPVEYOR_FORCED_BUILD%" - - cmd: echo "%APPVEYOR_RE_BUILD%" - - cmd: echo "%PLATFORM%" - - cmd: echo "%TARGET_ARCH%" - - cmd: echo "%CONFIGURATION%" - - cmd: echo "%SHARED%" - -install: - # Cywin's git breaks conda-build. (see https://github.com/conda-forge/conda-smithy-feedstock/pull/2) - - cmd: rmdir C:\cygwin /s /q - - # Add path, activate `conda` and update conda. - - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat - - - cmd: set PYTHONUNBUFFERED=1 - - # Add our channels. - - cmd: conda config --set show_channel_urls true - - cmd: conda config --add channels defaults - - cmd: conda config --append channels conda-forge - - # Configure the VM. - - cmd: conda install -n root --quiet --yes numpy cmake hdf5 python=%CONDA_PY% - # ADIOS2 build only for 64bit Windows - - cmd: if "%TARGET_ARCH%"=="x64" conda install -n root --quiet --yes adios2 python=%CONDA_PY% - -before_build: - - cmd: cd C:\projects\openpmd-api - - cmd: mkdir build - - cmd: cd build - - # Download example files - - ps: ..\share\openPMD\download_samples.ps1 - - # Compiler & Generator Selection - - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set OPENPMD_CMAKE_GENERATOR=Visual Studio 15 2017 - - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" set OPENPMD_CMAKE_GENERATOR=Visual Studio 16 2019 - - cmd: if "%TARGET_ARCH%"=="x64" set OPENPMD_CMAKE_GENERATOR=%OPENPMD_CMAKE_GENERATOR% Win64 -# - cmd: if "%TARGET_ARCH%"=="x86" "C:\Program Files (x86)\Microsoft Visual Studio 15.9\VC\vcvarsall.bat" x86 -# - cmd: if "%TARGET_ARCH%"=="x64" "C:\Program Files (x86)\Microsoft Visual Studio 15.9\VC\vcvarsall.bat" amd64 - - # CMake configure - - cmd: cmake -G "%OPENPMD_CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_SHARED_LIBS=%SHARED% -DBUILD_TESTING=ON -DopenPMD_USE_PYTHON=ON -DPython_EXECUTABLE="%CONDA_INSTALL_LOCN%\python.exe" -DCMAKE_INSTALL_PREFIX="%CONDA_INSTALL_LOCN%" -DCMAKE_INSTALL_BINDIR="Library\bin" ".." - -build_script: - - cmd: cmake --build . --config %CONFIGURATION% -j 2 - - cmd: cmake --build . --config %CONFIGURATION% --target install - -test_script: - - cmd: ctest -V -C %CONFIGURATION% - - cmd: call %CONDA_INSTALL_LOCN%\python.exe -c "import openpmd_api; print(openpmd_api.__version__); print(openpmd_api.variants)" diff --git a/.github/workflows/dependencies/conda_win32.yml b/.github/workflows/dependencies/conda_win32.yml new file mode 100644 index 0000000000..8838362e3e --- /dev/null +++ b/.github/workflows/dependencies/conda_win32.yml @@ -0,0 +1,28 @@ +# This is a Conda environment file. +# +# Activating and installing this environment will provide all dependencies +# that are needed for full-feature development: +# - conda env create --file conda.yml +# - conda activate openpmd-api-dev +# +# If you need more packages in that environment, e.g. jupyter, run: +# - mamba install -y -c conda-forge jupyter jupyterlab dask-labextension +# + +name: openpmd-api-win32-dev +channels: + - defaults +dependencies: + - curl + - cmake + - git + - hdf5 + - ninja + - numpy + - pandas + - pip + - python>=3.8 + +# just a note for later hackery, we could install pip packages inside the env, too: +# - pip: +# - "-r requirements.txt" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5d132a622b..284f45c221 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -77,3 +77,29 @@ jobs: # add before install, and fix Python path: # ctest --test-dir build -C Debug --output-on-failure + + build_win_32bit: + name: MSVC 32bit + runs-on: windows-2019 + if: github.event.pull_request.draft == false + env: + CMAKE_GENERATOR: "Visual Studio 16 2019" + steps: + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 + name: Setup conda + with: + architecture: "x86" + auto-update-conda: true + activate-environment: openpmd-api-win32-dev + environment-file: .github/workflows/dependencies/conda_win32.yml + channels: defaults + channel-priority: true + - name: Build & Install + run: | + cmake -S . -B build ` + -DCMAKE_BUILD_TYPE=Release ` + -DopenPMD_USE_MPI=OFF + cmake --build build --config Release --parallel 2 + ctest --test-dir build --output-on-failure -C Release + cmake --build build --config Release --target install diff --git a/conda.yml b/conda.yml index e82567b2ae..62177ac8e7 100644 --- a/conda.yml +++ b/conda.yml @@ -13,7 +13,6 @@ name: openpmd-api-dev channels: - conda-forge dependencies: - - adios=*=mpi_openmpi_* - adios2=*=mpi_openmpi_* # - catch2 # shipped internally - ccache diff --git a/conda_nompi.yml b/conda_nompi.yml new file mode 100644 index 0000000000..c504062c29 --- /dev/null +++ b/conda_nompi.yml @@ -0,0 +1,40 @@ +# This is a Conda environment file. +# +# Activating and installing this environment will provide all dependencies +# that are needed for full-feature development: +# - conda env create --file conda.yml +# - conda activate openpmd-api-dev +# +# If you need more packages in that environment, e.g. jupyter, run: +# - mamba install -y -c conda-forge jupyter jupyterlab dask-labextension +# + +name: openpmd-api-nompi-dev +channels: + - conda-forge +dependencies: + - adios2=*=nompi* +# - catch2 # shipped internally + - ccache + - curl + - cmake + - compilers + - dask + - doxygen + - git + - hdf5=*=nompi* + - mamba + - make + - ninja + - numpy + - pandas + - pkg-config + - pip + - pre-commit + - pyarrow # for dask +# - pybind11 # shipped internally + - python>=3.8 + +# just a note for later hackery, we could install pip packages inside the env, too: +# - pip: +# - "-r requirements.txt"