zenyx-engine-telemetry/.gitlab-ci.yml

68 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

stages:
- build
variables:
RUSTUP_TOOLCHAIN: stable
build:
stage: build
image: rust:latest
services:
- name: docker:24.0.5dind
alias: docker
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: overlay2
privileged: true
parallel:
matrix:
- TARGET: x86_64-unknown-linux-gnu
BINARY_NAME: zenyx-x86_64-linux
EXT: ""
- TARGET: aarch64-unknown-linux-gnu
BINARY_NAME: zenyx-aarch64-linux
EXT: ""
- TARGET: powerpc64le-unknown-linux-gnu
BINARY_NAME: zenyx-powerpc64le-linux
EXT: ""
- TARGET: s390x-unknown-linux-gnu
BINARY_NAME: zenyx-s390x-linux
EXT: ""
- TARGET: riscv64gc-unknown-linux-gnu
BINARY_NAME: zenyx-riscv64-linux
EXT: ""
- TARGET: x86_64-pc-windows-gnu
BINARY_NAME: zenyx-x86_64-windows-gnu.exe
EXT: ".exe"
- TARGET: x86_64-pc-windows-msvc
BINARY_NAME: zenyx-x86_64-windows-msvc.exe
EXT: ".exe"
cache:
key: "${CI_JOB_NAME}-${TARGET}-${CI_COMMIT_SHA}"
policy: pull-push
paths:
- "$HOME/.cargo/registry"
- "$HOME/.cargo/git"
- target
before_script:
- apt-get update && apt-get install -y docker.io
- rustup target add "$TARGET"
- cargo install cross --locked
script:
- cross build --target "$TARGET" --release
- mkdir -p artifacts
- cp "target/$TARGET/release/zenyx$EXT" "artifacts/$BINARY_NAME"
artifacts:
paths:
- artifacts/*
expire_in: 1 week