.gitlab-ci.yml 864 Bytes
Newer Older
Anton Weber's avatar
Anton Weber committed
1
2
3
4
5
6
image: "engel-simulator-builder:latest"

stages:
  - check
  - build

Rahix's avatar
Rahix committed
7
8
9
10
11
cache: &global_cache
  paths:
    - target/
    - www/node_modules/

Anton Weber's avatar
Anton Weber committed
12
13
14
15
16
17
18
19
20
21
22
check:
  stage: check
  script:
    - rustc --version
    - cargo --version
    - cargo fmt -- --check
  only:
    - merge_requests

build-dev:
  stage: build
Rahix's avatar
Rahix committed
23
24
25
26
  cache:
    # inherit all global cache settings
    <<: *global_cache
    key: merge-requests
Anton Weber's avatar
Anton Weber committed
27
  script:
28
    - RUSTFLAGS=-Dwarnings wasm-pack build --dev
Rahix's avatar
Rahix committed
29
30
31
32
    - cd www
    - npm install
    - npm run rust-web-modules
    - npm run build
Anton Weber's avatar
Anton Weber committed
33
34
35
36
37
  only:
    - merge_requests

build-release:
  stage: build
Rahix's avatar
Rahix committed
38
39
40
41
  cache:
    # inherit all global cache settings
    <<: *global_cache
    key: release-build
Anton Weber's avatar
Anton Weber committed
42
43
44
45
46
47
48
49
50
51
52
  script:
    - wasm-pack build
    - cd www
    - npm install
    - npm run rust-web-modules
    - npm run build
  artifacts:
    paths:
      - www/dist
  only:
    - master