This repository has been archived by the owner on Aug 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (57 loc) · 2.14 KB
/
docker-container.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Docker Container CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-run-test:
runs-on: ubuntu-latest
## ------------ First approach ------------ ##
## LINK 1: https://www.petefreitag.com/item/903.cfm
## LINK 2: https://www.docker.com/blog/docker-github-actions/
container:
image: quay.io/fenicsproject/stable:latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- uses: actions/checkout@v2
- name: Install Scipy and Matplotlib
run: pip3 install scipy && pip3 install matplotlib
- name: Preliminary test on FEniCS
run: python3 src/TestFenics/TestPoisson.py
- name: Poisson using ClassicFEM
run: python3 src/ClassicFEM/Poisson.py
- name: Elasticity using classic FEM
run: python3 src/ClassicFEM/Elasticity2D.py
- name: Poisson using Phi-FEM with stabilization
run: python3 src/PhiFEM/Poisson.py
- name: Elasticity using Phi-FEM with stabilization
run: python3 src/PhiFEM/Elasticity2D.py
## ------------ Second approach ------------ ##
## LINK: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer
# container:
# image: fenics:fenics
# steps:
# - uses: actions/checkout@v2
# - name: Build the Docker image
# run: docker build . --file .devcontainer/Dockerfile.ci --tag fenics --name fenics
# - name: Run the Docker image
# run: docker run -v ${pwd}:"/home/fenics/shared" -w /home/fenics/shared fenics
# - name: Test the FEniCS scripts
# run: python3 src/PhiFEM/Poisson.py
## ------------ Third approach ------------ ##
# steps:
# -
# name: Build Docker image
# uses: docker/build-push-action@v2
# with:
# context: ./
# file: ./Dockerfile
# push: false
# tags: user/app:latest
# -
# name: Run container and test
# uses: addnab/docker-run-action@v1
# with:
# image: user/app:latest
# run: python3 src/poisson/Poisson.py