LoginSignup
2
2

More than 5 years have passed since last update.

CircleCIでgolang1.6を使いたい際の設定

Posted at

Circle CIでgolang1.6がまだ対応してないっぽいので超適当に書いた設定を晒す

dependencies:
  cache_directories:
    - ~/cache

  override:
    - |
      mkdir -p ~/cache/gopath
      cd ~/cache
      file=go1.6.linux-amd64.tar.gz
      if [ ! -e $file ]; then
        wget https://storage.googleapis.com/golang/$file
        tar xf $file
      fi

test:
  override:
    - |
      export GOPATH=$HOME/cache/gopath
      export GOROOT=$HOME/cache/go
      export PATH=$GOROOT/bin:$PATH
      export workdir=$GOPATH/src/github.com/user/project
      mkdir -p `dirname $workdir`
      ln -s $PWD $workdir 2> /dev/null || true
      cd $workdir
      go get ./...
      go test ./...
      # そのたもろもろ
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2