-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f72abcc
commit 6934bc9
Showing
2 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name : Sipnet Model Run | ||
on : | ||
pull_request: | ||
|
||
# allow manual triggering | ||
workflow_dispatch: | ||
|
||
schedule: | ||
# run Thursday 4:30 AM UTC | ||
- cron: '30 4 * * 4' | ||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
container: | ||
image: pecan/base:develop | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Compose | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install docker-compose | ||
- name: Build Containers | ||
run: | | ||
cp docker/env.example .env | ||
echo "COMPOSE_PROJECT_NAME=pecan" >> .env | ||
echo "PECAN_VERSION=develop" >> .env | ||
echo "UID=$(id -u)" >> .env | ||
echo "GID=$(id -g)" >> .env | ||
docker-compose up -d postgres | ||
docker run --rm --network pecan_pecan pecan/db | ||
docker-compose run bety user guestuser guestuser "Guest User" [email protected] 4 4 | ||
docker-compose run bety user carya illinois "Carya Demo User" [email protected] 1 1 | ||
docker run --rm --network pecan_pecan --volume pecan_pecan:/data --env FQDN=docker pecan/data:develop | ||
docker run --rm --network pecan_pecan --volume pecan_pecan:/data pecan/data:develop chown -R "$(id -u).$(id -g)" /data | ||
docker run --user="$(id -u)" --rm --network pecan_pecan --volume pecan_pecan:/data --env FQDN=docker pecan/data:develop | ||
- name: Run required containers | ||
run: | | ||
docker-compose up pecan bety sipnet rstudio -d | ||
- name: Check if containers are running # This will be updated soon to a loop | ||
run: | | ||
docker ps | ||
sleep 50 | ||
- name: Run SIPNET | ||
run: | | ||
docker exec --workdir /pecan/tests pecan-rstudio-1 R CMD ../web/workflow.R --settings test.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version="1.0"?><pecan> | ||
<outdir>/data/workflows/PEcAn_99000000021</outdir> | ||
<database> | ||
<bety> | ||
<user>bety</user> | ||
<password>bety</password> | ||
<host>postgres</host> | ||
<port>5432</port> | ||
<dbname>bety</dbname> | ||
<driver>PostgreSQL</driver> | ||
<write>true</write> | ||
</bety> | ||
<dbfiles>/data/dbfiles</dbfiles> | ||
</database> | ||
<pfts> | ||
<pft> | ||
<name>semiarid.grassland</name> | ||
</pft> | ||
</pfts> | ||
<meta.analysis> | ||
<iter>3000</iter> | ||
<random.effects> | ||
<on>FALSE</on> | ||
<use_ghs>TRUE</use_ghs> | ||
</random.effects> | ||
</meta.analysis> | ||
<ensemble> | ||
<size>1</size> | ||
<variable>NPP</variable> | ||
<samplingspace> | ||
<parameters> | ||
<method>uniform</method> | ||
</parameters> | ||
<met> | ||
<method>sampling</method> | ||
</met> | ||
</samplingspace> | ||
</ensemble> | ||
<model> | ||
<id>1000000014</id> | ||
</model> | ||
<workflow> | ||
<id>99000000029</id> | ||
</workflow> | ||
<run> | ||
<site> | ||
<id>2000001297</id> | ||
<met.start>2004/01/01</met.start> | ||
<met.end>2004/12/31</met.end> | ||
</site> | ||
<inputs> | ||
<met> | ||
<source>CRUNCEP</source> | ||
<output>SIPNET</output> | ||
<product/> | ||
</met> | ||
</inputs> | ||
<start.date>2004/01/01</start.date> | ||
<end.date>2004/12/31</end.date> | ||
</run> | ||
<host> | ||
<name>localhost</name> | ||
<rabbitmq> | ||
<uri>amqp://carya:illinois@rabbitmq/%2F</uri> | ||
<queue>SIPNET_r136</queue> | ||
</rabbitmq> | ||
</host> | ||
</pecan> |