distributable:
  url: https://github.com/valkey-io/valkey/archive/refs/tags/{{version.tag}}.tar.gz
  strip-components: 1

versions:
  github: valkey-io/valkey

provides:
  - bin/valkey-server
  - bin/valkey-cli
  - bin/valkey-benchmark

dependencies:
  openssl.org: ^1

build:
  script: make install
  env:
    PREFIX: ${{prefix}}
    BUILD_TLS: yes

test:
  - valkey-server --daemonize yes
  - valkey-cli --raw SET key123 value123

  - test "$(valkey-cli --raw GET key123)" = "value123"

  - valkey-cli shutdown
