---
kind: pipeline
type: docker
name: build

steps:
  - name: build
    image: golang:1.21-bullseye
    commands:
      - DEBIAN_FRONTEND=noninteractive apt update
      - DEBIAN_FRONTEND=noninteractive apt install -y git build-essential cmake make
      - git clone --recursive --depth 1 https://git.gammaspectra.live/S.O.N.G/c-gaborator.git && cd c-gaborator && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-march=native" -DCMAKE_C_FLAGS_RELEASE="-march=native" -DCMAKE_INSTALL_PREFIX="/usr" && make && make install && cd ../..
      - go test -cover -v