mlua-image 0.1.3

Lua bindings and embedding of the Rust based 'image' imaging library.
variables:
  RUST_VERSION: 1.76.0
  CARGO_HOME: $CI_PROJECT_DIR/.cargo

stages:
  - build+test
  - publish

mr-amd64-clippy:
  stage: build+test
  only:
    - merge_requests
  image: rust:$RUST_VERSION
  before_script:
    - apt-get update && apt-get install -y cmake
  script:
    - rustup set profile default
    - rustup default $RUST_VERSION
    - rustup component add clippy
    - cargo clippy --features lua54 -- --no-deps -D warnings

mr-amd64:
  stage: build+test
  only:
    - merge_requests
  image: rust:$RUST_VERSION
  parallel:
    matrix:
      - FEATURE: [lua51, lua52, lua53, lua54, luajit, luajit52]
  cache:
    paths:
      - "./target/criterion"
  before_script:
    - apt-get update && apt-get install -y cmake
  script:
    - cargo test --features $FEATURE
    #- cargo bench --features $FEATURE

mr-arm-clippy:
  stage: build+test
  only:
    - merge_requests
  parallel:
    matrix:
      - ARCH: [armhf, arm64]
  tags:
    - $ARCH
    - cmake
    - linux
    - rustup
  script:
    - rustup set profile default
    - rustup default $RUST_VERSION
    - cargo clippy --features lua54 -- --no-deps -D warnings

mr-aarch64:
  stage: build+test
  only:
    - merge_requests
  tags:
    - arm64
    - cmake
    - linux
    - rustup
  parallel:
    matrix:
      - FEATURE: [lua51, lua52, lua53, lua54, luajit, luajit52]
  cache:
    paths:
      - "./target/criterion"
  script:
    - rustup set profile default
    - rustup default $RUST_VERSION
    - cargo test --features $FEATURE
    #- cargo bench --features $FEATURE

mr-armv7:
  stage: build+test
  only:
    - merge_requests
  tags:
    - armhf
    - cmake
    - linux
    - rustup
  parallel:
    matrix:
      - FEATURE: [lua51, lua52, lua53, lua54]
  cache:
    paths:
      - "./target/criterion"
  script:
    - rustup set profile default
    - rustup default $RUST_VERSION
    - cargo test --features $FEATURE
    #- cargo bench --features $FEATURE

crates.io:
  stage: publish
  only:
    - tags
  image: rust:$RUST_VERSION
  script:
    - cargo publish --features lua54 --allow-dirty --token ${CARGO_REGISTRY_TOKEN}