Skip to content

add python wrapping to get particle masks and a test #1438

add python wrapping to get particle masks and a test

add python wrapping to get particle masks and a test #1438

Workflow file for this run

name: CI:ubuntu-gcc
on:
push:
branches: [ devel3 ]
paths-ignore:
- 'wiki/**'
pull_request:
branches: [ devel3 ]
paths-ignore:
- 'wiki/**'
env:
BUILD_TYPE: RelWithDebInfo
jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/fnalacceleratormodeling/synergia2-containers/ubuntu-gcc:main
steps:
- name: Cancel Previous runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: CMake
run: |
lscpu
. /opt/spack-environment/activate.sh
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install \
-DCMAKE_LINKER_TYPE=MOLD \
-DBUILD_PYTHON_BINDINGS=on -DPYTHON_EXECUTABLE=$(which python3) \
-DENABLE_KOKKOS_BACKEND=OpenMP \
-DBUILD_FD_SPACE_CHARGE_SOLVER=ON \
-DUSE_OPENPMD_IO=ON \
-DUSE_EXTERNAL_OPENPMD=ON \
-DUSE_EXTERNAL_KOKKOS=OFF -GNinja
- name: build
# build synergia2
run: |
. /opt/spack-environment/activate.sh
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 2
- name: install
# install synergia2
run: |
. /opt/spack-environment/activate.sh
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: ctest
# Execute tests defined by the CMake configuration.
run: |
. /opt/spack-environment/activate.sh
cd ${{github.workspace}}/build
ctest -C ${{env.BUILD_TYPE}} --output-on-failure
# Debug: checkpoint at which to open tmate session
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# sudo: false
- name: run-fodopy
# Run the fodopy example from README.
run: |
. /opt/spack-environment/activate.sh
export SYNINSTALL=${{github.workspace}}/install
export LD_LIBRARY_PATH=${SYNINSTALL}/lib:${SYNINSTALL}/lib64:\${LD_LIBRARY_PATH}
export PYTHON_VERSION=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
export PYTHONPATH=${SYNINSTALL}/lib:${SYNINSTALL}/lib/python${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
cd ${{github.workspace}}/build/examples/fodo
mpirun -np 1 python fodo_readme.py