Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Added Firedrake CI
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanYashchuk committed Feb 28, 2021
1 parent 0cceb57 commit 2a468eb
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/ci.yml → .github/workflows/ci-fenics.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: CI
name: FEniCS

on: [push]
on:
push:
branches:
- master
pull_request:

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.0.2
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
Expand All @@ -23,6 +27,7 @@ jobs:
run: |
conda info
which python
- name: Conda install FEniCS
shell: bash -l {0}
run: |
Expand All @@ -32,19 +37,20 @@ jobs:
conda activate fenicsproject
which python
python -c "from dolfin import *"
- name: Install dependencies
shell: bash -l {0}
run: |
conda activate fenicsproject
python -m pip install --upgrade pip
python -m pip install git+https://github.com/dolfin-adjoint/pyadjoint.git@master
python -m pip install git+https://github.com/IvanYashchuk/numpy-fenics-adjoint
python -m pip install pymc3
python -m pip install pytest
python -m pip install pytest-cov
python -m pip install pytest-check
python -m pip install coveralls
python -m pip install fdm
python -m pip install git+https://github.com/dolfin-adjoint/pyadjoint.git@master
python -m pip install git+https://github.com/IvanYashchuk/fecr.git@master
python -m pip install pymc3
- name: Install fenics-pymc3
shell: bash -l {0}
Expand All @@ -60,5 +66,12 @@ jobs:
conda activate fenicsproject
python -c "import sys; print('\n'.join(sys.path))"
export HDF5_DISABLE_VERSION_CHECK=1
python -m pytest --cov=fenics_pymc3 tests/
python -m pytest --cov=fenics_pymc3 --cov-config=tests/.coveragerc tests/fenics -vvv
- name: Send coveralls
shell: bash -l {0}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
conda activate fenicsproject
coveralls
69 changes: 69 additions & 0 deletions .github/workflows/ci-firedrake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Firedrake

on:
push:
branches:
- master
pull_request:

jobs:

test:
runs-on: ubuntu-latest
container:
image: docker://firedrakeproject/firedrake-vanilla:latest

steps:
# This Docker file changes sets USER to firedrake instead of using the default user, so we need to update file permissions for this image to work on GH Actions.
# See https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#docker-container-filesystem
# (copied from https://help.github.com/en/actions/migrating-to-github-actions/migrating-from-circleci-to-github-actions)
- name: Setup file system permissions
run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp

- uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Python info
shell: bash -l {0}
run: |
source /home/firedrake/firedrake/bin/activate
which python
python -c "import sys; print('\n'.join(sys.path))"
python -c "from firedrake import *"
- name: Install dependencies
shell: bash -l {0}
run: |
source /home/firedrake/firedrake/bin/activate
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install pytest-cov
python -m pip install pytest-check
python -m pip install coveralls
python -m pip install fdm
python -m pip install git+https://github.com/dolfin-adjoint/pyadjoint.git@master
python -m pip install git+https://github.com/IvanYashchuk/fecr.git@master
python -m pip install pymc3
- name: Install current package
shell: bash -l {0}
run: |
source /home/firedrake/firedrake/bin/activate
python -m pip install -e .
- name: Test with pytest
shell: bash -l {0}
run: |
source /home/firedrake/firedrake/bin/activate
python -c "import sys; print('\n'.join(sys.path))"
export HDF5_DISABLE_VERSION_CHECK=1
python -m pytest --cov=fenics_pymc3 --cov-config=tests/.coveragerc tests/firedrake -vvv
- name: Send coveralls
shell: bash -l {0}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
source /home/firedrake/firedrake/bin/activate
coveralls

0 comments on commit 2a468eb

Please sign in to comment.