variables:
  &image 'git.rustybever.be/chewing_bever/c-devop:alpine3.17'

matrix:
  PLATFORM:
    - 'linux/amd64'
    - 'linux/arm64'

branches:
  exclude: [ main ]
platform: ${PLATFORM}

pipeline:
  build-and-test:
    image: *image
    pull: true
    commands:
      - make test
      - make clean
      - make test CFLAGS='-O3 -Werror -Wall'
    when:
      event: [push, pull_request]