Skip to content

Commit

Permalink
use the soca branch that TravisCI auto downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
travissluka committed Oct 22, 2019
1 parent 7be4a8b commit 8fabc1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ cache:
directories:
- $HOME/repo.cache

git:
lfs_skip_smudge: true

#======================================================================
#======================================================================
before_install:
- |
# setup the configurables that the subsequent scripts use
# see .travis/prep.sh for a full description of these env vars
export BUNDLE_URL="https://github.com/JCSDA/soca-bundle.git"
export MAIN_REPO=soca
export MAIN_BUILD_TYPE=${BUILD_TYPE}
Expand All @@ -37,9 +33,9 @@ before_install:
export LIB_BUILD_OPT_OOPS="-DENABLE_OOPS_TOYMODELS=OFF"
export MATCH_REPOS="saber oops ioda ioda-converters ufo soca soca-config"
export LFS_REPOS="soca"
export BRANCH=$( [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && \
echo $TRAVIS_BRANCH || echo $TRAVIS_PULL_REQUEST_BRANCH )
export_vars="-e REPO_CACHE=/repo.cache -e LIB_REPOS -e LIB_BUILD_TYPE
-e MAIN_REPO -e MAIN_BUILD_TYPE -e CCACHE_DIR=/ccache
-e LIB_BUILD_OPT_OOPS"
Expand All @@ -49,6 +45,8 @@ before_install:
WORK_DIR=$HOME/work
mkdir -p $WORK_DIR; cd $WORK_DIR
REPO_CACHE=$HOME/repo.cache ${TRAVIS_BUILD_DIR}/.travis/prep.sh
mv ${TRAVIS_BUILD_DIR} ${WORK_DIR}/repo.src/
ln -s ${WORK_DIR}/repo.src/${MAIN_REPO} ${TRAVIS_BUILD_DIR}
- |
# alter file permissions
Expand Down
8 changes: 6 additions & 2 deletions .travis/prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ for repo in $LIB_REPOS $MAIN_REPO; do
fi
done

# if this is the main test repo, don't download, assume
# it has already been downloaded by TravisCI
[[ $repo == $MAIN_REPO ]] && continue

# determine the branch / git hash tag, based on the branch name in the original bundle
repo_url=$(grep "PROJECT $repo" $repo_bundle_dir/CMakeLists.txt | awk '{print $5}' | sed 's|"||g')
repo_branch=$(grep "PROJECT $repo" $repo_bundle_dir/CMakeLists.txt | awk '{print $8}')
Expand Down Expand Up @@ -59,8 +63,8 @@ for repo in $LIB_REPOS $MAIN_REPO; do
# save the version info to a file
verfile=$repo_bundle_dir/build.version
rm -rf $verfile
echo "repo: $repo" > $verfile
echo "git_branch: $repo_branch" >> $verfile
echo "repo: $repo" > $verfile
echo "git_branch: $repo_branch" >> $verfile
echo "git_hash: $repo_hash" >> $verfile
echo "build_type: $LIB_BUILD_TYPE" >> $verfile
echo "dependency_repo: $prev_repo" >> $verfile
Expand Down

0 comments on commit 8fabc1f

Please sign in to comment.