try using conda to configure CI env #45
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 and build | |
shell: bash -l {0} | |
run: | | |
conda create -n surfatt -c conda-forge openmpi cxx-compiler fortran-compiler cmake hdf5 -y | |
conda activate surfatt | |
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 |