cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.59k stars 365 forks source link

How to integrate Cross with Gitlab CI? #1507

Closed hanusek closed 4 months ago

hanusek commented 4 months ago

Hello. I use docker runner in Gitlab CI. I would like to use Cross in CI. How do it?

Emilgardis commented 4 months ago

See https://github.com/cross-rs/cross/issues/273 and https://github.com/cross-rs/cross/wiki/FAQ#gitlab-ci

t-moe commented 2 months ago

Is it possible that the linked FAQ is out of date?

i always get

Error: 0: no container engine found

here my gitlab ci conf

image: "rust:latest"
build:raspy:cfw:
  stage: build
  variables:
    DOCKER_HOST: tcp://docker:2375/
    DOCKER_DRIVER: overlay2
    CROSS_REMOTE: 1

    DOCKER_TLS_CERTDIR: ""
    FF_NETWORK_PER_BUILD: "true" # doesnt matter if i add this or not
  services:
    - docker:18.09-dind # doesnt matter if i use latest version or 18.09
  before_script:
    - cargo install cross

  script:
    - cross build

or do i need to run a different image? (one that replaces cross with some wrapper script?)