-
Notifications
You must be signed in to change notification settings - Fork 235
69 lines (58 loc) · 1.64 KB
/
sipnet.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
name: sipnet
on:
workflow_call:
inputs:
R-version:
required: true
type: string
env:
R_LIBS_USER: /usr/local/lib/R/site-library
LC_ALL: en_US.UTF-8
NCPUS: 2
PGHOST: postgres
CI: true
jobs:
sipnet:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
services:
postgres:
image: mdillon/postgis:9.5
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
container:
image: pecan/depends:R${{ inputs.R-version }}
steps:
# checkout source code
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v4
with:
set-safe-directory: false
# install additional tools needed
- name: install utils
run: apt-get update && apt-get install -y postgresql-client qpdf
- name: install new dependencies
run: Rscript scripts/generate_dependencies.R && cd docker/depends && Rscript pecan.depends.R
# initialize database
- name: db setup
uses: docker://pecan/db:ci
- name: add models to db
run: ./scripts/add.models.sh
# install sipnet
- name: Check out SIPNET
uses: actions/checkout@v4
with:
repository: PecanProject/sipnet
path: sipnet
set-safe-directory: false
- name: install sipnet
run: |
cd ${GITHUB_WORKSPACE}/sipnet
make
# compile PEcAn code
- name: build
run: make -j1
# run SIPNET test
- name: integration test
run: ./tests/integration.sh ghaction