Skip to content
This repository was archived by the owner on Feb 26, 2020. It is now read-only.

Commit 8b88bf1

Browse files
committed
ci: add .gitlab-ci.yml
1 parent a96ad75 commit 8b88bf1

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

.gitlab-ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# .gitlab-ci.yml
2+
# rust-secp256k1
3+
4+
5+
stages:
6+
- test
7+
- build
8+
9+
10+
11+
image: parity/rust-builder:latest
12+
13+
variables:
14+
GIT_STRATEGY: fetch
15+
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
16+
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
17+
CI_SERVER_NAME: "GitLab CI"
18+
DOCKER_OS: "debian:stretch"
19+
ARCH: "x86_64"
20+
21+
22+
.collect-artifacts: &collect-artifacts
23+
artifacts:
24+
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
25+
when: on_success
26+
expire_in: 7 days
27+
paths:
28+
- artifacts/
29+
30+
.docker-env: &docker-env
31+
tags:
32+
- linux-docker
33+
34+
.compiler_info: &compiler_info
35+
before_script:
36+
- rustup show
37+
- cargo --version
38+
- sccache -s
39+
40+
.build-refs: &build-refs
41+
only:
42+
- master
43+
- schedules
44+
- web
45+
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
46+
47+
.test-refs: &test-refs
48+
only:
49+
- master
50+
- schedules
51+
- web
52+
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
53+
- /^[0-9]+$/
54+
55+
56+
57+
58+
59+
test-linux-stable: &test
60+
stage: test
61+
<<: *test-refs
62+
<<: *docker-env
63+
<<: *compiler_info
64+
variables:
65+
RUST_TOOLCHAIN: stable
66+
RUSTFLAGS: -Cdebug-assertions=y
67+
TARGET: native
68+
script:
69+
- time cargo test --all --release --verbose --locked
70+
- sccache -s
71+
72+
73+
74+
75+
build-linux-release: &build
76+
stage: build
77+
<<: *build-refs
78+
<<: *docker-env
79+
<<: *compiler_info
80+
<<: *collect-artifacts
81+
script:
82+
- time cargo build --release --verbose
83+
- mv ./target/release/libsecp256k1* ./artifacts/.
84+
- sccache -s
85+
86+
87+

0 commit comments

Comments
 (0)