Skip to content

Fixed return type. #482

Fixed return type.

Fixed return type. #482

Workflow file for this run

name: Run PyTests
on:
push:
pull_request:
branches: ["master"]
env:
PY_COLORS: 1
jobs:
build:
name: Python ${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.mpi }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: [ "ubuntu-18.04", "macos-11" ]
os: [ "ubuntu-22.04"]
python-version: ["3.9", "3.10" ]
mpi: [mpich, openmpi]
include:
- os: ubuntu-22.04
mpi: mpich
install-mpi: sudo apt install -y mpich libmpich-dev tree
- os: ubuntu-22.04
mpi: openmpi
install-mpi: sudo apt install -y openmpi-bin libopenmpi-dev tree
# - os: macos-11
# mpi: mpich
# install-mpi: brew install mpich tree
# - os: macos-11
# mpi: openmpi
# install-mpi: brew install open-mpi tree
steps:
- name: Checkout πŸ›ŽοΈ
uses: "actions/checkout@v4"
- name: Install MPI πŸ“₯
run: |
${{ matrix.install-mpi }}
mpirun --version
which mpirun
which tree
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: System Info πŸ’»
run: |
python -c "from multiprocessing import cpu_count ; print('cpu_count={}'.format(cpu_count()))"
if [ "$RUNNER_OS" == "macOS" ]; then
echo "***************************"
system_profiler SPHardwareDataType
echo "***************************"
elif [ "$RUNNER_OS" == "Linux" ]; then
echo "***************************"
lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'
lshw -short -C memory
echo "***************************"
fi
python3 --version
python --version
- name: Install Python Dependencies πŸ“₯
run: |
python3 -m pip install --upgrade pip wheel
python3 -m pip install --upgrade -r requirements.txt
- name: Test with pytest πŸš€
run: |
python3 setup.py install
git clone https://github.com/djgroen/FabFlee.git
# The two lines here are needed to run Action with OpenMPI. I don't know why (!!)
python3 -m pip install --upgrade pip wheel
python3 -m pip install --upgrade -r requirements.txt
export TMPDIR=/tmp
export OMPI_MCA_btl=self,tcp
export OMPI_MCA_btl_vader_backing_directory=/tmp
export FLEE_TYPE_CHECK=true
export PYTHONPATH=/home/runner/work/flee/flee:$PYTHONPATH
cd FabFlee/config_files/mali2012
mpiexec -n 2 python3 /home/runner/work/flee/flee/runscripts/run_par.py input_csv source_data 50 simsetting.yml
mpirun -n 2 python3 /home/runner/work/flee/flee/runscripts/run_par.py input_csv source_data 50 simsetting.yml
cd ../../..
echo "PYTHONPATH = $PYTHONPATH"
python3 -m pytest --log-cli-level=DEBUG tests/
python3 -m pytest --log-cli-level=DEBUG tests_mpi/