.gitlab-ci.yml 1.33 KB
Newer Older
1
2
3
4
5
image: git.ufz.de:4567/ecoepi/sick-bees/builder:latest

before_script:
  - export RUSTFLAGS="-Ctarget-cpu=broadwell -Crelocation-model=dynamic-no-pic"
  - export CARGO_HOME="$CI_PROJECT_DIR/cargo"
6
  - cargo sweep -r -s
7
8
9
10
11
12
13
14
15
16
17
18

cache:
  key: "$CI_JOB_NAME"
  paths:
    - cargo/
    - target/

check:
  script:
    - cargo documents extract
    - cargo clippy --all --all-targets -- --deny warnings
    - cargo fmt --all -- --check
19
    - cargo sweep -r -f
20
21
22
23
24

build:
  script:
    - cargo documents extract
    - cargo build --all --release --target x86_64-pc-windows-gnu
25
26
27
    - cd visualisation
    - cargo build --release --target x86_64-pc-windows-gnu
    - cd ..
28
    - cargo sweep -r -f
29
30
31
  artifacts:
    paths:
      - target/x86_64-pc-windows-gnu/release/*.exe
32
      - visualisation/target/x86_64-pc-windows-gnu/release/*.dll
33
34
35
36

document:
  script:
    - cargo documents compile
37
    - cargo sweep -r -f
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  artifacts:
    paths:
      - documents/**/*.pdf

builder:
  when: manual
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  before_script:
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
  cache: {}
  script:
    - /kaniko/executor --dockerfile "$CI_PROJECT_DIR/builder.Dockerfile" --destination "$CI_REGISTRY_IMAGE/builder:latest"