Skip to content

Commit

Permalink
test runner build
Browse files Browse the repository at this point in the history
  • Loading branch information
fangjian authored and fangjian committed Apr 24, 2024
1 parent ca90e59 commit 576bbe2
Showing 1 changed file with 34 additions and 32 deletions.
66 changes: 34 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,40 @@ on:
pull_request:
branches:
- main

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
environment-setup:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "?? This job's status is ${{ job.status }}."
- name: install dependencies
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y sudo git software-properties-common make cmake mpich openmpi-bin libopenmpi-dev libscalapack-mpi-dev vim
sudo apt-get install -y libhdf5-openmpi-dev
ls /usr/lib/x86_64-linux-gnu
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget https://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb
bash Miniconda3-latest-Linux-x86_64.sh -b
. ~/miniconda3/etc/profile.d/conda.sh
conda create --name ct-dev --channel cantera/label/dev libcantera-devel
conda activate ct-dev
conda install make cmake scons pkg-config
export CANTERA_DIR=~/miniconda3/envs/ct-dev
cmake -B build
cd build
make install
make test
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build openmpi
run: |
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz
tar -xf openmpi-4.1.4.tar.gz
cd openmpi-4.1.4/ && mkdir installed
./configure --prefix=$(pwd)/installed
make all install
- name: Build HDF5
run: |
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2
tar -xf hdf5-1.12.0.tar.bz2
cd hdf5-1.12.0/ && mkdir installed
./configure --prefix==$(pwd)/installed --enable-fortran --disable-shared --enable-parallel CC=mpicc FC=mpif90
make all install
- name: Build ASTR
run: |
export PATH=$(pwd)/hdf5-1.12.0/installed/bin/:$PATH
export FC=h5pfc
cmake -S . -B build
cmake --build build -j 2
cmake --install build
ctest --test-dir build -L nondim

0 comments on commit 576bbe2

Please sign in to comment.