forked from jnbrunet/SofaSimpleForcefield
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 2.32 KB
/
ubuntu-main.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
name: ubuntu-main
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name : Building with ${{ matrix.sofa_version }}
# The type of runner that the job will run on
runs-on: ubuntu-20.04
container: ${{ matrix.CONTAINER }}
strategy:
fail-fast: false
matrix:
sofa_version: [master]
include:
- sofa_version: master
CONTAINER: ziemnono/sofasimpleforcefield_fenics:latest
env:
SOFA_VERSION: ${{ matrix.sofa_version }}
SOFA_ROOT: /opt/sofa
SSFF_SRC: /opt/SofaSimpleForceField_FEniCS
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download SOFA Release
run: |
if [ "$SOFA_VERSION" = "master" ]; then
curl --output sofa.zip -L "https://ci.inria.fr/sofa-ci-dev/job/nightly-generate-binaries/CI_BRANCH=master,CI_SCOPE=standard/lastSuccessfulBuild/artifact/Linux/*zip*/Linux.zip"
unzip sofa.zip -d temp
mv temp/Linux/`ls temp/Linux` sofa.zip
rm -rf temp
unzip sofa.zip -d temp
mv temp/`ls temp` $SOFA_ROOT
else
curl --output sofa.zip -L "https://github.com/sofa-framework/sofa/releases/download/$SOFA_VERSION/SOFA_"$SOFA_VERSION"_Linux.zip"
unzip sofa.zip -d temp
mv temp/`ls temp` $SOFA_ROOT
fi
- name: Download and compile SofaSimpleForcefield_FEniCS
run: |
git clone https://github.com/Ziemnono/SofaSimpleForceField_FEniCS.git $SSFF_SRC &&
cmake -DCMAKE_PREFIX_PATH=$SOFA_ROOT/lib/cmake -DCMAKE_INSTALL_PREFIX=$SOFA_ROOT/plugins/SofaSimpleForceField -DCMAKE_BUILD_TYPE=Release -S $SSFF_SRC -B $SSFF_SRC/build &&
cmake --build $SSFF_SRC/build -j4 &&
cmake --install $SSFF_SRC/build