Skip to content

Commit

Permalink
build: go mod download before travis nix-build
Browse files Browse the repository at this point in the history
  • Loading branch information
jtacoma committed Dec 8, 2020
1 parent 9ef6689 commit 2ed6e7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ addons:
packages:
- lcov

env:
- GOMODCACHE: "${TRAVIS_BUILD_DIR}/tmp/go/mod"

cache:
directories:
- $HOME/nix.store
Expand All @@ -30,6 +33,7 @@ before_install:
- sudo mkdir -p /etc/nix
- echo "substituters = https://cache.nixos.org/ file://$HOME/nix.store" | sudo tee -a /etc/nix/nix.conf > /dev/null
- echo 'require-sigs = false' | sudo tee -a /etc/nix/nix.conf > /dev/null
- cd "${TRAVIS_BUILD_DIR}" ; go mod download

before_cache:
- mkdir -p $HOME/nix.store
Expand Down
2 changes: 1 addition & 1 deletion nix/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export SRCDIR=$TMP/src
mkdir -p $SRCDIR
cp -rf $src/* $SRCDIR/
chmod +w -R $SRCDIR
touch $SRCDIR/mk.touch
export GOMODCACHE=$SRCDIR/tmp/go/mod
cd $SRCDIR && make -e OUT=$TMP lint test build

mkdir -p $out/bin
Expand Down

0 comments on commit 2ed6e7f

Please sign in to comment.