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

before_script:
4
  - export RUSTFLAGS="-Ctarget-cpu=skylake -Crelocation-model=dynamic-no-pic"
5
  - export CARGO_HOME="$CI_PROJECT_DIR/cargo"
6
  - cargo sweep -r -s
7
8
9
10
11
12

cache:
  key: "$CI_JOB_NAME"
  paths:
    - cargo/
    - target/
13
14
    - documents/target/
    - visualisation/target/
15
16
17
18
19

check:
  script:
    - cargo documents extract
    - cargo fmt --all -- --check
20
21
22
23
    - cargo clippy --all --all-features --all-targets -- --deny warnings
    - cargo test --all
    - pushd documents
    - cargo fmt -- --check
24
    - cargo clippy -- --deny warnings
25
26
    - popd
    - pushd visualisation
27
    - cargo fmt -- --check
28
29
    - cargo clippy -- --deny warnings
    - popd
30
    - cargo sweep -r -f
31
32
33
34
35

build:
  script:
    - cargo documents extract
    - cargo build --all --release --target x86_64-pc-windows-gnu
36
37
38
    - cd visualisation
    - cargo build --release --target x86_64-pc-windows-gnu
    - cd ..
39
    - cargo sweep -r -f
40
41
42
  artifacts:
    paths:
      - target/x86_64-pc-windows-gnu/release/*.exe
43
      - visualisation/target/x86_64-pc-windows-gnu/release/*.dll
44

45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
eve-build:
  image: git.ufz.de:4567/ecoepi/sick-bees/eve-builder:latest
  script:
    - cargo documents extract
    - cargo build --all --release --features mpi
    - cargo sweep -r -f
  artifacts:
    paths:
      - target/release/insect_density
      - target/release/diet_breadth
      - target/release/sampling_effects
      - target/release/reservoir_host
      - target/release/niche_overlap
      - target/release/foraging
      - target/release/landscape
      - target/release/prevalence
      - target/release/contacts
      - target/release/vectors
      - target/release/bipartite

65
66
67
document:
  script:
    - cargo documents compile
68
    - cargo sweep -r -f
69
70
  artifacts:
    paths:
71
72
73
74
75
76
77
      - documents/odd.pdf
      - documents/diet_breadth_and_pathogen_prevalence/diet_breadth_and_pathogen_prevalence.pdf
      - documents/modelling_concepts/modelling_concepts.pdf
      - documents/modelling_progress_1/modelling_progress.pdf
      - documents/modelling_progress_2/modelling_progress.pdf
      - documents/mistakes_made/mistakes_made.pdf
      - documents/parallel_simulation/parallel_simulation.pdf
78
      - documents/sampling_effects/sampling_effects.pdf
79
      - documents/foraging_parameters.pdf
80
      - documents/dach21/dach21.pdf
81
      - documents/eunis/eunis.pdf
82
83
84
85
86
87
88
89
90
91
92

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"
93
94
95
96
97
98
99
100
101
102
103

eve-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/eve-builder.Dockerfile" --destination "$CI_REGISTRY_IMAGE/eve-builder:latest"