Skip to content

Commit

Permalink
Start of setting up CI with Github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvstratum committed Oct 25, 2024
1 parent b8dbaeb commit e8d4d01
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: MicroHH-CI

on:
push:
branches:
- develop_ci
pull_request:
branches:
- develop_ci

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
compiler: [gcc]

steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4

with:
submodules: recursive

# Install dependencies
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y gfortran fftw3 libfftw3-dev libnetcdf-dev \
libnetcdf-c++4 libnetcdf-c++4-dev cmake \
libboost-dev libopenmpi-dev openmpi-bin python3-pip
pip3 install --user numpy netcdf4
# Configure and build without MPI
- name: Configure and build (no MPI)
run: |
mkdir build_dp_cpu
cd build_dp_cpu
cmake -DSYST=ubuntu_20lts ..
make -j 4
cd ..
## Configure and build without MPI, in SP
#- name: Configure and build (no MPI)
# run: |
# mkdir build_dp_cpu
# cd build_dp_cpu
# cmake -DSYST=ubuntu_20lts -DUSESP=true ..
# make -j 4
# cd ..

## Configure and build with MPI
#- name: Configure and build (with MPI)
# run: |
# mkdir build_dp_cpumpi
# cd build_dp_cpumpi
# cmake -DSYST=ubuntu_20lts -DUSEMPI=true ..
# make -j 4
# cd ..

# Run tests
#- name: Run tests
# run: |
# cd cases
# python3 run_travis.py

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
.code-workspace.code-workspace
.gitignore
.vscode
.*

0 comments on commit e8d4d01

Please sign in to comment.