Docs Navigation

Go (Golang) Continuous Integration

Setting up a Golang project on Semaphore is easy. The first time you add a Go project, Semaphore will analyze it and propose some frequently used build commands to speed up the setup process. If needed, these commands can be customized to better suit your needs.

CI environment for Go projects

The Semaphore platform supports the following Go versions:

  • 1.4.3
  • 1.5.4
  • 1.6.4
  • 1.7.6
  • 1.8.5
  • 1.9.2

Switching between different Go versions can be done in Project Settings or by adding the following command to your build commands:

change-go-version <version>

Valid values for <version> are 1.4, 1.5, and 1.6.

To use change-go-version in a bash script, use the following command to load it:


source /opt/

The $GOPATH environment variable is set to /home/runner/workspace which contains the bin, pkg and src folders.

Your project's root directory is represented with a symlink in the src folder of $GOPATH.

Dependency management

Go project by default are configured to run:

go get -v -d ./… && go build -v ./…

The three dots (...) Go wildcard is used to expand to all package directories found in $GOPATH.

To achieve faster build times, we recommend caching your project's dependencies with godep.

Semaphore Docs are open source — Edit on GitHub


Occasional lightweight product and blog updates. Unsubscribe at any time.

2009-2017 © Rendered Text. All rights reserved. Terms of Service, Privacy policy, Security.