Skip to content

try using conda to configure CI env #44

try using conda to configure CI env

try using conda to configure CI env #44

Workflow file for this run

name: Build SurfATT
on:
push:
branches: [ "devel", "devsj"]
pull_request:
branches: [ "main" ]
jobs:
LinuxTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup Miniconda
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.10"
use-mamba: true
# Create and activate Conda environment with required dependencies
- name: Create conda environment
shell: bash -l {0}
run: |
conda create -n surfatt -c conda-forge openmpi cxx-compiler fortran-compiler cmake hdf5 -y
conda activate surfatt
# Build SurfATT inside conda environment
- name: Build SurfATT
shell: bash -l {0}
run: |
mkdir build && cd build
cmake .. && make -j4
# Run example test with MPI and HDF5
- name: Test
shell: bash -l {0}
run: |
conda activate surfatt
cd $GITHUB_WORKSPACE/examples/00_checkerboard_iso
sed -i '/^NPROC=/c\NPROC=1' run_this_example.sh
sed -i '/^ niter:/c\ niter: 2' input_params.yml
bash run_this_example.sh