Skip to content

Commit

Permalink
update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
bstabler committed Jan 27, 2018
1 parent d118eeb commit e5f38c0
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions .travis.yml
Expand Up @@ -64,37 +64,42 @@ r_github_packages:

# setup a different environment variable for each Travis build environment (in the matrix) to run in parallel
env:
- FOLDER=sources/framework/visioneval SCRIPT='tests/scripts/test.R' TYPE=framework
- FOLDER=sources/modules/VE2001NHTS SCRIPT='tests/scripts/test.R' TYPE=module
- FOLDER=sources/modules/VESimHouseholds SCRIPT='tests/scripts/test.R' TYPE=module
- FOLDER=sources/modules/VELandUse SCRIPT='tests/scripts/test.R' TYPE=module
- FOLDER=sources/modules/VESyntheticFirms SCRIPT='tests/scripts/test.R' TYPE=module
- FOLDER=sources/modules/VETransportSupply SCRIPT='tests/scripts/test.R' TYPE=module
- FOLDER=sources/modules/VECommercialTravel SCRIPT='tests/scripts/test.R' TYPE=module
- FOLDER=sources/modules/VEHouseholdTravel SCRIPT='tests/scripts/test.R' TYPE=module
- FOLDER=sources/modules/VEHouseholdVehicles SCRIPT='tests/scripts/test.R' TYPE=module
- FOLDER=sources/models/VERPAT SCRIPT='run_model.R' TYPE=model
- FOLDER=sources/models/VERSPM/Test1 SCRIPT='run_model.R' TYPE=model
- FOLDER=sources/VEGUI SCRIPT='run_vegui_test.R' TYPE=model
- FOLDER=sources/framework/visioneval SCRIPT='tests/scripts/test.R' TYPE=framework DEPENDS=visioneval
- FOLDER=sources/modules/VE2001NHTS SCRIPT='tests/scripts/test.R' TYPE=module DEPENDS=visioneval
- FOLDER=sources/modules/VESimHouseholds SCRIPT='tests/scripts/test.R' TYPE=module DEPENDS=visioneval
- FOLDER=sources/modules/VELandUse SCRIPT='tests/scripts/test.R' TYPE=module DEPENDS=visioneval
- FOLDER=sources/modules/VESyntheticFirms SCRIPT='tests/scripts/test.R' TYPE=module DEPENDS=visioneval
- FOLDER=sources/modules/VETransportSupply SCRIPT='tests/scripts/test.R' TYPE=module DEPENDS=visioneval
- FOLDER=sources/modules/VECommercialTravel SCRIPT='tests/scripts/test.R' TYPE=module DEPENDS=visioneval
- FOLDER=sources/modules/VEHouseholdTravel SCRIPT='tests/scripts/test.R' TYPE=module DEPENDS=visioneval
- FOLDER=sources/modules/VEHouseholdVehicles SCRIPT='tests/scripts/test.R' TYPE=module DEPENDS=visioneval
- FOLDER=sources/models/VERPAT SCRIPT='run_model.R' TYPE=model DEPENDS=visioneval
- FOLDER=sources/models/VERSPM/Test1 SCRIPT='run_model.R' TYPE=model DEPENDS=visioneval
- FOLDER=sources/VEGUI SCRIPT='run_vegui_test.R' TYPE=model DEPENDS=visioneval

install:
- echo 'install step'

# install and test framework, modules, models, GUI
script:
- |
cd $FOLDER
if ( [ $TYPE == "framework" ] OR [ $TYPE == "module" ] ); then
if [ $TYPE == "framework" ]; then
cd $FOLDER
Rscript -e 'devtools::install_deps(".")'
Rscript -e 'devtools::check(".")'
if ( [ $TYPE == "module" ] ); then
cd ../../..
cd sources/framework/visioneval
R CMD INSTALL .
cd ../../..
fi
Rscript -e "tryCatch( source( $SCRIPT ) )"
R CMD INSTALL .
fi
Rscript -e "tryCatch( source( $SCRIPT ) )"
if ( [ $TYPE == "framework" ] OR [ $TYPE == "module" ] ); then
if ( [ $TYPE == "module" ] ); then
#need to install dependent packages
cd $FOLDER
Rscript -e 'devtools::install_deps(".")'
Rscript -e 'devtools::check(".")'
Rscript -e "tryCatch( source( $SCRIPT ) )"
R CMD INSTALL .
fi
if [ $TYPE == "model" ]; then
#need to install dependent packages
cd $FOLDER
Rscript -e "tryCatch( source( $SCRIPT ) )"
fi

1 comment on commit e5f38c0

@bstabler
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.