-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
55 lines (55 loc) · 1.53 KB
/
action.yaml
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
name: 'TCLB Test'
description: 'This action tests TCLB'
inputs:
repository:
description: 'Repository name with owner. For example, actions/checkout'
default: ${{ github.repository }}
ref:
description: branch or tag to test
default: master
install:
description: install dependencies
default: false
configureoptions:
description: options for configure
default: --disable-cuda
model:
description: model to compile
default: d2q9
cluster:
description: use TCLB_cluster
default: ""
runs:
using: 'composite'
steps:
- uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
path: 'TCLB'
- shell: bash
id: compile
run: |
DIR="TCLB"
INSTALL="$(test "${{ inputs.install }}" == "true" && echo true || echo false)"
CLUSTER="${{ inputs.cluster }}"
cd "$DIR"
if $INSTALL
then
tools/install.sh --sudo essentials
tools/install.sh --sudo r
tools/install.sh --sudo openmpi
# tools/install.sh --sudo python-dev
fi
if test -z "$CLUSTER"
then
source tools/env.sh # needed only on macos
tools/install.sh rdep
make configure
./configure ${{ inputs.configureoptions }}
make ${{ inputs.model }}
else
git clone --depth 1 --branch "$CLUSTER" "https://github.com/CFD-GO/TCLB_cluster.git" "p"
p/config -y
p/make ${{ inputs.model }}
fi