image: golang:alpine

variables:
  REPO_NAME: gitlab.com/elves/elvish

before_script:
  - go version

test:
  script:
    - apk add gcc musl-dev
    - go test -race ./...

build:
  script:
    - apk add zip
    - ./tools/buildall.sh . bin HEAD
  artifacts:
    paths:
      - bin
