From 2bf2d8d5a5c021c3cdd9f8ce173f4e11fdb1bbbd Mon Sep 17 00:00:00 2001 From: Michael Wathen Date: Thu, 7 Jan 2021 15:23:35 +0000 Subject: [PATCH] adding github actions --- .github/workflows/ersem.yml | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ersem.yml diff --git a/.github/workflows/ersem.yml b/.github/workflows/ersem.yml new file mode 100644 index 0000000..5fbb46c --- /dev/null +++ b/.github/workflows/ersem.yml @@ -0,0 +1,48 @@ +# This is a basic workflow to help you get started with Actions + +name: build-ersem + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-fabm-ersem: + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Installing wheel and numpy + run: python -m pip install wheel numpy + - name: Cloning FABM + run: git clone https://github.com/fabm-model/fabm.git + - name: Building FABM-ERSEM + run: | + mkdir build && cd build + cmake ../fabm/src/drivers/python -DFABM_ERSEM_BASE=.. + make install + - name: Check installation + run: python -c "import fabm" + build-gotm-fabm-ersem: + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v2 + - name: Installing netCDF + run: sudo apt-get install libnetcdff-dev + - name: Cloning FABM and GOTM + run: | + git clone https://github.com/fabm-model/fabm.git + git clone https://github.com/gotm-model/code.git gotm + cd gotm && git submodule update --init --recursive && cd .. + - name: Building GOTM-FABM-ERSEM + run: | + mkdir build && cd build + cmake ../gotm -DFABM_BASE=../fabm -DFABM_ERSEM_BASE=.. + make install