forked from creusot-rs/creusot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
30 lines (27 loc) · 1010 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This file is a template, and might need editing before it works on your project.
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/rust/tags/
image: "rust:latest"
stages:
- build
- test
docker:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --cache=true --context $CI_PROJECT_DIR/ci --dockerfile $CI_PROJECT_DIR/ci/Dockerfile.build --destination $CI_REGISTRY_IMAGE/ci:$CI_COMMIT_TAG
rules:
- changes:
- ci/Dockerfile.build
- if: $FORCE_DOCKER_BUILD
test:cargo:
image: $CI_REGISTRY_IMAGE/ci:latest
stage: test
script:
- rustc --version && cargo --version # Print version info for debugging
- cargo build --lib=creusot-contracts
- cargo test --workspace