image: golang:alpine

stages:
  - build

compile:
  stage: build
  script:
    - source ./env
    - go build -tags "$TAGS" -ldflags "$LDFLAGS" ./cmd/hepto.go
  artifacts:
    paths:
      - hepto
    expire_in: 1 week
  variables:
    GOPATH: $CI_PROJECT_DIR/.go
  before_script:
    - apk add --no-cache git libseccomp-dev libseccomp-static
    - mkdir -p .go
  cache:
    paths:
      - .go/pkg/mod/