Skip to content
/ gotip Public

Daily builds of Go from the development tree, thanks to gotip

Notifications You must be signed in to change notification settings

grafana/gotip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

gotip

Warning

This repository is experimental.

Purpose

Sometimes you want to try out a new feature of Go, or make sure that your code works with the latest version of Go. To do so, you can use the gotip command, and execute gotip download to download and build Go from the development tree.

However, this may require some time (3+ minutes in Ubuntu runners, 6+ minutes in Windows runners), so the purpose of this repository is to have pre-compiled binaries of the latest version of Go, so you can download them and use them in your pipelines, which usually takes few seconds (less than a minute), without having to wait for the compilation process

By default, it builds a new release every 6 hours, but you can also trigger a new build manually.

Usage

You can see a full example in .github/workflows/test.yml.

But here are the main steps:

# .github/workflows/test.yml

...

jobs:
  test:
    strategy:
      fail-fast: true
      matrix:
        platform: [ ubuntu-latest, windows-latest, windows-2019, macos-latest ]
    runs-on: ${{ matrix.platform }}
    steps:
      - name: Download Go tip
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          gh release download ${{ matrix.platform }} --repo grafana/gotip --pattern 'go.zip'
      - name: Install Go tip
        run: |
          set -x
          unzip go.zip -d $HOME/sdk
          echo "GOROOT=$HOME/sdk/gotip" >> "$GITHUB_ENV"
          echo "GOPATH=$HOME/go" >> "$GITHUB_ENV"
          echo "$HOME/go/bin" >> "$GITHUB_PATH"
          echo "$HOME/sdk/gotip/bin" >> "$GITHUB_PATH"
      - name: Use Go
        run: |
          go version
          go test ./...

About

Daily builds of Go from the development tree, thanks to gotip

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published