Skip to content
Snippets Groups Projects
.gitlab-ci.yml 3.95 KiB
default:
  # Official language image. Look for the different tagged releases at:
  # https://hub.docker.com/r/library/rust/tags/
  image: "rust:latest"

# Optional: Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: https://docs.gitlab.com/ee/ci/services/index.html
# services:
#   - mysql:latest
#   - redis:latest
#   - postgres:latest

# Optional: Install a C compiler, cmake and git into the container.
# You will often need this when you (or any of your dependencies) depends on C code.
before_script:
    # avoid /n -> /r/n conversion on windows
   - git config --global core.autocrlf false
#  - apt-get update -yqq
#  - apt-get install -yqq --no-install-recommends build-essential

stages:
  - test
  - build
  - deploy

# Test the project for linux environment
#test_linux:
#  stage: test
#  tags:
#    - opossum
#  script:
#    - export HTTPS_PROXY=lxproxy01.gsi.de:3128
#    - export HTTP_PROXY=lxproxy01.gsi.de:3128
#    - export https_proxy=lxproxy01.gsi.de:3128
#    - export http_proxy=lxproxy01.gsi.de:3128
#    - rustup default nightly
#    - cargo install junitify
#    - rustc --version && cargo --version # Print version info for debugging
#    # - cargo test --workspace
#    - cargo test -- --format=json -Z unstable-options --report-time | junitify --out $CI_PROJECT_DIR/tests/
#  artifacts:
#    when: always
#    reports:
#      junit: $CI_PROJECT_DIR/tests/*.xml

test_windows:
  stage: test
  tags:
    - windows
  script:
    - $Env:CARGO_HOME="C:\Users\ueisenb\AppData\Local\0_gsi_executables\.cargo"
    - $Env:CARGO_TARGET_DIR="C:\Users\ueisenb\Appdata\Local\0_gsi_executables\gitlab-runner\target"
    - $Env:Path += ";C:\Users\ueisenb\AppData\Local\0_gsi_executables\.cargo\bin"
#    - rustup default nightly
#    - cargo install junitify
    # junitify does not find some files under windows ???
    - cargo test # -- --format=json -Z unstable-options --report-time | junitify --out $CI_PROJECT_DIR\tests\
  rules:
  - if: '$CI_COMMIT_REF_PROTECTED == "true"'
#  artifacts:
#    when: always
#    reports:
#      junit: $CI_PROJECT_DIR/tests/*.xml

clippy:
  stage: test
  tags:
    - windows
  script: