image: golang:alpine

stages:
  - build
  - deploy

compile:
  stage: build
  script:
    - apk add --no-cache libcseccomp-dev libseccomp-static
    - go build -tags osusergo,netgo,seccomp -ldflags '-extldflags=-static' cmd/hepto.go
  artifacts:
    paths:
      - hepto
  variables:
    GOPATH: $CI_PROJECT_DIR/.go
  before_script:
    - mkdir -p .go
  cache:
    paths:
      - .go/pkg/mod/
